Skip to content

Commit bad6239

Browse files
committed
Merge branch '2.4-develop' of https://github.com/magento-commerce/magento2ce into ACP2E-1307
2 parents 11875d1 + 093ddc6 commit bad6239

File tree

40 files changed

+1320
-10
lines changed

40 files changed

+1320
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="AdminAddMultipleSimpleProductToBundleProductActionGroup">
12+
<annotations>
13+
<description>Admin Add multiple Simple Product to bundled products</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product" defaultValue="_defaultProduct"/>
17+
</arguments>
18+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
19+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
20+
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillProductSkuFilter"/>
21+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
22+
<waitForElementNotVisible selector="{{AdminProductGridSection.loadingMask}}" stepKey="waitForFilteredGridLoad" time="30"/>
23+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
24+
</actionGroup>
25+
</actionGroups>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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="AdminAddOptionToBundleProductActionGroup">
12+
<annotations>
13+
<description>Admin Add Option to bundled products</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="categoryName" type="string"/>
17+
<argument name="website" defaultValue="Main Website" type="string"/>
18+
</arguments>
19+
<click selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="openDropDown"/>
20+
<checkOption selector="{{AdminProductFormSection.selectCategory(categoryName)}}" stepKey="selectCategory"/>
21+
<conditionalClick selector="{{AdminProductGridSection.productCollapsibleColumns('closed','Product in Websites')}}" dependentSelector="{{AdminProductGridSection.productCollapsibleColumns('closed','Product in Websites')}}" visible="true" stepKey="expandProductInWebsites"/>
22+
<checkOption selector="{{AdminProductGridSection.checkOtherWebsites(website)}}" stepKey="checkMainWebsite"/>
23+
<scrollTo selector="{{AdminProductFormBundleSection.contentDropDown}}" stepKey="scrollToBundleSection"/>
24+
<conditionalClick selector="{{AdminProductGridSection.productCollapsibleColumns('closed','Product in Websites')}}" dependentSelector="{{AdminProductGridSection.productCollapsibleColumns('closed','Product in Websites')}}" visible="true" stepKey="expandBundleItem"/>
25+
<selectOption userInput="Separately" selector="{{AdminProductFormBundleSection.shipmentType}}" stepKey="SelectShipBundleItemsAsTogether"/>
26+
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption"/>
27+
<waitForElementNotVisible selector="{{AdminProductGridSection.loadingMask}}" stepKey="waitForAddOptionLoad" time="30"/>
28+
<wait time="5" stepKey="waitForOptionsToPopulate"/>
29+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="option1" stepKey="fillOptionTitle"/>
30+
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="Drop-down" stepKey="selectInputTypeAsDropDown"/>
31+
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle"/>
32+
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/>
33+
<waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts"/>
34+
</actionGroup>
35+
</actionGroups>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="AdminToggleAnchorSwitchActionGroup">
12+
<annotations>
13+
<description>Admin enable or disable Anchor Switch for any category.</description>
14+
</annotations>
15+
<scrollTo selector="{{CategoryDisplaySettingsSection.DisplaySettingTab}}" x="0" y="-80" stepKey="scrollToDisplaySetting"/>
16+
<click selector="{{CategoryDisplaySettingsSection.DisplaySettingTab}}" stepKey="selectDisplaySetting"/>
17+
<click selector="{{AdminCategoryBasicFieldSection.anchorSwitch}}" stepKey="toggleSwitchAnchorCategory"/>
18+
<wait time="10" stepKey="waitToChangeAnchorSwitchStatus"/>
19+
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
20+
<magentoCLI command="indexer:reindex" stepKey="performReindex"/>
21+
<magentoCLI command="cache:flush" stepKey="cleanCache"/>
22+
</actionGroup>
23+
</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 © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
-->
7+
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9+
<!-- On a category page with layered navigation, verify if the category filter item is present -->
10+
<actionGroup name="AssertStorefrontLayeredNavigationCategoryAndPriceActionGroup">
11+
<annotations>
12+
<description>Layered Navigation Category And Price validation.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="minPrice" type="string"/>
16+
<argument name="maxPrice" type="string"/>
17+
<argument name="count" type="string"/>
18+
<argument name="minPrice2" type="string"/>
19+
<argument name="maxPrice2" type="string"/>
20+
</arguments>
21+
<!-- Verify category and price layered navigation item is present -->
22+
<see selector="{{StorefrontCategorySidebarSection.layeredFilterBlock}}" userInput="Category" stepKey="seeCategoryFilterInLayeredNav"/>
23+
<click selector="{{StorefrontCategorySidebarSection.expandCategoryLayeredNavigationButton}}" stepKey="expandCategoryLayeredNavigation"/>
24+
<seeElement selector="{{StorefrontCategorySidebarSection.seeLayeredNavigationCategory}}" stepKey="verifyCat"/>
25+
<seeElement selector="{{StorefrontCategorySidebarSection.seeLayeredNavigationCategoryProductQty}}" stepKey="verifyQuantity"/>
26+
<click selector="{{StorefrontCategorySidebarSection.expandPriceLayeredNavigationButton}}" stepKey="expandPriceLayeredNavigation"/>
27+
<seeElement selector="{{StorefrontCategorySidebarSection.seeLayeredNavigationFirstPriceRange(minPrice, maxPrice, count)}}" stepKey="verifyPriceRange1"/>
28+
<seeElement selector="{{StorefrontCategorySidebarSection.seeLayeredNavigationSecondPriceRange(minPrice2,maxPrice2,count)}}" stepKey="verifyPriceRange2"/>
29+
</actionGroup>
30+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontAddMultipleSimpleProductToBundleProductActionGroup">
11+
<annotations>
12+
<description>"Adding multiple simple product under bundle products" </description>
13+
</annotations>
14+
15+
<click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomizeAndAddToCart"/>
16+
<click selector="{{StorefrontBundleProductActionSection.dropdownSelectOption}}" stepKey="clickOnSelectOption"/>
17+
<seeElement selector="{{StorefrontBundleProductActionSection.dropdownProductSelection('$$product1.name$$ +$$$product1.price$$')}}" stepKey="seeOption1Product1Details"/>
18+
<seeElement selector="{{StorefrontBundleProductActionSection.dropdownProductSelection('$$product2.name$$ +$$$product2.price$$')}}" stepKey="seeOption1Product2Details"/>
19+
<seeElement selector="{{StorefrontBundleProductActionSection.dropdownProductSelection('$$product3.name$$ +$$$product3.price$$')}}" stepKey="seeOption1Product3Details"/>
20+
<click selector="{{StorefrontBundleProductActionSection.dropdownProductSelection('$$product1.name$$)}}" stepKey="selecteProduct1"/>
21+
<click selector="{{StorefrontBundleProductActionSection.addToCartButton($$product1.name$$)}}" stepKey="addProduct1InCart"/>
22+
<click selector="{{StorefrontBundleProductActionSection.dropdownSelectOption}}" stepKey="clickOnSelectOption2"/>
23+
<click selector="{{StorefrontBundleProductActionSection.dropdownProductSelection('$$product2.name$$)}}" stepKey="selecteProduct2"/>
24+
<click selector="{{StorefrontBundleProductActionSection.addToCartButton($$product2.name$$)}}" stepKey="addProduct2InCart"/>
25+
<click selector="{{StorefrontBundleProductActionSection.dropdownSelectOption}}" stepKey="clickOnSelectOption3"/>
26+
<click selector="{{StorefrontBundleProductActionSection.dropdownProductSelection('$$product3.name$$)}}" stepKey="selecteProduct3"/>
27+
<click selector="{{StorefrontBundleProductActionSection.addToCartButton($$product3.name$$)}}" stepKey="addProduct3InCart"/>
28+
</actionGroup>
29+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="StorefrontGoToSubSubCategoryPageActionGroup" extends="StorefrontGoToCategoryPageActionGroup">
12+
<arguments>
13+
<argument name="subCategoryName" type="string"/>
14+
<argument name="subSubCategoryName" type="string"/>
15+
</arguments>
16+
<moveMouseOver selector="{{StorefrontHeaderSection.NavigationCategoryByName(categoryName)}}" stepKey="toCategory"/>
17+
<waitForPageLoad stepKey="waitForSubCategoryPage"/>
18+
<moveMouseOver selector="{{StorefrontHeaderSection.NavigationCategoryByName(subCategoryName)}}" stepKey="toSubCategory" after="toCategory"/>
19+
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName(subSubCategoryName)}}" stepKey="openSubSubCategory" after="toSubCategory"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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="SwitchCategoryWebSiteStoreViewActionGroup">
12+
<annotations>
13+
<description>Navigates to category page, selects a category and changes store view to specified store when we have multiple website.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="Store" type="string"/>
17+
<argument name="CatName"/>
18+
</arguments>
19+
20+
<amOnPage url="{{AdminCategoryPage.page}}" stepKey="amOnCategoryPage"/>
21+
<waitForPageLoad stepKey="waitForCategoryPageToLoad"/>
22+
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(CatName)}}" stepKey="navigateToCreatedCategory"/>
23+
<waitForPageLoad stepKey="waitForCreatedCategoryPageLoad"/>
24+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskSpinner"/>
25+
<scrollToTopOfPage stepKey="scrollToTopOfToggle"/>
26+
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewDropdownToggle}}" stepKey="openStoreViewDropDown"/>
27+
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewOption(Store)}}" stepKey="selectStoreView"/>
28+
<waitForPageLoad stepKey="waitForSelectStoreViewLoad"/>
29+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskSpinnerAgain"/>
30+
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}" stepKey="selectStoreViewAccept"/>
31+
<waitForPageLoad stepKey="waitForStoreViewChangeLoad"/>
32+
</actionGroup>
33+
</actionGroups>

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,15 @@
2525
<element name="scheduleDesignUpdateTab" type="block" selector="div[data-index='schedule_design_update']" timeout="15"/>
2626
<element name="categoryNameRequiredField" type="text" selector="//label[@class='admin__field-error' and contains(text(),'This is a required field.')]" timeout="15"/>
2727
<element name="urlExistsErrorMessage" type="text" selector="//div[@class='message message-error error']//h4[contains(text(),'The value specified in the URL Key field would generate a URL that already exists.')]" timeout="30"/>
28+
<element name="presenceProductsInCategory" type="text" selector="//div[@class='admin__data-grid-wrap admin__data-grid-wrap-static']//td[3]" timeout="30"/>
29+
<element name="anchorSwitch" type="input" selector="//input[@name='is_anchor']/../..//div[@class='admin__actions-switch']" timeout="30"/>
30+
<element name="categoryTreeForThree" type="input" selector="//span[contains(text(),'{{var1}}')]/../../..//ul//a//span[contains(text(),'{{var2}}')]/../../..//ul//a/span[contains(text(),'{{var3}}')]" parameterized="true"/>
31+
<element name="categoryTreeForFour" type="input" selector="//span[contains(text(),'{{CatA}}') and contains(text(),'({{qty1}})') ]/../../..//ul//a//span[contains(text(),'{{CatB}}') and contains(text(),'({{qty2}})')]/../../..//ul//a/span[contains(text(),'{{CatC}}') and contains(text(),'({{qty3}})')]/../../../../../..//li[2]//a/span[contains(text(),'{{CatD}}') and contains(text(),'({{qty4}})')]" parameterized="true"/>
32+
<element name="categoryTreeForFive" type="input" selector="//span[contains(text(),'{{CatA}}') and contains(text(),'({{qty1}})') ]/../../..//ul//a//span[contains(text(),'{{CatB}}') and contains(text(),'({{qty2}})')]/../../..//ul//a/span[contains(text(),'{{CatC}}') and contains(text(),'({{qty3}})')]/../../../../../..//li[2]//a/span[contains(text(),'{{CatD}}') and contains(text(),'({{qty4}})')]/.././../..//ul//a/span[contains(text(),'{{CatE}}') and contains(text(),'({{qty5}})')]" parameterized="true"/>
33+
<element name="sourceCategory" type="text" selector="//div[@class='x-tree-node-el folder active-category x-tree-node-leaf x-tree-selected']//a/span[contains(text(),'{{var1}}')]" parameterized="true"/>
34+
<element name="destinationCategory" type="text" selector="//div[@class='x-tree-node-el folder active-category x-tree-node-expanded']//a/span[contains(text(),'Default Category')]"/>
35+
36+
<element name="grabPopUpText" type="input" selector="//div[@class='modal-inner-wrap']//div[@data-id='information-dialog-category']//div[text()='This operation can take a long time']"/>
37+
<element name="acceptPopUp" type="input" selector="//div[@class='modal-inner-wrap']//button[@class='action-primary']/span[text()='Ok']"/>
2838
</section>
2939
</sections>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@
2323
<element name="expandRootCategoryByName" type="button" selector="//div[@class='x-tree-root-node']/li/div/a/span[contains(., '{{categoryName}}')]/../../img[contains(@class, 'x-tree-elbow-end-plus')]" parameterized="true" timeout="30"/>
2424
<element name="categoryByName" type="text" selector="//div[contains(@class, 'categories-side-col')]//a/span[contains(text(), '{{categoryName}}')]" parameterized="true" timeout="30"/>
2525
<element name="expandCategoryByName" type="text" selector="//span[contains(text(),'{{categoryName}}')]/ancestor::div[contains(@class,'x-tree-node-el')]//img[contains(@class,'x-tree-elbow-end-plus') or contains(@class,'x-tree-elbow-plus')]" parameterized="true" timeout="30"/>
26+
<element name="subCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'SimpleSubCategory') and contains(text(),'({{productCount}})')]" parameterized="true"/>
27+
<element name="defaultCategoryProductCount" type="text" selector="//div[@class='tree-holder']//span[contains(text(),'Default Category') and contains(text(),'({{productCount}})')]" parameterized="true"/>
2628
</section>
2729
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection/AttributeManageSwatchSection.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@
1010
<section name="AttributeManageSwatchSection">
1111
<element name="swatchField" type="input" selector="//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Swatch']" parameterized="true"/>
1212
<element name="descriptionField" type="input" selector="//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Description']" parameterized="true"/>
13+
<element name="swatchField1" type="input" selector="(//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Swatch'])[2]" parameterized="true"/>
14+
<element name="descriptionField1" type="input" selector="(//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Description'])[2]" parameterized="true"/>
15+
<element name="swatchField2" type="input" selector="(//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Swatch'])[3]" parameterized="true"/>
16+
<element name="descriptionField2" type="input" selector="(//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Description'])[3]" parameterized="true"/>
1317
</section>
1418
</sections>

0 commit comments

Comments
 (0)