Skip to content

Commit 9ff7742

Browse files
authored
Merge pull request #2717 from magento-pangolin/RE-develop-pr
[pangolin] RE-develop functional tests - MC-244: Admin should be able to create a simple product using a custom attribute set - MC-288: Admin should be able to update existing attributes of child products of a configurable product - MC-290: Customer should be able to change chosen options for Bundle Product when clicking Edit button in Shopping Cart page - MC-168: Admin should be able to assign attributes to an attribute set - MC-189: Admin should be able to add images of different types and sizes to Simple Product - MC-291: Customer should be able to see chosen options for Bundle Product in Shopping Cart when Option Title is edited in Admin - MC-194: Admin should be able to unassign attributes from an attribute set - MC-168: Admin should be able to assign attributes to an attribute set - MC-225: Admin should be able to save and publish a bundle product - MC-215: Admin should be able to change a bundle product status to Enabled/Disabled - MQE-1063: Make MC-115 and MC-200 more robust - MQE-976: Tweak annotations for all existing tests
2 parents e47b0d7 + 4933bb9 commit 9ff7742

File tree

101 files changed

+1500
-156
lines changed

Some content is hidden

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

101 files changed

+1500
-156
lines changed
1.66 MB
Binary file not shown.

dev/tests/acceptance/tests/_data/empty.jpg

Loading
213 KB
Loading
169 KB
Binary file not shown.
72 KB
Loading
13.8 MB
Loading
1.02 MB
Loading
12.6 KB
Loading
1.04 KB
Loading
Lines changed: 20 additions & 0 deletions
Loading

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Test/AdminLoginTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
1111
<test name="AdminLoginTest">
1212
<annotations>
13-
<features value="Admin Login"/>
13+
<features value="Backend"/>
1414
<stories value="Login on the Admin Login page"/>
15-
<title value="You should be able to log into the Magento Admin backend."/>
16-
<description value="You should be able to log into the Magento Admin backend."/>
15+
<title value="Admin should be able to log into the Magento Admin backend"/>
16+
<description value="Admin should be able to log into the Magento Admin backend"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-71572"/>
1919
<group value="example"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminClearFiltersActionGroup">
12+
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage"/>
13+
<waitForPageLoad stepKey="WaitForPageToLoad"/>
14+
<conditionalClick selector="{{AdminProductCatalog.clearFilters}}" dependentSelector="{{AdminProductCatalog.clearFilters}}" visible="true" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/>
15+
</actionGroup>
16+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="BundleProductFilter">
12+
<!--Setting filter-->
13+
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="GoToCatalogPage"/>
14+
<waitForPageLoad stepKey="WaitForPageToLoadFully"/>
15+
<click selector="{{AdminProductCatalog.clickOnFilter}}" stepKey="ClickOnFilter"/>
16+
<click selector="{{AdminProductCatalog.clickOnTypeDropDown}}" stepKey="ClickOnTypeDropDown"/>
17+
<click selector="{{AdminProductCatalog.clickOnBundleOption}}" stepKey="ClickOnBundleOption"/>
18+
<click selector="{{AdminProductCatalog.clickOnApplyFilters}}" stepKey="ClickOnApplyFilters"/>
19+
</actionGroup>
20+
</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 © 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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CreateBasicBundleProduct">
12+
<!--Product name and SKU-->
13+
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
14+
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/>
15+
16+
<!--Trigger SEO drop down-->
17+
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.seoDependent}}" visible="false" stepKey="OpenDropDownIfClosed"/>
18+
<waitForPageLoad stepKey="WaitForDropDownSEO"/>
19+
20+
<!--Fill URL input-->
21+
<fillField userInput="{{BundleProduct.urlKey}}" selector="{{AdminProductFormBundleSection.urlKey}}" stepKey="FillsinSEOlinkExtension"/>
22+
</actionGroup>
23+
</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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AncillaryPrepBundleProduct">
12+
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
13+
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/>
14+
15+
<!--Trigger SEO drop down-->
16+
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.seoDependent}}" visible="false" stepKey="OpenDropDownIfClosed"/>
17+
<waitForPageLoad stepKey="WaitForDropDownSEO"/>
18+
19+
<!--Fill URL input-->
20+
<fillField userInput="{{BundleProduct.urlKey}}" selector="{{AdminProductFormBundleSection.urlKey}}" stepKey="FillsinSEOlinkExtension"/>
21+
</actionGroup>
22+
23+
<!--Enable/Disable Product Toggle-->
24+
<actionGroup name="EnableDisableProduct">
25+
<click stepKey="ClickOnEnableDisableToggle" selector="{{AdminProductFormBundleSection.enableDisableToggle}}"/>
26+
</actionGroup>
27+
28+
<!--Edit existing product by searching in product catalog-->
29+
<actionGroup name="FindProductToEdit">
30+
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="GoToProductCatalog"/>
31+
<waitForPageLoad stepKey="WaitForCatalogProductPageToLoad"/>
32+
<fillField userInput="{{BundleProduct.name}}" selector="#fulltext" stepKey="EnterProductNameInSearch"/>
33+
<click stepKey="ClickSearch" selector="{{AdminProductFormBundleSection.searchButton}}"/>
34+
<click stepKey="ClickOnProduct" selector="{{AdminProductFormBundleSection.firstCatalogProduct}}"/>
35+
<waitForPageLoad stepKey="WaitForProductEditPageToLoad"/>
36+
</actionGroup>
37+
</actionGroups>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/ProductData.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,25 @@
77
-->
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="BundleProduct" type="product">
1212
<data key="name" unique="suffix">BundleProduct</data>
13+
<data key="name" unique="suffix">BundleProduct</data>
14+
<data key="name2" unique="suffix">BundleProduct2</data>
1315
<data key="sku" unique="suffix">bundleproduct</data>
16+
<data key="sku2" unique="suffix">bundleproduct2</data>
1417
<data key="type_id">bundle</data>
1518
<data key="attribute_set_id">4</data>
1619
<data key="optionTitle1">BundleOption</data>
1720
<data key="optionInputType1">checkbox</data>
1821
<data key="defaultQuantity">10</data>
1922
<data key="status">1</data>
2023
<data key="urlKey" unique="suffix">bundleproduct</data>
24+
<data key="urlKey2" unique="suffix">bundleproduct2</data>
25+
<data key="default_quantity1">10</data>
26+
<data key="default_quantity2">20</data>
27+
<data key="set">4</data>
28+
<data key="type">bundle</data>
2129
</entity>
2230
<entity name="ApiBundleProduct" type="product2">
2331
<data key="name" unique="suffix">Api Bundle Product</data>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11+
<page name="AdminCatalogProductPage" url="catalog/product/" area="admin" module="Magento_Bundle">
12+
<section name="AdminCatalogProductSection"/>
13+
</page>
14+
</pages>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Page/AdminProductCreatePage.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
7-
-->
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
88

