Skip to content

Commit 7939bd0

Browse files
Merge pull request magento#9361 from magento-gl/ACQE-7152-mainline-functional-tests-deployment
[Bengals] | Functional Tests Mainline Deployment
2 parents 915e8fe + 25f317a commit 7939bd0

File tree

45 files changed

+2137
-22
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2137
-22
lines changed

app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminLoginWithCustomUrlActionGroup.xml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
8-
98
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
109
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1110
<actionGroup name="AdminLoginWithCustomUrlActionGroup" extends="AdminLoginActionGroup">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminAddImageCategoryAtAllStoreViewActionGroup">
11+
<annotations>
12+
<description>Requires navigation to the Category creation/edit page. Adds the provided image to a Category.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="image" defaultValue="ProductImage"/>
16+
</arguments>
17+
<conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/>
18+
<waitForPageLoad time="30" stepKey="waitForPageLoad"/>
19+
<waitForElementVisible selector="{{AdminCategoryContentSection.uploadButton}}" stepKey="seeImageSectionIsReady"/>
20+
<attachFile selector="{{AdminCategoryContentSection.uploadImageFile}}" userInput="{{image.file}}" stepKey="uploadFile"/>
21+
<waitForPageLoad stepKey="waitForFileUpload1"/>
22+
</actionGroup>
23+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9+
<actionGroup name="AdminAssertCategoryImageActionGroup">
10+
<annotations>
11+
<description>Assert category image on admin.</description>
12+
</annotations>
13+
<arguments>
14+
<argument name="image" type="entity"/>
15+
</arguments>
16+
<conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/>
17+
<waitForPageLoad time="30" stepKey="waitForPageLoad"/>
18+
<waitForElementVisible selector="{{AdminCategoryContentSection.imageFileName}}" stepKey="waitForLoading"/>
19+
<grabTextFrom selector="{{AdminCategoryContentSection.imageFileName}}" stepKey="grabCategoryFileName"/>
20+
<assertRegExp stepKey="assertEquals" message="pass">
21+
<expectedResult type="string">/{{image.filename}}(_[0-9]+)*?\.(jpg|png)$/</expectedResult>
22+
<actualResult type="variable">grabCategoryFileName</actualResult>
23+
</assertRegExp>
24+
</actionGroup>
25+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9+
<actionGroup name="AdminAssertCategoryNoImageActionGroup">
10+
<annotations>
11+
<description>Assert category no image on admin.</description>
12+
</annotations>
13+
<conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/>
14+
<waitForPageLoad time="30" stepKey="waitForPageLoad"/>
15+
<dontSee selector="{{AdminCategoryContentSection.imageFileName}}" stepKey="dontSeeImage"/>
16+
</actionGroup>
17+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminChangeCategoryImageOnStoreviewActionGroup">
11+
<annotations>
12+
<description>Requires navigation to the Category creation/edit page. Adds the provided image to a Category. Validates that the Image exists.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="image" defaultValue="ProductImage"/>
16+
</arguments>
17+
<conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/>
18+
<waitForPageLoad time="30" stepKey="waitForPageLoad"/>
19+
<uncheckOption selector="{{AdminCategoryContentSection.categoryImageUseDefault}}" stepKey="uncheckUseDefaultValueStoreView"/>
20+
<waitForElementVisible selector="{{AdminCategoryContentSection.uploadButton}}" stepKey="seeImageSectionIsReady"/>
21+
<attachFile selector="{{AdminCategoryContentSection.uploadImageFile}}" userInput="{{image.file}}" stepKey="uploadFile"/>
22+
<waitForPageLoad stepKey="waitForFileUpload1"/>
23+
</actionGroup>
24+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminSelectValueForVisibleOnStorefrontActionGroup">
12+
<annotations>
13+
<description>Admin Select Yes for visible on Storefront on product attribute page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="catalogPagesValue" type="string" defaultValue="Yes"/>
17+
</arguments>
18+
<waitForElementClickable selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="waitForStorefrontPropertiesTabToBeClickable"/>
19+
<click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="clickStorefrontPropertiesTab"/>
20+
<waitForElement selector="{{StorefrontPropertiesSection.visibleOnCatalogPagesOnStorefront}}" stepKey="waitForVisibleOnCatalogElement"/>
21+
<selectOption selector="{{StorefrontPropertiesSection.visibleOnCatalogPagesOnStorefront}}" userInput="{{catalogPagesValue}}" stepKey="enableVisibleOnStorefront"/>
22+
</actionGroup>
23+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminSetCatalogPriceToWebsiteActionGroup">
12+
<annotations>
13+
<description> Admin set catalog price scope to website.</description>
14+
</annotations>
15+
<magentoCLI command="config:set {{WebsiteCatalogPriceScopeConfigData.path}} {{WebsiteCatalogPriceScopeConfigData.value}}" stepKey="setSetCatalogPriceToWebsite"/>
16+
</actionGroup>
17+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminSetDefaultCatalogPriceActionGroup">
12+
<annotations>
13+
<description> Admin set catalog price scope to default.</description>
14+
</annotations>
15+
<magentoCLI command="config:set {{GlobalCatalogPriceScopeConfigData.path}} {{GlobalCatalogPriceScopeConfigData.value}}" stepKey="setSetCatalogPriceToWebsite"/>
16+
</actionGroup>
17+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminUpdateAttributeValuesOnProductDetailsPageActionGroup">
12+
<annotations>
13+
<description>Admin Update attribute values on product details page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="taxValue" type="string" defaultValue="None"/>
17+
<argument name="weightValue" type="string" defaultValue="1"/>
18+
<argument name="visibilityValue" type="string" defaultValue="Search"/>
19+
<argument name="country" type="string" defaultValue="Afghanistan"/>
20+
</arguments>
21+
<waitForElement selector="{{AdminProductFormSection.productTaxClass}}" stepKey="waitForProductTaxClassFieldToBeVisible"/>
22+
<selectOption selector="{{AdminProductFormSection.productTaxClass}}" userInput="{{taxValue}}" stepKey="selectProductTaxClass"/>
23+
<waitForElementVisible selector="{{AdminProductFormSection.productWeight}}" stepKey="waitForSimpleProductWeightToBeVisible"/>
24+
<fillField selector="{{AdminProductFormSection.productWeight}}" userInput="{{weightValue}}" stepKey="fillSimpleProductWeight"/>
25+
<waitForElement selector="{{AdminProductFormSection.visibility}}" stepKey="waitForVisibilityToBeVisible"/>
26+
<selectOption selector="{{AdminProductFormSection.visibility}}" userInput="{{visibilityValue}}" stepKey="selectVisibility"/>
27+
<waitForElement selector="{{AdminProductFormSection.countryOfManufacture}}" stepKey="waitForCountryOfManufactureToBeVisible"/>
28+
<selectOption selector="{{AdminProductFormSection.countryOfManufacture}}" userInput="{{country}}" stepKey="selectCountryOfManufacture"/>
29+
</actionGroup>
30+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="StorefrontAssertCustomOptionValuesInProductDetailsPageActionGroup">
12+
<annotations>
13+
<description>Storefront Assert Custom Option Values In Product Details Page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="firstOption" type="string" defaultValue="Value2"/>
17+
<argument name="secondOption" type="string" defaultValue="Value3"/>
18+
</arguments>
19+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.selectCustomOptionDropDown}}" stepKey="waitForOptionDropDownToBeClickable"/>
20+
<click selector="{{StorefrontProductInfoMainSection.selectCustomOptionDropDown}}" stepKey="clickOption1ValueDropDown"/>
21+
<waitForElement selector="{{StorefrontProductInfoMainSection.customOptionDropDown(firstOption)}}" stepKey="assertValue1InDropDown"/>
22+
<waitForElement selector="{{StorefrontProductInfoMainSection.customOptionDropDown(secondOption)}}" stepKey="assertValue2InDropDown"/>
23+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.selectCustomOptionDropDown}}" stepKey="againWaitForOptionDropDownToClose"/>
24+
<click selector="{{StorefrontProductInfoMainSection.selectCustomOptionDropDown}}" stepKey="againClickOptionValueDropDownToClose"/>
25+
</actionGroup>
26+
</actionGroups>
27+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="StorefrontAssertProductAndAttributeValuesOnProductPageActionGroup">
12+
<annotations>
13+
<description>Storefront assert attribute values on product details page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" type="string" defaultValue="simple-product-UPDATED"/>
17+
<argument name="productPrice" type="string" defaultValue="5.50"/>
18+
<argument name="taxValue" type="string" defaultValue="Taxable Goods"/>
19+
<argument name="weightValue" type="string" defaultValue="10.000000"/>
20+
<argument name="country" type="string" defaultValue="Zimbabwe"/>
21+
</arguments>
22+
<waitForText selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{productName}}" stepKey="seeProductNameInTitle"/>
23+
<waitForText selector="{{StorefrontProductInfoMainSection.price}}" userInput="{{productPrice}}" stepKey="seeProductPrice"/>
24+
<waitForText selector="{{StorefrontProductPageSection.attributeTypes('Tax Class')}}" userInput="{{taxValue}}" stepKey="assertTaxAttribute"/>
25+
<waitForText selector="{{StorefrontProductPageSection.attributeTypes('Weight')}}" userInput="{{weightValue}}" stepKey="assertWeightAttribute"/>
26+
<waitForText selector="{{StorefrontProductPageSection.attributeTypes('Country of Manufacture')}}" userInput="{{country}}" stepKey="assertCountryOfManufactureAttribute"/>
27+
</actionGroup>
28+
</actionGroups>

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

