|
13 | 13 | <features value="Swatches"/>
|
14 | 14 | <stories value="Values required behavior for text and visual swatch attributes"/>
|
15 | 15 | <title value="Values required setting for text and visual Swatch"/>
|
16 |
| - <description value="Set both text and visual swatch attributes as required, verify product form enforces both; then set both optional and verify save succeeds without selections."/> |
| 16 | + <description value="This test case verifies values required setting for text and visual swatch."/> |
17 | 17 | <severity value="MAJOR"/>
|
18 | 18 | <testCaseId value="AC-5526"/>
|
19 | 19 | <group value="swatches"/>
|
|
54 | 54 | <actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteTextSwatch">
|
55 | 55 | <argument name="productAttributeCode" value="{{textSwatchAttribute.attribute_code}}"/>
|
56 | 56 | </actionGroup>
|
57 |
| - <actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="assertTextSwatchDeleted"/> |
58 | 57 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openVisualSwatchForDelete">
|
59 | 58 | <argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/>
|
60 | 59 | </actionGroup>
|
61 | 60 | <actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteVisualSwatch">
|
62 | 61 | <argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/>
|
63 | 62 | </actionGroup>
|
64 |
| - <actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="assertVisualSwatchDeleted"/> |
65 | 63 | <!-- Cleanup products -->
|
66 | 64 | <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="openCatalog"/>
|
67 | 65 | <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteSuccessProductBySku">
|
|
78 | 76 | </actionGroup>
|
79 | 77 | <selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="Yes" stepKey="setTextSwatchRequiredYes"/>
|
80 | 78 | <actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveTextSwatchAttributeYes"/>
|
81 |
| - <waitForPageLoad stepKey="waitAfterSaveTextSwatchYes"/> |
82 | 79 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openVisualSwatchForEdit">
|
83 | 80 | <argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/>
|
84 | 81 | </actionGroup>
|
85 | 82 | <selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="Yes" stepKey="setVisualSwatchRequiredYes"/>
|
86 | 83 | <actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveVisualSwatchAttributeYes"/>
|
87 |
| - <waitForPageLoad stepKey="waitAfterSaveVisualSwatchYes"/> |
88 | 84 | <!-- Step 3: Make sure a user is obliged to enter values during creation of the Product based on the attributes. -->
|
89 | 85 | <!-- Save with neither swatch selected → expect required error -->
|
90 | 86 | <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goProductIndexRequired"/>
|
|
104 | 100 | <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillMainFormRequiredBeforeVisual">
|
105 | 101 | <argument name="product" value="SimpleProduct"/>
|
106 | 102 | </actionGroup>
|
107 |
| - <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(ProductAttributeFrontendLabel.label)}}" |
108 |
| - userInput="visualSwatchOption2" stepKey="selectOnlyVisualSwatch"/> |
| 103 | + <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(ProductAttributeFrontendLabel.label)}}" userInput="visualSwatchOption2" stepKey="selectOnlyVisualSwatch"/> |
109 | 104 | <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveWithOnlyVisual"/>
|
110 | 105 | <waitForElementVisible selector="{{AdminProductFormSection.attributeFieldError}}" stepKey="seeRequiredErrorTextMissing"/>
|
111 | 106 | <!-- Select only text swatch → expect required error (visual missing) -->
|
|
116 | 111 | <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillMainFormRequiredBeforeText">
|
117 | 112 | <argument name="product" value="SimpleProduct"/>
|
118 | 113 | </actionGroup>
|
119 |
| - <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(textSwatchAttribute.attribute_code)}}" |
120 |
| - userInput="textSwatchOption1" stepKey="selectOnlyTextSwatch"/> |
| 114 | + <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(textSwatchAttribute.attribute_code)}}" userInput="textSwatchOption1" stepKey="selectOnlyTextSwatch"/> |
121 | 115 | <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveWithOnlyText"/>
|
122 | 116 | <waitForElementVisible selector="{{AdminProductFormSection.attributeFieldError}}" stepKey="seeRequiredErrorVisualMissing"/>
|
123 | 117 | <!-- Select both swatches → expect success -->
|
|
128 | 122 | <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillMainFormBeforeSuccess">
|
129 | 123 | <argument name="product" value="SimpleProduct"/>
|
130 | 124 | </actionGroup>
|
131 |
| - <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(textSwatchAttribute.attribute_code)}}" |
132 |
| - userInput="textSwatchOption1" stepKey="selectTextSwatchForSuccess"/> |
133 |
| - <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(ProductAttributeFrontendLabel.label)}}" |
134 |
| - userInput="visualSwatchOption2" stepKey="selectVisualSwatchForSuccess"/> |
| 125 | + <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(textSwatchAttribute.attribute_code)}}" userInput="textSwatchOption1" stepKey="selectTextSwatchForSuccess"/> |
| 126 | + <selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(ProductAttributeFrontendLabel.label)}}" userInput="visualSwatchOption2" stepKey="selectVisualSwatchForSuccess"/> |
135 | 127 | <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveWithBothSelected"/>
|
136 | 128 | <waitForElementVisible selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSavedProductBothRequired"/>
|
137 | 129 | <!-- Step 4: Set both swatch attributes to not required (no) -->
|
|
140 | 132 | </actionGroup>
|
141 | 133 | <selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="No" stepKey="setTextSwatchRequiredToNo"/>
|
142 | 134 | <actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveTextSwatchAttributeToNo"/>
|
143 |
| - <waitForPageLoad stepKey="waitAfterSaveTextSwatchToNo"/> |
144 | 135 | <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openVisualSwatchToUnrequire">
|
145 | 136 | <argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/>
|
146 | 137 | </actionGroup>
|
147 | 138 | <selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="No" stepKey="setVisualSwatchRequiredToNo"/>
|
148 | 139 | <actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveVisualSwatchAttributeToNo"/>
|
149 |
| - <waitForPageLoad stepKey="waitAfterSaveVisualSwatchToNo"/> |
150 | 140 | <!-- Step 5: Leave both swatches empty and save: expect success -->
|
151 | 141 | <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goProductIndexOptional"/>
|
152 | 142 | <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goCreateProductOptional">
|
|
0 commit comments