Skip to content

Commit 4aaa428

Browse files
committed
Merge branch 'ACQE-4048-2' of github.com:magento-gl/magento2ce into stability_control
2 parents 3324a0b + 02b28ba commit 4aaa428

File tree

1 file changed

+82
-77
lines changed

1 file changed

+82
-77
lines changed

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

Lines changed: 82 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -20,108 +20,113 @@
2020

2121
<before>
2222
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23-
<actionGroup ref="UpdateAllIndexerByScheduleActionGroup" stepKey="updateAnIndexerBySchedule"/>
24-
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
25-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="performReindex">
26-
<argument name="indices" value=""/>
27-
</actionGroup>
28-
<actionGroup ref="CliCacheFlushActionGroup" stepKey="cleanCache">
29-
<argument name="tags" value=""/>
30-
</actionGroup>
23+
<comment userInput="BIC workaround" stepKey="updateAnIndexerBySchedule"/>
24+
<comment userInput="BIC workaround" stepKey="enableFlatRate"/>
25+
<comment userInput="BIC workaround" stepKey="performReindex"/>
26+
<comment userInput="BIC workaround" stepKey="cleanCache"/>
27+
28+
<!-- Create category for configurable product -->
29+
<createData entity="SimpleSubCategory" stepKey="firstSimpleCategory"/>
30+
31+
<!-- Create configurable product with two options -->
32+
<createData entity="ApiConfigurableProduct" stepKey="createFirstConfigProduct">
33+
<requiredEntity createDataKey="firstSimpleCategory"/>
34+
</createData>
35+
<createData entity="productAttributeWithTwoOptions" stepKey="createFirstConfigProductAttribute"/>
36+
<createData entity="productAttributeOption1" stepKey="createFirstConfigProductAttributeFirstOption">
37+
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
38+
</createData>
39+
<createData entity="productAttributeOption2" stepKey="createFirstConfigProductAttributeSecondOption">
40+
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
41+
</createData>
42+
<createData entity="AddToDefaultSet" stepKey="addFirstProductToAttributeSet">
43+
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
44+
</createData>
45+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getFirstConfigAttributeFirstOption">
46+
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
47+
</getData>
48+
49+
<!-- Create one child product for configurable product -->
50+
<createData entity="ApiSimpleOne" stepKey="createFirstConfigFirstChildProduct">
51+
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
52+
<requiredEntity createDataKey="getFirstConfigAttributeFirstOption"/>
53+
</createData>
54+
<createData entity="ConfigurableProductOneOption" stepKey="createFirstConfigProductOption">
55+
<requiredEntity createDataKey="createFirstConfigProduct"/>
56+
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
57+
<requiredEntity createDataKey="getFirstConfigAttributeFirstOption"/>
58+
</createData>
59+
<createData entity="ConfigurableProductAddChild" stepKey="createFirstConfigProductAddFirstChild">
60+
<requiredEntity createDataKey="createFirstConfigProduct"/>
61+
<requiredEntity createDataKey="createFirstConfigFirstChildProduct"/>
62+
</createData>
3163
</before>
3264

3365
<after>
3466
<deleteData createDataKey="createFirstConfigProduct" stepKey="deleteConfigProduct"/>
3567
<deleteData createDataKey="createFirstConfigFirstChildProduct" stepKey="deleteFirstConfigFirstChildProduct"/>
3668
<deleteData createDataKey="firstSimpleCategory" stepKey="deleteCategory"/>
3769
<deleteData createDataKey="createFirstConfigProductAttribute" stepKey="deleteFirstConfigProductAttribute"/>
38-
<comment userInput="The test was moved to elasticsearch suite" stepKey="resetCatalogSearchConfiguration"/>
39-
<actionGroup ref="AdminAllIndexerSetUpdateOnSaveActionGroup" stepKey="resetIndexerBackToOriginalState"/>
70+
<comment userInput="BIC workaround" stepKey="resetCatalogSearchConfiguration"/>
71+
<comment userInput="BIC workaround" stepKey="resetIndexerBackToOriginalState"/>
4072
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="performReindex">
4173
<argument name="indices" value=""/>
4274
</actionGroup>
43-
<actionGroup ref="CliCacheFlushActionGroup" stepKey="cleanCache">
44-
<argument name="tags" value=""/>
75+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
76+
<argument name="tags" value="full_page"/>
4577
</actionGroup>
4678
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
4779
</after>
4880