+6
Original file line numberDiff line numberDiff line change
@@ -1574,4 +1574,10 @@
15741574
<requiredEntity type="product_extension_attribute">EavStock1</requiredEntity>
15751575
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
15761576
</entity>
1577+
<entity name="productWithTwoCustomOptions" type="product">
1578+
<var key="sku" entityType="product" entityKey="sku" />
1579+
<data key="file">magento.jpg</data>
1580+
<requiredEntity type="product_option">ProductOptionDropDownFor2</requiredEntity>
1581+
<requiredEntity type="product_option">ProductOptionCheckboxFor2</requiredEntity>
1582+
</entity>
15771583
</entities>

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
8-
98
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
109
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1110
<section name="AdminCategoryContentSection">
@@ -26,5 +25,6 @@
2625
<element name="productTableRow" type="button" selector="#catalog_category_products_table tbody tr"/>
2726
<element name="productSearch" type="button" selector="//button[@data-action='grid-filter-apply']" timeout="30"/>
2827
<element name="productTableColumnSku" type="input" selector="#catalog_category_products_filter_sku"/>
28+
<element name="categoryImageUseDefault" type="checkbox" selector="input[name='use_default[image]']"/>
2929
</section>
3030
</sections>

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -50,5 +50,6 @@
5050
<element name="productNameWithPriceOrLabel" type="text" selector="//div[@class='product details product-item-details']//a[contains(text(),'{{ProductName}}')]//parent::strong/following-sibling::div//span[contains(text(),'{{PriceLabelOrPrice}}')]" parameterized="true"/>
5151
<element name="sortByDropdownContent" type="select" selector="//select[@id='sorter']//option[contains(text(),'{{arg}}')]" parameterized="true"/>
5252
<element name="productInOrderDisplay" type="text" selector="//li[@class='item product product-item'][{{index}}]//a[@class='product-item-link' and contains(text(),'{{product_name}}')]" parameterized="true"/>
53+
<element name="enableCookies" type="text" selector="//a//span[contains(text(),'Enable Cookies')]"/>
5354
</section>
5455
</sections>

0 commit comments

Comments
 (0)