Skip to content

Commit 1943fe4

Browse files
committed
Merge remote-tracking branch 'origin/MC-20071' into 2.3-develop-pr85
2 parents 812a2c0 + c5520ff commit 1943fe4

File tree

6 files changed

+70
-70
lines changed

6 files changed

+70
-70
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,4 +1328,9 @@
13281328
<entity name="SimpleProductUpdatePrice16" type="product2">
13291329
<data key="price">16.00</data>
13301330
</entity>
1331+
<entity name="ProductWithTwoTextFieldOptions" type="product">
1332+
<var key="sku" entityType="product" entityKey="sku" />
1333+
<requiredEntity type="product_option">ProductOptionField</requiredEntity>
1334+
<requiredEntity type="product_option">ProductOptionField2</requiredEntity>
1335+
</entity>
13311336
</entities>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<entity name="ProductOptionField" type="product_option">
1212
<var key="product_sku" entityType="product" entityKey="sku" />
1313
<data key="title">OptionField</data>
14+
<data key="sku">OptionField</data>
1415
<data key="type">field</data>
1516
<data key="is_require">true</data>
1617
<data key="sort_order">1</data>
@@ -21,6 +22,7 @@
2122
<entity name="ProductOptionField2" type="product_option">
2223
<var key="product_sku" entityType="product" entityKey="sku" />
2324
<data key="title">OptionField2</data>
25+
<data key="sku">OptionField2</data>
2426
<data key="type">field</data>
2527
<data key="is_require">true</data>
2628
<data key="sort_order">1</data>

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@
5959
<element name="importOptions" type="button" selector="//button[@data-index='button_import']" timeout="30"/>
6060
</section>
6161
<section name="AdminProductImportOptionsSection">
62-
<element name="selectProductTitle" type="text" selector="//h1[contains(text(), 'Select Product')]" timeout="30"/>
63-
<element name="filterButton" type="button" selector="//button[@data-action='grid-filter-expand']" timeout="30"/>
64-
<element name="nameField" type="input" selector="//input[@name='name']" timeout="30"/>
65-
<element name="applyFiltersButton" type="button" selector="//button[@data-action='grid-filter-apply']" timeout="30"/>
66-
<element name="resetFiltersButton" type="button" selector="//button[@data-action='grid-filter-reset']" timeout="30"/>
67-
<element name="firstRowItemCheckbox" type="input" selector="//input[@data-action='select-row']" timeout="30"/>
68-
<element name="importButton" type="button" selector="//button[contains(@class, 'action-primary')]/span[contains(text(), 'Import')]" timeout="30"/>
62+
<element name="selectProductTitle" type="text" selector="//aside[contains(@class, 'product_form_product_form_import_options_modal')]//h1[contains(text(), 'Select Product')]" timeout="30"/>
63+
<element name="filterButton" type="button" selector="aside.product_form_product_form_import_options_modal button[data-action='grid-filter-expand']" timeout="30"/>
64+
<element name="nameField" type="input" selector="aside.product_form_product_form_import_options_modal input[name='name']" timeout="30"/>
65+
<element name="applyFiltersButton" type="button" selector="aside.product_form_product_form_import_options_modal button[data-action='grid-filter-apply']" timeout="30"/>
66+
<element name="resetFiltersButton" type="button" selector="aside.product_form_product_form_import_options_modal button[data-action='grid-filter-reset']" timeout="30"/>
67+
<element name="firstRowItemCheckbox" type="input" selector="aside.product_form_product_form_import_options_modal input[data-action='select-row']" timeout="30"/>
68+
<element name="importButton" type="button" selector="//aside[contains(@class, 'product_form_product_form_import_options_modal')]//button[contains(@class, 'action-primary')]/span[contains(text(), 'Import')]" timeout="30"/>
6969
</section>
7070
</sections>