49-
<!-- Create category for configurable product -->
50-
<createData entity="SimpleSubCategory" stepKey="firstSimpleCategory"/>
51-
52-
<!-- Create configurable product with two options -->
53-
<createData entity="ApiConfigurableProduct" stepKey="createFirstConfigProduct">
54-
<requiredEntity createDataKey="firstSimpleCategory"/>
55-
</createData>
56-
57-
<createData entity="productAttributeWithTwoOptions" stepKey="createFirstConfigProductAttribute"/>
58-
59-
<createData entity="productAttributeOption1" stepKey="createFirstConfigProductAttributeFirstOption">
60-
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
61-
</createData>
62-
<createData entity="productAttributeOption2" stepKey="createFirstConfigProductAttributeSecondOption">
63-
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
64-
</createData>
65-
66-
<createData entity="AddToDefaultSet" stepKey="addFirstProductToAttributeSet">
67-
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
68-
</createData>
69-
70-
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getFirstConfigAttributeFirstOption">
71-
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
72-
</getData>
73-
74-
<!-- Create one child product for configurable product -->
75-
<createData entity="ApiSimpleOne" stepKey="createFirstConfigFirstChildProduct">
76-
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
77-
<requiredEntity createDataKey="getFirstConfigAttributeFirstOption"/>
78-
</createData>
79-
80-
<createData entity="ConfigurableProductOneOption" stepKey="createFirstConfigProductOption">
81-
<requiredEntity createDataKey="createFirstConfigProduct"/>
82-
<requiredEntity createDataKey="createFirstConfigProductAttribute"/>
83-
<requiredEntity createDataKey="getFirstConfigAttributeFirstOption"/>
84-
</createData>
85-
86-
<createData entity="ConfigurableProductAddChild" stepKey="createFirstConfigProductAddFirstChild">
87-
<requiredEntity createDataKey="createFirstConfigProduct"/>
88-
<requiredEntity createDataKey="createFirstConfigFirstChildProduct"/>
89-
</createData>
81+
<comment userInput="BIC workaround" stepKey="firstSimpleCategory"/>
82+
<comment userInput="BIC workaround" stepKey="createFirstConfigProduct"/>
83+
<comment userInput="BIC workaround" stepKey="createFirstConfigProductAttribute"/>
84+
<comment userInput="BIC workaround" stepKey="createFirstConfigProductAttributeFirstOption"/>
85+
<comment userInput="BIC workaround" stepKey="createFirstConfigProductAttributeSecondOption"/>
86+
<comment userInput="BIC workaround" stepKey="addFirstProductToAttributeSet"/>
87+
<comment userInput="BIC workaround" stepKey="getFirstConfigAttributeFirstOption"/>
88+
<comment userInput="BIC workaround" stepKey="createFirstConfigFirstChildProduct"/>
89+
<comment userInput="BIC workaround" stepKey="createFirstConfigProductOption"/>
90+
<comment userInput="BIC workaround" stepKey="createFirstConfigProductAddFirstChild"/>
91+
92+
<!-- Reindex -->
93+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
94+
<argument name="indices" value=""/>
95+
</actionGroup>
96+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
97+
<argument name="tags" value="full_page"/>
98+
</actionGroup>
9099

91100
<!-- Assert first product in category -->
92-
<magentoCron stepKey="runCron"/>
93-
<magentoCron stepKey="runCron1"/>
94-
95-
<amOnPage url="{{StorefrontCategoryPage.url($$firstSimpleCategory.custom_attributes[url_key]$$)}}" stepKey="goToFirstCategoryPageStorefront"/>
96-
<waitForPageLoad stepKey="waitForFirstCategoryPageLoad"/>
97-
101+
<actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="goToFirstCategoryPageStorefront">
102+
<argument name="categoryUrl" value="$firstSimpleCategory.custom_attributes[url_key]$"/>
103+
</actionGroup>
104+
<comment userInput="BIC workaround" stepKey="waitForFirstCategoryPageLoad"/>
98105
<actionGroup ref="StorefrontCheckCategoryConfigurableProductWithUpdatedPriceActionGroup" stepKey="checkFirstProductPriceInCategory">
99106
<argument name="productName" value="$$createFirstConfigProduct.name$$"/>
100107
<argument name="expectedPrice" value="$$createFirstConfigFirstChildProduct.price$$"/>
101108
</actionGroup>
102109

103-
<!-- Search default simple product in grid -->
104-
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="openProductCatalogPage"/>
105-
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterProductGrid"/>
106-
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="clickFirstRowToOpenDefaultSimpleProduct">
107-
<argument name="product" value="$$createFirstConfigFirstChildProduct$$"/>
110+
<!-- Update simple product price -->
111+
<comment userInput="BIC workaround" stepKey="openProductCatalogPage"/>
112+
<comment userInput="BIC workaround" stepKey="filterProductGrid"/>
113+
<comment userInput="BIC workaround" stepKey="clickFirstRowToOpenDefaultSimpleProduct"/>
114+
<comment userInput="BIC workaround" stepKey="waitUntilProductIsOpened"/>
115+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPage">
116+
<argument name="productId" value="$createFirstConfigFirstChildProduct.id$"/>
108117
</actionGroup>
109-
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitUntilProductIsOpened"/>
110-
111-
<!-- Update default simple product with price -->
118+
<waitForElementVisible selector="{{AdminProductFormSection.productPrice}}" stepKey="waitForProductPriceField"/>
112119
<fillField selector="{{AdminProductFormSection.productPrice}}" userInput="150" stepKey="fillSimpleProductPrice"/>
113-
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickButtonSave"/>
114-
115-
<!-- Verify customer see success message -->
116-
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
120+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickButtonSave"/>
121+
<waitForText selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
117122

118123
<!-- Assert first product in category -->
119-
<magentoCron stepKey="runCron2"/>
120-
<wait time="60" stepKey="waitForUpdateStarts"/>
121-
122-
<amOnPage url="{{StorefrontCategoryPage.url($$firstSimpleCategory.custom_attributes[url_key]$$)}}" stepKey="goToFirstCategoryPageStorefront1"/>
123-
<waitForPageLoad stepKey="waitForFirstCategoryPageLoad1"/>
124-
124+
<comment userInput="BIC workaround" stepKey="runCron1"/>
125+
<comment userInput="BIC workaround" stepKey="waitForUpdateStarts"/>
126+
<actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="goToFirstCategoryPageStorefront1">
127+
<argument name="categoryUrl" value="$firstSimpleCategory.custom_attributes[url_key]$"/>
128+
</actionGroup>
129+
<comment userInput="BIC workaround" stepKey="waitForFirstCategoryPageLoad1"/>
125130
<actionGroup ref="StorefrontCheckCategoryConfigurableProductWithUpdatedPriceActionGroup" stepKey="checkFirstProductPriceInCategory1">
126131
<argument name="productName" value="$$createFirstConfigProduct.name$$"/>
127132
<argument name="expectedPrice" value="150"/>

0 commit comments

Comments
 (0)