99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
1111
<page name="AdminProductCreatePage" url="catalog/product/new/set/{{set}}/type/{{type}}/" area="admin" module="Magento_Catalog" parameterized="true">
1212
<section name="AdminProductFormBundleSection"/>
1313
</page>
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AdminProductCatalog">
12+
<element name="clickOnFilter" type="button" selector="//div[@class='data-grid-filters-action-wrap']/button" timeout="30"/>
13+
<element name="clickOnTypeDropDown" type="multiselect" selector="//select[@name='type_id']" timeout="30"/>
14+
<element name="clickOnBundleOption" type="multiselect" selector="//select[@name='type_id']/option[4]" timeout="30"/>
15+
<element name="clickOnApplyFilters" type="button" selector="//button[@class='action-secondary']" timeout="30"/>
16+
<element name="selectAllCheckBox" type="checkbox" selector="//div[@data-role='grid-wrapper']//label[@data-bind='attr: {for: ko.uid}']" timeout="30"/>
17+
<element name="clickOnActions" type="button" selector="//div[@class='action-select-wrap']/button" timeout="30"/>
18+
<element name="clickOnChangeStatus" type="multiselect" selector="//div[@class='action-menu-items']//li[2]" timeout="30"/>
19+
<element name="clickOnDisable" type="multiselect" selector="//div[@class='action-menu-items']//ul[@class='action-submenu _active']//li[span='Disable']" timeout="30"/>
20+
<element name="clickOnEnable" type="multiselect" selector="//div[@class='action-menu-items']//ul[@class='action-submenu _active']//li[span='Enable']" timeout="30"/>
21+
<element name="clearFilters" type="button" selector="//div[@class='admin__data-grid-header']//button[@data-action='grid-filter-reset']" timeout="30"/>
22+
</section>
23+
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/AdminProductFormBundleSection.xml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="AdminProductFormBundleSection">
1212
<element name="bundleItemsToggle" type="button" selector="//span[text()='Bundle Items']"/>
1313
<element name="shipmentType" type="select" selector=".admin__control-select[name='product[shipment_type]']"/>
@@ -21,5 +21,34 @@
2121
<element name="bundleOptionXRequired" type="checkbox" selector="[name='bundle_options[bundle_options][{{x}}][required]']" parameterized="true"/>
2222
<element name="bundleOptionXProductYQuantity" type="input" selector="[name='bundle_options[bundle_options][{{x}}][bundle_selections][{{y}}][selection_qty]']" parameterized="true"/>
2323
<element name="addProductsToOption" type="button" selector="[data-index='modal_set']" timeout="30"/>
24+
<!--Select"url Key"InputForm-->
25+
<element name="urlKey" type="input" selector="//input[@name='product[url_key]']" timeout="30"/>
26+
<!--AddSelectedProducts-->
27+
<element name="addSelectedProducts" type="button" selector="//span[contains(text(),'Add Selected Products')]/ancestor::button" timeout="30"/>
28+
<!--DefaultQuantities-->
29+
<element name="defaultQuantity1" type="input" selector="//input[@name='bundle_options[bundle_options][0][bundle_selections][0][selection_qty]']" timeout="30"/>
30+
<element name="defaultQuantity2" type="input" selector="//input[@name='bundle_options[bundle_options][0][bundle_selections][1][selection_qty]']" timeout="30"/>
31+
<element name="productName" type="input" selector="//*[@name='product[name]']"/>
32+
<element name="productSku" type="input" selector="//*[@name='product[sku]']"/>
33+
<!--TestingForLocationOfOptions-->
34+
<element name="bundleOptionSelector" type="button" selector="//*[@id='bundle-slide']/span"/>
35+
<element name="bundleOptionSelection" type="button" selector="//div[@class='nested options-list']/div[2]/label[@class='label']"/>
36+
<!--SelectorsForDescriptionCreationOnBundleProduct-->
37+
<element name="contentDropDown" type="button" selector="div[data-index='content']" timeout="30"/>
38+
<element name="contentDropDownIfNotShowing" type="button" selector="//div[@data-index='content']//div[contains(@class, '_hide')]"/>
39+
<element name="longDescription" type="input" selector="#product_form_description"/>
40+
<element name="shortDescription" type="input" selector="#product_form_short_description"/>
41+
<!--SEODropdownTab-->
42+
<element name="seoDropdown" type="button" selector="//div[@data-index='search-engine-optimization']"/>
43+
<element name="seoDependent" type="button" selector="//div[@data-index='search-engine-optimization']//div[contains(@class, '_show')]"/>
44+
<!--NameOfProductOnProductPage-->
45+
<element name="bundleProductName" type="text" selector="//*[@id='maincontent']//span[@itemprop='name']"/>
46+
<!--EnableDisableToggle-->
47+
<element name="enableDisableToggle" type="button" selector="//*[@id='container']//input[@name='product[status]']/.." timeout="30"/>
48+
<!--SearchButton-->
49+
<element name="searchButton" type="button" selector="//div[@class='data-grid-search-control-wrap']//*[@type='button']" timeout="30"/>
50+
<!--ClickOnFirstProductInCatalog-->
51+
<element name="firstCatalogProduct" type="button" selector="//table[@class='data-grid data-grid-draggable']/tbody/tr[@class='data-row']/td[4]"/>
52+
<element name="bundledItems" type="block" selector="[data-index=bundle-items]"/>
2453
</section>
2554
</sections>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="BundleStorefrontSection">
12+
<!--TestingForLocationOfOptions-->
13+
<element name="bundleOptionSelector" type="button" selector="//*[@id='bundle-slide']/span"/>
14+
<element name="bundleOptionSelection" type="button" selector="//div[@class='nested options-list']/div[2]/label[@class='label']"/>
15+
<!--Description-->
16+
<!--CE exclusively-->
17+
<element name="longDescriptionText" type="text" selector="//*[@id='description']/div/div" timeout="30"/>
18+
<element name="shortDescriptionText" type="text" selector="//div[@class='product attribute overview']" timeout="30"/>
19+
<!--NameOfProductOnProductPage-->
20+
<element name="bundleProductName" type="text" selector="//*[@id='maincontent']//span[@itemprop='name']"/>
21+
</section>
22+
</sections>
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="StorefrontBundledSection">
12+
<element name="nthBundledOption" type="input" selector=".option:nth-of-type({{numOption}}) .choice:nth-of-type({{numOptionSelect}}) input" parameterized="true"/>
13+
<element name="addToCart" type="button" selector="#bundle-slide" timeout="30"/>
14+
<element name="addToCartConfigured" type="button" selector="#product-addtocart-button" timeout="30"/>
15+
<element name="updateCart" type="button" selector="#product-updatecart-button" timeout="30"/>
16+
<element name="configuredPrice" type="block" selector=".price-configured_price .price"/>
17+
</section>
18+
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminAddDefaultImageBundleProductTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242

4343
<!-- Add two bundle items -->
4444
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
45+
<!-- scrollTo before click to fix flaky failure -->
46+
<scrollTo selector="{{AdminProductFormBundleSection.addOption}}" stepKey="scrollToAddOption"/>
4547
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/>
4648
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/>
4749
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/>

0 commit comments

Comments
 (0)