app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,55 +15,44 @@
1515
<title value="Import customizable options to a product with existing SKU"/>
1616
<description value="Import customizable options to a product with existing SKU"/>
1717
<severity value="MAJOR"/>
18-
<testCaseId value="MAGETWO-98211"/>
18+
<testCaseId value="MC-16471"/>
1919
<useCaseId value="MAGETWO-70232"/>
2020
<group value="catalog"/>
21-
<skip>
22-
<issueId value="MC-17140"/>
23-
</skip>
2421
</annotations>
2522
<before>
26-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2723
<!--Create category-->
28-
<comment userInput="Create category" stepKey="commentCreateCategory"/>
2924
<createData entity="ApiCategory" stepKey="createCategory"/>
30-
<!-- Create two product -->
31-
<comment userInput="Create two product" stepKey="commentCreateTwoProduct"/>
25+
<!-- Create two products -->
3226
<createData entity="SimpleProduct2" stepKey="createFirstProduct"/>
27+
<updateData entity="ProductWithTwoTextFieldOptions" createDataKey="createFirstProduct" stepKey="updateFirstProductWithCustomOptions">
28+
<requiredEntity createDataKey="createFirstProduct"/>
29+
</updateData>
3330
<createData entity="ApiSimpleProduct" stepKey="createSecondProduct">
3431
<requiredEntity createDataKey="createCategory"/>
3532
</createData>
33+
34+
<!-- TODO: REMOVE AFTER FIX MC-21717 -->
35+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
36+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
37+
38+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
3639
</before>
3740
<after>
41+
<!--Delete created data-->
42+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
43+
<deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/>
3844
<!--Delete second product with changed sku-->
39-
<comment userInput="Delete second product with changed sku" stepKey="commentDeleteProduct"/>
4045
<actionGroup ref="deleteProductBySku" stepKey="deleteSecondProduct">
4146
<argument name="sku" value="$$createFirstProduct.sku$$-1"/>
4247
</actionGroup>
43-
<!--Delete created data-->
44-
<comment userInput="Delete created data" stepKey="commentDeleteCreatedData"/>
45-
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
46-
<deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/>
48+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearProductGridFilter"/>
4749
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
4850
</after>
49-
<!--Go to product page -->
50-
<comment userInput="Go to product page" stepKey="commentGoToProductPage"/>
51-
<amOnPage url="{{AdminProductEditPage.url($$createFirstProduct.id$$)}}" stepKey="goToProductEditPage"/>
52-
<waitForPageLoad stepKey="waitForProductEditPageLoad"/>
53-
<actionGroup ref="AddProductCustomOptionField" stepKey="addCutomOption1">
54-
<argument name="option" value="ProductOptionField"/>
55-
</actionGroup>
56-
<actionGroup ref="AddProductCustomOptionField" stepKey="addCutomOption2">
57-
<argument name="option" value="ProductOptionField2"/>
58-
</actionGroup>
59-
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
6051
<!--Change second product sku to first product sku-->
61-
<comment userInput="Change second product sku to first product sku" stepKey="commentChangeSecondProduct"/>
6252
<amOnPage url="{{AdminProductEditPage.url($$createSecondProduct.id$$)}}" stepKey="goToProductEditPage1"/>
6353
<waitForPageLoad stepKey="waitForProductEditPageLoad1"/>
6454
<fillField selector="{{AdminProductFormSection.productSku}}" userInput="$$createFirstProduct.sku$$" stepKey="fillProductSku1"/>
6555
<!--Import customizable options and check-->
66-
<comment userInput="Import customizable options and check" stepKey="commentImportOptions"/>
6756
<conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" visible="false" stepKey="openCustomOptionSection"/>
6857
<actionGroup ref="importProductCustomizableOptions" stepKey="importOptions">
6958
<argument name="productName" value="$$createFirstProduct.name$$"/>
@@ -77,8 +66,7 @@
7766
<argument name="optionIndex" value="1"/>
7867
</actionGroup>
7968
<!--Save product and check sku changed message-->
80-
<comment userInput="Save product and check sku changed message" stepKey="commentSAveProductAndCheck"/>
81-
<actionGroup ref="saveProductForm" stepKey="saveProduct1"/>
82-
<see userInput="SKU for product $$createSecondProduct.name$$ has been changed to $$createFirstProduct.sku$$-1." stepKey="seeSkuChangedMessage"/>
69+
<actionGroup ref="saveProductForm" stepKey="saveSecondProduct"/>
70+
<see selector="{{AdminMessagesSection.notice}}" userInput="SKU for product $$createSecondProduct.name$$ has been changed to $$createFirstProduct.sku$$-1." stepKey="seeSkuChangedMessage"/>
8371
</test>
8472
</tests>

