|
23 | 23 | <comment userInput="BIC workaround" stepKey="enableFlatRate"/>
|
24 | 24 | <comment userInput="BIC workaround" stepKey="performReindex"/>
|
25 | 25 | <comment userInput="BIC workaround" stepKey="cleanCache"/>
|
| 26 | + |
| 27 | + <!-- Create category for configurable product --> |
| 28 | + <createData entity="SimpleSubCategory" stepKey="firstSimpleCategory"/> |
| 29 | + |
| 30 | + <!-- Create configurable product with two options --> |
| 31 | + <createData entity="ApiConfigurableProduct" stepKey="createFirstConfigProduct"> |
| 32 | + <requiredEntity createDataKey="firstSimpleCategory"/> |
| 33 | + </createData> |
| 34 | + <createData entity="productAttributeWithTwoOptions" stepKey="createFirstConfigProductAttribute"/> |
| 35 | + <createData entity="productAttributeOption1" stepKey="createFirstConfigProductAttributeFirstOption"> |
| 36 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 37 | + </createData> |
| 38 | + <createData entity="productAttributeOption2" stepKey="createFirstConfigProductAttributeSecondOption"> |
| 39 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 40 | + </createData> |
| 41 | + <createData entity="AddToDefaultSet" stepKey="addFirstProductToAttributeSet"> |
| 42 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 43 | + </createData> |
| 44 | + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getFirstConfigAttributeFirstOption"> |
| 45 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 46 | + </getData> |
| 47 | + |
| 48 | + <!-- Create one child product for configurable product --> |
| 49 | + <createData entity="ApiSimpleOne" stepKey="createFirstConfigFirstChildProduct"> |
| 50 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 51 | + <requiredEntity createDataKey="getFirstConfigAttributeFirstOption"/> |
| 52 | + </createData> |
| 53 | + <createData entity="ConfigurableProductOneOption" stepKey="createFirstConfigProductOption"> |
| 54 | + <requiredEntity createDataKey="createFirstConfigProduct"/> |
| 55 | + <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
| 56 | + <requiredEntity createDataKey="getFirstConfigAttributeFirstOption"/> |
| 57 | + </createData> |
| 58 | + <createData entity="ConfigurableProductAddChild" stepKey="createFirstConfigProductAddFirstChild"> |
| 59 | + <requiredEntity createDataKey="createFirstConfigProduct"/> |
| 60 | + <requiredEntity createDataKey="createFirstConfigFirstChildProduct"/> |
| 61 | + </createData> |
26 | 62 | </before>
|
27 | 63 |
|
28 | 64 | <after>
|
|
32 | 68 | <deleteData createDataKey="createFirstConfigProductAttribute" stepKey="deleteFirstConfigProductAttribute"/>
|
33 | 69 | <comment userInput="BIC workaround" stepKey="resetCatalogSearchConfiguration"/>
|
34 | 70 | <comment userInput="BIC workaround" stepKey="resetIndexerBackToOriginalState"/>
|
35 |
| - <comment userInput="BIC workaround" stepKey="performReindex"/> |
36 |
| - <comment userInput="BIC workaround" stepKey="cleanCache"/> |
| 71 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="performReindex"> |
| 72 | + <argument name="indices" value=""/> |
| 73 | + </actionGroup> |
| 74 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> |
| 75 | + <argument name="tags" value="full_page"/> |
| 76 | + </actionGroup> |
37 | 77 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
|
38 | 78 | </after>
|
39 | 79 |
|
40 |
| - <!-- Create category for configurable product --> |
41 |
| - <createData entity="SimpleSubCategory" stepKey="firstSimpleCategory"/> |
42 |
| - |
43 |
| - <!-- Create configurable product with two options --> |
44 |
| - <createData entity="ApiConfigurableProduct" stepKey="createFirstConfigProduct"> |
45 |
| - <requiredEntity createDataKey="firstSimpleCategory"/> |
46 |
| - </createData> |
47 |
| - |
48 |
| - <createData entity="productAttributeWithTwoOptions" stepKey="createFirstConfigProductAttribute"/> |
49 |
| - |
50 |
| - <createData entity="productAttributeOption1" stepKey="createFirstConfigProductAttributeFirstOption"> |
51 |
| - <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
52 |
| - </createData> |
53 |
| - <createData entity="productAttributeOption2" stepKey="createFirstConfigProductAttributeSecondOption"> |
54 |
| - <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
55 |
| - </createData> |
56 |
| - |
57 |
| - <createData entity="AddToDefaultSet" stepKey="addFirstProductToAttributeSet"> |
58 |
| - <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
59 |
| - </createData> |
60 |
| - |
61 |
| - <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getFirstConfigAttributeFirstOption"> |
62 |
| - <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
63 |
| - </getData> |
64 |
| - |
65 |
| - <!-- Create one child product for configurable product --> |
66 |
| - <createData entity="ApiSimpleOne" stepKey="createFirstConfigFirstChildProduct"> |
67 |
| - <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
68 |
| - <requiredEntity createDataKey="getFirstConfigAttributeFirstOption"/> |
69 |
| - </createData> |
70 |
| - |
71 |
| - <createData entity="ConfigurableProductOneOption" stepKey="createFirstConfigProductOption"> |
72 |
| - <requiredEntity createDataKey="createFirstConfigProduct"/> |
73 |
| - <requiredEntity createDataKey="createFirstConfigProductAttribute"/> |
74 |
| - <requiredEntity createDataKey="getFirstConfigAttributeFirstOption"/> |
75 |
| - </createData> |
76 |
| - |
77 |
| - <createData entity="ConfigurableProductAddChild" stepKey="createFirstConfigProductAddFirstChild"> |
78 |
| - <requiredEntity createDataKey="createFirstConfigProduct"/> |
79 |
| - <requiredEntity createDataKey="createFirstConfigFirstChildProduct"/> |
80 |
| - </createData> |
| 80 | + <comment userInput="BIC workaround" stepKey="firstSimpleCategory"/> |
| 81 | + <comment userInput="BIC workaround" stepKey="createFirstConfigProduct"/> |
| 82 | + <comment userInput="BIC workaround" stepKey="createFirstConfigProductAttribute"/> |
| 83 | + <comment userInput="BIC workaround" stepKey="createFirstConfigProductAttributeFirstOption"/> |
| 84 | + <comment userInput="BIC workaround" stepKey="createFirstConfigProductAttributeSecondOption"/> |
| 85 | + <comment userInput="BIC workaround" stepKey="addFirstProductToAttributeSet"/> |
| 86 | + <comment userInput="BIC workaround" stepKey="getFirstConfigAttributeFirstOption"/> |
| 87 | + <comment userInput="BIC workaround" stepKey="createFirstConfigFirstChildProduct"/> |
| 88 | + <comment userInput="BIC workaround" stepKey="createFirstConfigProductOption"/> |
| 89 | + <comment userInput="BIC workaround" stepKey="createFirstConfigProductAddFirstChild"/> |
81 | 90 |
|
82 | 91 | <!-- Reindex -->
|
83 | 92 | <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
|
|
88 | 97 | </actionGroup>
|
89 | 98 |
|
90 | 99 | <!-- Assert first product in category -->
|
91 |
| - <amOnPage url="{{StorefrontCategoryPage.url($$firstSimpleCategory.custom_attributes[url_key]$$)}}" stepKey="goToFirstCategoryPageStorefront"/> |
92 |
| - <waitForPageLoad stepKey="waitForFirstCategoryPageLoad"/> |
93 |
| - |
| 100 | + <actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="goToFirstCategoryPageStorefront"> |
| 101 | + <argument name="categoryUrl" value="$firstSimpleCategory.custom_attributes[url_key]$"/> |
| 102 | + </actionGroup> |
| 103 | + <comment userInput="BIC workaround" stepKey="waitForFirstCategoryPageLoad"/> |
94 | 104 | <actionGroup ref="StorefrontCheckCategoryConfigurableProductWithUpdatedPriceActionGroup" stepKey="checkFirstProductPriceInCategory">
|
95 | 105 | <argument name="productName" value="$$createFirstConfigProduct.name$$"/>
|
96 | 106 | <argument name="expectedPrice" value="$$createFirstConfigFirstChildProduct.price$$"/>
|
97 | 107 | </actionGroup>
|
98 | 108 |
|
99 |
| - <!-- Update default simple product with price --> |
| 109 | + <!-- Update simple product price --> |
100 | 110 | <comment userInput="BIC workaround" stepKey="openProductCatalogPage"/>
|
101 | 111 | <comment userInput="BIC workaround" stepKey="filterProductGrid"/>
|
102 | 112 | <comment userInput="BIC workaround" stepKey="clickFirstRowToOpenDefaultSimpleProduct"/>
|
103 | 113 | <comment userInput="BIC workaround" stepKey="waitUntilProductIsOpened"/>
|
104 | 114 | <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPage">
|
105 | 115 | <argument name="productId" value="$createFirstConfigFirstChildProduct.id$"/>
|
106 | 116 | </actionGroup>
|
| 117 | + <waitForElementVisible selector="{{AdminProductFormSection.productPrice}}" stepKey="waitForProductPriceField"/> |
107 | 118 | <fillField selector="{{AdminProductFormSection.productPrice}}" userInput="150" stepKey="fillSimpleProductPrice"/>
|
108 | 119 | <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickButtonSave"/>
|
109 |
| - |
110 |
| - <!-- Verify customer see success message --> |
111 | 120 | <waitForText selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
|
112 | 121 |
|
113 | 122 | <!-- Assert first product in category -->
|
114 | 123 | <comment userInput="BIC workaround" stepKey="runCron1"/>
|
115 | 124 | <comment userInput="BIC workaround" stepKey="waitForUpdateStarts"/>
|
116 |
| - |
117 |
| - <amOnPage url="{{StorefrontCategoryPage.url($$firstSimpleCategory.custom_attributes[url_key]$$)}}" stepKey="goToFirstCategoryPageStorefront1"/> |
118 |
| - <waitForPageLoad stepKey="waitForFirstCategoryPageLoad1"/> |
119 |
| - |
| 125 | + <actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="goToFirstCategoryPageStorefront1"> |
| 126 | + <argument name="categoryUrl" value="$firstSimpleCategory.custom_attributes[url_key]$"/> |
| 127 | + </actionGroup> |
| 128 | + <comment userInput="BIC workaround" stepKey="waitForFirstCategoryPageLoad1"/> |
120 | 129 | <actionGroup ref="StorefrontCheckCategoryConfigurableProductWithUpdatedPriceActionGroup" stepKey="checkFirstProductPriceInCategory1">
|
121 | 130 | <argument name="productName" value="$$createFirstConfigProduct.name$$"/>
|
122 | 131 | <argument name="expectedPrice" value="150"/>
|
|
0 commit comments