Skip to content

Commit 108f730

Browse files
committed
Merge branch 'B2B-1645' into foxes-pr
2 parents 2ef2147 + 0b400cf commit 108f730

20 files changed

+760
-3
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminAwsS3ImportDownloadableProductsWithFileLinksTest" extends="AdminImportDownloadableProductsWithFileLinksTest">
12+
<annotations>
13+
<features value="AwsS3"/>
14+
<stories value="Import Products"/>
15+
<title value="S3 - Import Downloadable Products with File Links"/>
16+
<description value="Imports a .csv file containing a downloadable product with file links. Verifies that
17+
products are imported successfully."/>
18+
<severity value="MAJOR"/>
19+
<group value="importExport"/>
20+
<group value="Downloadable"/>
21+
<group value="remote_storage_aws_s3"/>
22+
<skip>
23+
<issueId value="MC-39280"/>
24+
</skip>
25+
</annotations>
26+
27+
<before>
28+
<!-- Enable AWS S3 Remote Storage -->
29+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" before="createImportCategory"/>
30+
</before>
31+
32+
<after>
33+
<!-- Disable AWS S3 Remote Storage -->
34+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logoutFromAdmin"/>
35+
</after>
36+
</test>
37+
</tests>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminAwsS3ImportDownloadableProductsWithUrlLinksTest" extends="AdminImportDownloadableProductsWithUrlLinksTest">
12+
<annotations>
13+
<features value="AwsS3"/>
14+
<stories value="Import Products"/>
15+
<title value="S3 - Import Downloadable Products with Url Links"/>
16+
<description value="Imports a .csv file containing a downloadable product with url links. Verifies that
17+
products are imported successfully."/>
18+
<severity value="MAJOR"/>
19+
<group value="importExport"/>
20+
<group value="Downloadable"/>
21+
<group value="remote_storage_aws_s3"/>
22+
<skip>
23+
<issueId value="MC-39280"/>
24+
</skip>
25+
</annotations>
26+
27+
<before>
28+
<!-- Enable AWS S3 Remote Storage -->
29+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" before="addDownloadableDomain"/>
30+
</before>
31+
32+
<after>
33+
<!-- Disable AWS S3 Remote Storage -->
34+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logoutFromAdmin"/>
35+
</after>
36+
</test>
37+
</tests>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAssertProductInfoOnEditPageActionGroup">
12+
<annotations>
13+
<description>Verifies the general data on the Edit product details page in admin for a product.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productStatus" defaultValue="{{_defaultProduct.status}}" type="string"/>
17+
<argument name="productAttributeSet" defaultValue="Default" type="string"/>
18+
<argument name="productName" defaultValue="{{_defaultProduct.name}}" type="string"/>
19+
<argument name="productSku" defaultValue="{{_defaultProduct.sku}}" type="string"/>
20+
<argument name="productPrice" defaultValue="{{_defaultProduct.price}}" type="string"/>
21+
<argument name="productQuantity" defaultValue="{{_defaultProduct.quantity}}" type="string"/>
22+
<argument name="productStockStatus" defaultValue="In Stock" type="string"/>
23+
<argument name="productWeight" defaultValue="{{_defaultProduct.weight}}" type="string"/>
24+
<argument name="productVisibility" defaultValue="Catalog, Search" type="string"/>
25+
<argument name="categoryNames" defaultValue="{{_defaultCategory.name}}" type="string"/>
26+
</arguments>
27+
<waitForElementVisible selector="{{AdminProductFormSection.productStatus}}" stepKey="waitForProductStatus"/>
28+
<seeElement selector="{{AdminProductFormSection.productStatusValue(productStatus)}}" stepKey="seeProductStatus"/>
29+
<seeOptionIsSelected selector="{{AdminProductFormSection.attributeSet}}" userInput="{{productAttributeSet}}" stepKey="seeProductAttributeSet"/>
30+
<seeInField selector="{{AdminProductFormSection.productName}}" userInput="{{productName}}" stepKey="seeProductName"/>
31+
<seeInField selector="{{AdminProductFormSection.productSku}}" userInput="{{productSku}}" stepKey="seeProductSku"/>
32+
<seeInField selector="{{AdminProductFormSection.productPrice}}" userInput="{{productPrice}}" stepKey="seeProductPrice"/>
33+
<seeInField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{productQuantity}}" stepKey="seeProductQuantity"/>
34+
<seeInField selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{productStockStatus}}" stepKey="seeProductStockStatus"/>
35+
<seeInField selector="{{AdminProductFormSection.productWeight}}" userInput="{{productWeight}}" stepKey="seeProductWeight"/>
36+
<seeOptionIsSelected selector="{{AdminProductFormSection.visibility}}" userInput="{{productVisibility}}" stepKey="seeProductVisibility"/>
37+
<seeElement selector="{{AdminProductFormSection.categories(categoryNames)}}" stepKey="seeProductCategories"/>
38+
</actionGroup>
39+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/ImageContentData.xml