app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
<description value="Admin should be able to mass update product attributes in global scope"/>
1717
<severity value="AVERAGE"/>
1818
<testCaseId value="MC-56"/>
19-
<group value="Catalog"/>
20-
<group value="Product Attributes"/>
21-
<skip>
22-
<issueId value="MC-17140"/>
23-
</skip>
19+
<group value="catalog"/>
20+
<group value="product_attributes"/>
2421
</annotations>
2522
<before>
2623
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
<actionGroup ref="deleteAllProductsUsingProductGrid" stepKey="deleteAllProducts"/>
2725
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView" />
2826
<createData entity="_defaultCategory" stepKey="createCategory"/>
2927
<createData entity="ApiSimpleProduct" stepKey="createProductOne">
@@ -38,7 +36,9 @@
3836
<deleteData createDataKey="createProductTwo" stepKey="deleteProductTwo"/>
3937
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
4038
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="AdminDeleteStoreViewActionGroup"/>
41-
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
39+
<click selector="{{AdminStoresGridSection.resetButton}}" stepKey="resetSearchFilter"/>
40+
<actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductFilter"/>
41+
<actionGroup ref="logout" stepKey="amOnLogoutPage"/>
4242
</after>
4343

4444
<!-- Search and select products -->
@@ -58,36 +58,38 @@
5858
<!-- Switch store view -->
5959
<actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchStoreViewActionGroup"/>
6060
<!-- Update attribute -->
61-
<click selector="{{AdminEditProductAttributesSection.ChangeAttributePriceToggle}}" stepKey="toggleToChangePrice"/>
61+
<checkOption selector="{{AdminEditProductAttributesSection.ChangeAttributePriceToggle}}" stepKey="toggleToChangePrice"/>
6262
<fillField selector="{{AdminEditProductAttributesSection.AttributePrice}}" userInput="$$createProductOne.price$$0" stepKey="fillAttributeNameField"/>
6363
<click selector="{{AdminEditProductAttributesSection.Save}}" stepKey="save"/>
64-
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeAttributeUpateSuccessMsg"/>
64+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" time="60" stepKey="waitForSuccessMessage"/>
65+
<see selector="{{AdminMessagesSection.success}}" userInput="Message is added to queue" stepKey="seeAttributeUpdateSuccessMsg"/>
6566

6667
<!-- Run cron twice -->
67-
<magentoCLI command="cron:run" stepKey="runCron1"/>
68-
<magentoCLI command="cron:run" stepKey="runCron2"/>
69-
<reloadPage stepKey="refreshPage"/>
70-
<waitForPageLoad stepKey="waitFormToReload1"/>
68+
<magentoCLI command="cron:run" arguments="--group=consumers" stepKey="runCron1"/>
69+
<magentoCLI command="cron:run" arguments="--group=consumers" stepKey="runCron2"/>
70+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
7171

7272
<!-- Assert on storefront default view -->
7373
<actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupDefault"/>
7474
<actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="searchByNameDefault">
75-
<argument name="name" value="$$createProductOne.name$$"/>
75+
<argument name="name" value="&quot;$$createProductOne.name$$&quot;"/>
7676
<argument name="priceFrom" value="$$createProductOne.price$$0"/>
7777
<argument name="priceTo" value="$$createProductOne.price$$0"/>
7878
</actionGroup>
7979
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault"/>
80+
<waitForElementVisible selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="waitForSearchResultInDefaultView"/>
8081
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInDefault"/>
8182

8283
<!-- Assert on storefront custom view -->
8384
<actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupCustom"/>
8485
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="StorefrontSwitchStoreViewActionGroup"/>
8586
<actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="searchByNameCustom">
86-
<argument name="name" value="$$createProductOne.name$$"/>
87+
<argument name="name" value="&quot;$$createProductOne.name$$&quot;"/>
8788
<argument name="priceFrom" value="$$createProductOne.price$$0"/>
8889
<argument name="priceTo" value="$$createProductOne.price$$0"/>
8990
</actionGroup>
9091
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultCustom"/>
92+
<waitForElementVisible selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="waitForSearchResultInCustomView"/>
9193
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInCustom"/>
9294
</test>
9395
</tests>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest.xml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<testCaseId value="MC-88"/>
1818
<group value="ConfigurableProduct"/>
1919
<severity value="AVERAGE"/>
20-
<skip>
21-
<issueId value="MC-17140"/>
22-
</skip>
2320
</annotations>
2421

2522
<before>
@@ -37,14 +34,20 @@
3734
</before>
3835

