Skip to content

Commit a644091

Browse files
committed
ACQE-8489: Verify values required setting for text and visual swatch.
- Removed wait for page load and product attribute removal assertion in test file.
1 parent fe62b6e commit a644091

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

app/code/Magento/Swatches/Test/Mftf/Test/AdminSwatchValuesRequiredBehaviorTest.xml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<features value="Swatches"/>
1414
<stories value="Values required behavior for text and visual swatch attributes"/>
1515
<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."/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="AC-5526"/>
1919
<group value="swatches"/>
@@ -54,14 +54,12 @@
5454
<actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteTextSwatch">
5555
<argument name="productAttributeCode" value="{{textSwatchAttribute.attribute_code}}"/>
5656
</actionGroup>
57-
<actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="assertTextSwatchDeleted"/>
5857
<actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openVisualSwatchForDelete">
5958
<argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/>
6059
</actionGroup>
6160
<actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteVisualSwatch">
6261
<argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/>
6362
</actionGroup>
64-
<actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="assertVisualSwatchDeleted"/>
6563
<!-- Cleanup products -->
6664
<actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="openCatalog"/>
6765
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteSuccessProductBySku">
@@ -78,13 +76,11 @@
7876
</actionGroup>
7977
<selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="Yes" stepKey="setTextSwatchRequiredYes"/>
8078
<actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveTextSwatchAttributeYes"/>
81-
<waitForPageLoad stepKey="waitAfterSaveTextSwatchYes"/>
8279
<actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openVisualSwatchForEdit">
8380
<argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/>
8481
</actionGroup>
8582
<selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="Yes" stepKey="setVisualSwatchRequiredYes"/>
8683
<actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveVisualSwatchAttributeYes"/>
87-
<waitForPageLoad stepKey="waitAfterSaveVisualSwatchYes"/>
8884
<!-- Step 3: Make sure a user is obliged to enter values during creation of the Product based on the attributes. -->
8985
<!-- Save with neither swatch selected → expect required error -->
9086
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goProductIndexRequired"/>
@@ -104,8 +100,7 @@
104100
<actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillMainFormRequiredBeforeVisual">
105101
<argument name="product" value="SimpleProduct"/>
106102
</actionGroup>
107-
<selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(ProductAttributeFrontendLabel.label)}}"
108-
userInput="visualSwatchOption2" stepKey="selectOnlyVisualSwatch"/>
103+
<selectOption selector="{{AdminProductFormSection.attributeRequiredInputField(ProductAttributeFrontendLabel.label)}}" userInput="visualSwatchOption2" stepKey="selectOnlyVisualSwatch"/>
109104
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveWithOnlyVisual"/>
110105
<waitForElementVisible selector="{{AdminProductFormSection.attributeFieldError}}" stepKey="seeRequiredErrorTextMissing"/>
111106
<!-- Select only text swatch → expect required error (visual missing) -->
@@ -116,8 +111,7 @@
116111
<actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillMainFormRequiredBeforeText">
117112
<argument name="product" value="SimpleProduct"/>
118113
</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"/>
121115
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveWithOnlyText"/>
122116
<waitForElementVisible selector="{{AdminProductFormSection.attributeFieldError}}" stepKey="seeRequiredErrorVisualMissing"/>
123117
<!-- Select both swatches → expect success -->
@@ -128,10 +122,8 @@
128122
<actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillMainFormBeforeSuccess">
129123
<argument name="product" value="SimpleProduct"/>
130124
</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"/>
135127
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveWithBothSelected"/>
136128
<waitForElementVisible selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSavedProductBothRequired"/>
137129
<!-- Step 4: Set both swatch attributes to not required (no) -->
@@ -140,13 +132,11 @@
140132
</actionGroup>
141133
<selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="No" stepKey="setTextSwatchRequiredToNo"/>
142134
<actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveTextSwatchAttributeToNo"/>
143-
<waitForPageLoad stepKey="waitAfterSaveTextSwatchToNo"/>
144135
<actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openVisualSwatchToUnrequire">
145136
<argument name="productAttributeCode" value="{{ProductAttributeFrontendLabel.label}}"/>
146137
</actionGroup>
147138
<selectOption selector="{{AttributePropertiesSection.ValueRequired}}" userInput="No" stepKey="setVisualSwatchRequiredToNo"/>
148139
<actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveVisualSwatchAttributeToNo"/>
149-
<waitForPageLoad stepKey="waitAfterSaveVisualSwatchToNo"/>
150140
<!-- Step 5: Leave both swatches empty and save: expect success -->
151141
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goProductIndexOptional"/>
152142
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goCreateProductOptional">

0 commit comments

Comments
 (0)