|
65 | 65 | <!-- Cleanup products -->
|
66 | 66 | <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="openCatalog"/>
|
67 | 67 | <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteSuccessProductBySku">
|
68 |
| - <argument name="sku" value="SwatchSuccSKU"/> |
| 68 | + <argument name="sku" value="{{SimpleProduct.sku}}"/> |
69 | 69 | </actionGroup>
|
70 | 70 | <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteOptionalProductBySku">
|
71 |
| - <argument name="sku" value="SwatchOptSKU"/> |
| 71 | + <argument name="sku" value="{{SimpleProduct3.sku}}"/> |
72 | 72 | </actionGroup>
|
73 | 73 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/>
|
74 | 74 | </after>
|
|
77 | 77 | <argument name="productAttributeCode" value="{{textSwatchAttribute.attribute_code}}"/>
|
78 | 78 | </actionGroup>
|
79 | 79 | <selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="Yes" stepKey="setTextSwatchRequiredYes"/>
|
80 |
| - <waitForElementClickable selector="{{AttributePropertiesSection.Save}}" stepKey="waitToSaveTextSwatchAttributeYes"/> |
81 |
| - <click selector="{{AttributePropertiesSection.Save}}" stepKey="saveTextSwatchAttributeYes"/> |
| 80 | + <actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveTextSwatchAttributeYes"/> |
82 | 81 | <waitForPageLoad stepKey="waitAfterSaveTextSwatchYes"/>
|
83 | 82 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openVisualSwatchForEdit">
|
84 | 83 | <argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/>
|
85 | 84 | </actionGroup>
|
86 | 85 | <selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="Yes" stepKey="setVisualSwatchRequiredYes"/>
|
87 |
| - <waitForElementClickable selector="{{AttributePropertiesSection.Save}}" stepKey="waitToSaveVisualSwatchAttributeYes"/> |
88 |
| - <click selector="{{AttributePropertiesSection.Save}}" stepKey="saveVisualSwatchAttributeYes"/> |
| 86 | + <actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveVisualSwatchAttributeYes"/> |
89 | 87 | <waitForPageLoad stepKey="waitAfterSaveVisualSwatchYes"/>
|
90 | 88 | <!-- Step 3: Make sure a user is obliged to enter values during creation of the Product based on the attributes. -->
|
91 | 89 | <!-- Save with neither swatch selected → expect required error -->
|
|
96 | 94 | <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillMainFormRequired">
|
97 | 95 | <argument name="product" value="SimpleProduct"/>
|
98 | 96 | </actionGroup>
|
99 |
| - <fillField selector="{{AdminProductFormSection.productName}}" userInput="SwatchReqProd" stepKey="updateName"/> |
100 |
| - <fillField selector="{{AdminProductFormSection.productSku}}" userInput="SwatchReqSKU" stepKey="updateSku"/> |
101 | 97 | <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveWithoutAnySwatch"/>
|
102 | 98 | <waitForElementVisible selector="{{AdminProductFormSection.attributeFieldError}}" stepKey="seeRequiredErrorBothMissing"/>
|
103 | 99 | <!-- Select only visual swatch → expect required error (text missing) -->
|
|
132 | 128 | <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillMainFormBeforeSuccess">
|
133 | 129 | <argument name="product" value="SimpleProduct"/>
|
134 | 130 | </actionGroup>
|
135 |
| - <fillField selector="{{AdminProductFormSection.productName}}" userInput="SwatchSuccProd" stepKey="updateNameValue"/> |
136 |
| - <fillField selector="{{AdminProductFormSection.productSku}}" userInput="SwatchSuccSKU" stepKey="updateSkuValue"/> |
137 | 131 | <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(textSwatchAttribute.attribute_code)}}"
|
138 | 132 | userInput="textSwatchOption1" stepKey="selectTextSwatchForSuccess"/>
|
139 | 133 | <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(ProductAttributeFrontendLabel.label)}}"
|
|
145 | 139 | <argument name="productAttributeCode" value="{{textSwatchAttribute.attribute_code}}"/>
|
146 | 140 | </actionGroup>
|
147 | 141 | <selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="No" stepKey="setTextSwatchRequiredToNo"/>
|
148 |
| - <waitForElementClickable selector="{{AttributePropertiesSection.Save}}" stepKey="waitToSaveTextSwatchAttributeToNo"/> |
149 |
| - <click selector="{{AttributePropertiesSection.Save}}" stepKey="saveTextSwatchAttributeToNo"/> |
| 142 | + <actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveTextSwatchAttributeToNo"/> |
150 | 143 | <waitForPageLoad stepKey="waitAfterSaveTextSwatchToNo"/>
|
151 | 144 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openVisualSwatchToUnrequire">
|
152 | 145 | <argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/>
|
153 | 146 | </actionGroup>
|
154 | 147 | <selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="No" stepKey="setVisualSwatchRequiredToNo"/>
|
155 |
| - <waitForElementClickable selector="{{AttributePropertiesSection.Save}}" stepKey="waitToSaveVisualSwatchAttributeToNo"/> |
156 |
| - <click selector="{{AttributePropertiesSection.Save}}" stepKey="saveVisualSwatchAttributeToNo"/> |
| 148 | + <actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveVisualSwatchAttributeToNo"/> |
157 | 149 | <waitForPageLoad stepKey="waitAfterSaveVisualSwatchToNo"/>
|
158 | 150 | <!-- Step 5: Leave both swatches empty and save: expect success -->
|
159 | 151 | <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goProductIndexOptional"/>
|
160 | 152 | <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goCreateProductOptional">
|
161 | 153 | <argument name="product" value="SimpleProduct"/>
|
162 | 154 | </actionGroup>
|
163 | 155 | <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillMainFormOptional">
|
164 |
| - <argument name="product" value="SimpleProduct"/> |
| 156 | + <argument name="product" value="SimpleProduct3"/> |
165 | 157 | </actionGroup>
|
166 |
| - <fillField selector="{{AdminProductFormSection.productName}}" userInput="SwatchOptProd" stepKey="updateTheName"/> |
167 |
| - <fillField selector="{{AdminProductFormSection.productSku}}" userInput="SwatchOptSKU" stepKey="updateTheSku"/> |
168 | 158 | <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveNoSwatchesOptional"/>
|
169 | 159 | <waitForElementVisible selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSavedProductBothOptional"/>
|
170 | 160 | </test>
|
|
0 commit comments