3936
<after>
40-
<actionGroup ref="logout" stepKey="adminLogout"/>
4137
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
38+
<deleteData createDataKey="createProduct1" stepKey="deleteFirstProduct"/>
39+
<deleteData createDataKey="createProduct2" stepKey="deleteSecondProduct"/>
40+
<deleteData createDataKey="createProduct3" stepKey="deleteThirdProduct"/>
41+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductList"/>
42+
<waitForPageLoad stepKey="waitForPageLoad"/>
43+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearProductsGridFilters"/>
44+
<actionGroup ref="logout" stepKey="logout"/>
4245
</after>
4346

4447
<!-- Search for prefix of the 3 products we created via api -->
4548
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductList"/>
4649
<waitForPageLoad stepKey="wait1"/>
47-
<conditionalClick selector="{{AdminProductGridFilterSection.clearAll}}" dependentSelector="{{AdminProductGridFilterSection.clearAll}}" stepKey="clearAll" visible="true"/>
50+
<conditionalClick selector="{{AdminProductGridFilterSection.clearAll}}" dependentSelector="{{AdminProductGridFilterSection.clearAll}}" visible="true" stepKey="clearAll"/>
4851
<actionGroup ref="searchProductGridByKeyword" stepKey="searchForProduct">
4952
<argument name="keyword" value="ApiConfigurableProduct.name"/>
5053
</actionGroup>
@@ -59,25 +62,25 @@
5962
<!-- Update the description -->
6063
<click selector="{{AdminUpdateAttributesSection.toggleDescription}}" stepKey="clickToggleDescription"/>
6164
<fillField selector="{{AdminUpdateAttributesSection.description}}" userInput="MFTF automation!" stepKey="fillDescription"/>
62-
<click selector="{{AdminUpdateAttributesSection.saveButton}}" stepKey="clickSave"/>
63-
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeSaveSuccess"/>
65+
<click selector="{{AdminEditProductAttributesSection.Save}}" stepKey="clickSave"/>
66+
<waitForElementVisible selector="{{AdminProductMessagesSection.successMessage}}" time="60" stepKey="waitForSuccessMessage"/>
67+
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeAttributeUpdateSuccessMsg"/>
6468

6569
<!-- Run cron twice -->
66-
<magentoCLI command="cron:run" stepKey="runCron1"/>
67-
<magentoCLI command="cron:run" stepKey="runCron2"/>
68-
<reloadPage stepKey="refreshPage"/>
69-
<waitForPageLoad stepKey="waitFormToReload1"/>
70+
<magentoCLI command="cron:run" arguments="--group=consumers" stepKey="runCron1"/>
71+
<magentoCLI command="cron:run" arguments="--group=consumers" stepKey="runCron2"/>
72+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
7073

7174
<!-- Check storefront for description -->
72-
<amOnPage url="$$createProduct1.sku$$.html" stepKey="gotoProduct1"/>
73-
<waitForPageLoad stepKey="wait3"/>
74-
<see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="MFTF automation!" stepKey="seeDescription1"/>
75-
<amOnPage url="$$createProduct2.sku$$.html" stepKey="gotoProduct2"/>
76-
<waitForPageLoad stepKey="wait4"/>
77-
<see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="MFTF automation!" stepKey="seeDescription2"/>
78-
<amOnPage url="$$createProduct3.sku$$.html" stepKey="gotoProduct3"/>
79-
<waitForPageLoad stepKey="wait5"/>
80-
<see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="MFTF automation!" stepKey="seeDescription3"/>
75+
<amOnPage url="{{StorefrontProductPage.url($$createProduct1.custom_attributes[url_key]$$)}}" stepKey="goToFirstProductPageOnStorefront"/>
76+
<waitForPageLoad stepKey="waitForFirstProductPageLoad"/>
77+
<see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="MFTF automation!" stepKey="seeFirstDescription"/>
78+
<amOnPage url="{{StorefrontProductPage.url($$createProduct2.custom_attributes[url_key]$$)}}" stepKey="goToSecondProductPageOnStorefront"/>
79+
<waitForPageLoad stepKey="waitForSecondProductPageLoad"/>
80+
<see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="MFTF automation!" stepKey="seeSecondDescription"/>
81+
<amOnPage url="{{StorefrontProductPage.url($$createProduct3.custom_attributes[url_key]$$)}}" stepKey="goToThirdProductPageOnStorefront"/>
82+
<waitForPageLoad stepKey="waitForThirdProductPageLoad"/>
83+
<see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="MFTF automation!" stepKey="seeThirdDescription"/>
8184
</test>
8285

8386
<test name="AdminConfigurableProductRemoveAnOptionTest">

0 commit comments

Comments
 (0)