Lines changed: 6 additions & 1 deletion
Large diffs are not rendered by default.

app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeMediaGalleryEntryData.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@
2020
<data key="disabled">false</data>
2121
<requiredEntity type="ImageContent">TestImageContent</requiredEntity>
2222
</entity>
23+
<entity name="ApiProductAttributeMediaGalleryEntryTestImage2" type="ProductAttributeMediaGalleryEntry">
24+
<data key="media_type">image</data>
25+
<data key="label" unique="suffix">Adobe Base </data>
26+
<data key="position">1</data>
27+
<array key="types">
28+
<item>image</item>
29+
<item>small_image</item>
30+
<item>thumbnail</item>
31+
</array>
32+
<data key="disabled">false</data>
33+
<requiredEntity type="ImageContent">AdobeBaseContent</requiredEntity>
34+
</entity>
2335
<entity name="ApiProductAttributeMediaGalleryEntryMagentoLogo" type="ProductAttributeMediaGalleryEntry">
2436
<data key="media_type">image</data>
2537
<data key="label" unique="suffix">Magento Logo </data>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<element name="imageFileUpload" type="input" selector="#fileupload"/>
1414
<element name="imageUploadButton" type="button" selector="div.image div.fileinput-button"/>
1515
<element name="imageFile" type="text" selector="//*[@id='media_gallery_content']//img[contains(@src, '{{url}}')]" parameterized="true"/>
16+
<element name="imageFileRoleByImage" type="text" selector="//*[@id='media_gallery_content']//img[contains(@src, '{{url}}')]/ancestor::div[@data-role='image']//*[@data-role-code='{{roleCode}}']" parameterized="true"/>
1617
<element name="imageElement" type="text" selector="#media_gallery_content img"/>
1718
<element name="removeImageButton" type="button" selector=".action-remove"/>
1819
<element name="removeImageButtonForExactImage" type="button" selector="[id='media_gallery_content'] img[src*='{{imageName}}'] + div[class='actions'] button[class='action-remove']" parameterized="true"/>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="AdobeBaseContentExportImport" extends="AdobeBaseContent" type="ImageContent">
12+
<data key="name">adobe-base.jpg</data>
13+
</entity>
14+
<entity name="ApiProductAttributeMediaGalleryForExportImport3" extends="ApiProductAttributeMediaGalleryEntryTestImage2" type="ProductAttributeMediaGalleryEntry">
15+
<data key="label">Adobe Base</data>
16+
<requiredEntity type="ImageContent">AdobeBaseContentExportImport</requiredEntity>
17+
</entity>
18+
</entities>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/ClickPlaceOrderActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
<waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/>
1717
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
18+
<waitForPageLoad stepKey="waitForCheckout"/>
1819
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/>
1920
</actionGroup>
2021
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAssertDownloadableLinkInformationActionGroup">
12+
<annotations>
13+
<description>Verifies the data for a downloadable link on the Edit Product page in admin.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="title" defaultValue="{{downloadableLink.title}}" type="string"/>
17+
<argument name="price" defaultValue="{{downloadableLink.price}}" type="string"/>
18+
<argument name="fileType" defaultValue="{{downloadableLink.file_type}}" type="string"/>
19+
<argument name="fileNameOrUrl" defaultValue="{{downloadableLink.file}}" type="string"/>
20+
<argument name="sampleType" defaultValue="{{downloadableLink.sample_type}}" type="string"/>
21+
<argument name="sampleFileNameOrUrl" defaultValue="{{downloadableLink.sample}}" type="string"/>
22+
<argument name="shareable" defaultValue="{{downloadableLink.shareable}}" type="string"/>
23+
<argument name="maxDownloads" defaultValue="0" type="string"/>
24+
<argument name="index" defaultValue="0" type="string"/>
25+
</arguments>
26+
<conditionalClick selector="{{AdminProductDownloadableSection.sectionHeader}}" dependentSelector="{{AdminProductDownloadableSection.addSampleTitleInput(index)}}" visible="false" stepKey="expandDownloadableSection"/>
27+
<waitForElementVisible selector="{{AdminProductDownloadableSection.addSampleTitleInput(index)}}" stepKey="waitForDownloadableLinks"/>
28+
<seeInField userInput="{{title}}" selector="{{AdminProductDownloadableSection.addLinkTitleInput(index)}}" stepKey="seeTitle"/>
29+
<seeInField userInput="{{price}}" selector="{{AdminProductDownloadableSection.addLinkPriceInput(index)}}" stepKey="seePrice"/>
30+
<seeInField userInput="{{fileType}}" selector="{{AdminProductDownloadableSection.addLinkFileTypeSelector(index)}}" stepKey="seeFileType"/>
31+
<executeJS function="
32+
var element = document.evaluate(&quot;{{AdminProductDownloadableSection.linkFileNameOrUrl(index)}}&quot;, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
33+
if ( typeof element.singleNodeValue.value !== &quot;undefined&quot; ) {
34+
return element.singleNodeValue.value; }
35+
else {
36+
return element.singleNodeValue.innerText; };"
37+
stepKey="grabFileNameOrUrl"/>
38+
<assertStringContainsString stepKey="assertFileNameOrUrl">
39+
<actualResult type="variable">grabFileNameOrUrl</actualResult>
40+
<expectedResult type="string">{{fileNameOrUrl}}</expectedResult>
41+
</assertStringContainsString>
42+
<seeInField userInput="{{sampleType}}" selector="{{AdminProductDownloadableSection.addLinkSampleTypeSelector(index)}}" stepKey="seeSampleType"/>
43+
<executeJS function="
44+
var element = document.evaluate(&quot;{{AdminProductDownloadableSection.linkSampleFileNameOrUrl(index)}}&quot;, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
45+
if ( typeof element.singleNodeValue.value !== &quot;undefined&quot; ) {
46+
return element.singleNodeValue.value; }
47+
else {
48+
return element.singleNodeValue.innerText; };"
49+
stepKey="grabSampleFileNameOrUrl"/>
50+
<assertStringContainsString stepKey="assertSampleFileNameOrUrl">
51+
<actualResult type="variable">grabSampleFileNameOrUrl</actualResult>
52+
<expectedResult type="string">{{sampleFileNameOrUrl}}</expectedResult>
53+
</assertStringContainsString>
54+
<seeInField userInput="{{shareable}}" selector="{{AdminProductDownloadableSection.addLinkShareableSelector(index)}}" stepKey="seeShareable"/>
55+
<seeInField userInput="{{maxDownloads}}" selector="{{AdminProductDownloadableSection.addLinkMaxDownloadsInput(index)}}" stepKey="seeMaxDownloads"/>
56+
</actionGroup>
57+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAssertDownloadableSampleLinkInformationActionGroup">
12+
<annotations>
13+
<description>Verifies the data for a downloadable sample link on the Edit Product page in admin.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="title" defaultValue="{{downloadableSampleFile.title}}" type="string"/>
17+
<argument name="fileType" defaultValue="{{downloadableSampleFile.file_type}}" type="string"/>
18+
<argument name="fileNameOrUrl" defaultValue="{{downloadableSampleFile.file}}" type="string"/>
19+
<argument name="index" defaultValue="0" type="string"/>
20+
</arguments>
21+
<conditionalClick selector="{{AdminProductDownloadableSection.sectionHeader}}" dependentSelector="{{AdminProductDownloadableSection.addSampleTitleInput(index)}}" visible="false" stepKey="expandDownloadableSection"/>
22+
<waitForElementVisible selector="{{AdminProductDownloadableSection.addSampleTitleInput(index)}}" stepKey="waitForDownloadableLinks"/>
23+
<seeInField userInput="{{title}}" selector="{{AdminProductDownloadableSection.addSampleTitleInput(index)}}" stepKey="seeTitle"/>
24+
<seeInField userInput="{{fileType}}" selector="{{AdminProductDownloadableSection.addSampleFileTypeSelector(index)}}" stepKey="seeFileType"/>
25+
<executeJS function="
26+
var element = document.evaluate(&quot;{{AdminProductDownloadableSection.sampleFileNameOrUrl(index)}}&quot;, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
27+
if ( typeof element.singleNodeValue.value !== &quot;undefined&quot; ) {
28+
return element.singleNodeValue.value; }
29+
else {
30+
return element.singleNodeValue.innerText; };"
31+
stepKey="grabFileNameOrUrl"/>
32+
<assertStringContainsString stepKey="assertFileNameOrUrl">
33+
<actualResult type="variable">grabFileNameOrUrl</actualResult>
34+
<expectedResult type="string">{{fileNameOrUrl}}</expectedResult>
35+
</assertStringContainsString>
36+
</actionGroup>
37+
</actionGroups>

0 commit comments

Comments
 (0)