|
20 | 20 | </annotations>
|
21 | 21 |
|
22 | 22 | <before>
|
| 23 | + <!-- Create the attribute we will be modifying --> |
| 24 | + <createData entity="productAttributeWithTwoOptions" stepKey="createModifiableProductAttribute"/> |
| 25 | + |
| 26 | + <!-- Create the two attributes the product will have --> |
| 27 | + <createData entity="productAttributeOption1" stepKey="createModifiableProductAttributeOption1"> |
| 28 | + <requiredEntity createDataKey="createModifiableProductAttribute"/> |
| 29 | + </createData> |
| 30 | + <createData entity="productAttributeOption2" stepKey="createModifiableProductAttributeOption2"> |
| 31 | + <requiredEntity createDataKey="createModifiableProductAttribute"/> |
| 32 | + </createData> |
| 33 | + |
| 34 | + <!-- Add the product to the default set --> |
| 35 | + <createData entity="AddToDefaultSet" stepKey="createModifiableAddToAttributeSet"> |
| 36 | + <requiredEntity createDataKey="createModifiableProductAttribute"/> |
| 37 | + </createData> |
| 38 | + |
23 | 39 | <!-- TODO: This should be converted to an actionGroup once MQE-993 is fixed. -->
|
24 | 40 | <!-- Create the category the product will be a part of -->
|
25 | 41 | <createData entity="ApiCategory" stepKey="createCategory"/>
|
|
87 | 103 | <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
|
88 | 104 | <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/>
|
89 | 105 | <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
|
| 106 | + <deleteData createDataKey="createModifiableProductAttribute" stepKey="deleteModifiableProductAttribute"/> |
90 | 107 | <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
|
91 | 108 | </after>
|
92 | 109 |
|
93 | 110 | <!-- Get the current option of the attribute before it was changed -->
|
94 | 111 | <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage"/>
|
95 |
| - <waitForPageLoad stepKey="waitForStoreFrontProductPageLoad" /> |
96 |
| - <grabTextFrom stepKey="getBeforeOption" selector="{{StorefrontProductInfoMainSection.nthAttributeOnPage('1')}}" /> |
| 112 | + <waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/> |
| 113 | + |
| 114 | + <grabTextFrom stepKey="getBeforeOption" selector="{{StorefrontProductInfoMainSection.nthAttributeOnPage('1')}}"/> |
97 | 115 |
|
98 | 116 | <!-- Find the product that we just created using the product grid -->
|
99 | 117 | <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
|
| 118 | + <waitForPageLoad stepKey="waitForAdminProductPageLoad"/> |
100 | 119 | <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/>
|
101 | 120 | <actionGroup ref="filterProductGridBySku" stepKey="findCreatedProduct">
|
102 |
| - <argument name="product" value="ApiConfigurableProduct" /> |
| 121 | + <argument name="product" value="ApiConfigurableProduct"/> |
103 | 122 | </actionGroup>
|
| 123 | + <waitForPageLoad stepKey="waitForProductFilterLoad"/> |
104 | 124 |
|
105 | 125 | <click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
|
106 |
| - <waitForPageLoad stepKey="waitForProductPageLoad" /> |
| 126 | + <waitForPageLoad stepKey="waitForProductPageLoad"/> |
107 | 127 |
|
108 | 128 | <!-- change the option on the first attribute -->
|
109 |
| - <click stepKey="clickFirstAttribute" selector="{{ModifyAttributes.nthExistingAttribute('1')}}" /> |
110 |
| - <click stepKey="clickSecondAttributeOption" selector="{{ModifyAttributes.nthAttributeOption('1', '2')}}" /> |
| 129 | + <selectOption stepKey="clickFirstAttribute" selector="{{ModifyAttributes.nthExistingAttribute($$createModifiableProductAttribute.default_frontend_label$$)}}" userInput="option1"/> |
111 | 130 |
|
112 | 131 | <!-- Save the product -->
|
113 |
| - <click stepKey="saveProductAttribute" selector="{{AdminProductFormActionSection.saveButton}}" /> |
114 |
| - <waitForPageLoad stepKey="waitForProductSaved" /> |
115 |
| - <see stepKey="assertSuccess" selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product." /> |
| 132 | + <click stepKey="saveProductAttribute" selector="{{AdminProductFormActionSection.saveButton}}"/> |
| 133 | + <see stepKey="assertSuccess" selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."/> |
116 | 134 |
|
117 | 135 | <!-- Go back to the configurable product page and check to see if it has changed -->
|
118 | 136 | <amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage2"/>
|
119 |
| - <waitForPageLoad stepKey="waitForStoreFrontProductPageLoad2" /> |
120 |
| - <grabTextFrom stepKey="getCurrentOption" selector="{{StorefrontProductInfoMainSection.nthAttributeOnPage('1')}}" /> |
| 137 | + <waitForPageLoad stepKey="waitForStoreFrontProductPageLoad2"/> |
| 138 | + <grabTextFrom stepKey="getCurrentOption" selector="{{StorefrontProductInfoMainSection.nthAttributeOnPage('1')}}"/> |
121 | 139 | <assertNotEquals expected="{$getBeforeOption}" expectedType="string" actual="{$getCurrentOption}" actualType="string" stepKey="assertNotEquals"/>
|
122 | 140 |
|
123 | 141 | </test>
|
|
0 commit comments