|
20 | 20 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
|
21 | 21 | <test name="AdminProductMultiselectAttributeUncheckAllOptionsTest">
|
22 | 22 | <annotations>
|
23 |
| - <group value="Catalog"/> |
24 |
| - <title value="Product Attribute of multiselect type can be saved with all options unchecked"/> |
25 | 23 | <features value="Uncheck multiselect attribute options and save the product"/>
|
26 | 24 | <stories value="Save Product Multiselect attribute without selecting any options"/>
|
27 |
| - <description value="Verify that a product attribute of multiselect type can be saved with all options unchecked in the admin product edit page."/> |
| 25 | + <title value="Product Attribute of multiselect type can be saved with all options unchecked"/> |
| 26 | + <description |
| 27 | + value="Verify that a product attribute of multiselect type can be saved with all options unchecked in the admin product edit page."/> |
28 | 28 | <testCaseId value="AC-4856"/>
|
29 | 29 | <severity value="MAJOR"/>
|
| 30 | + <group value="Catalog"/> |
30 | 31 | </annotations>
|
31 | 32 | <before>
|
32 | 33 | <!-- Login as admin -->
|
|
52 | 53 | <argument name="frontName" value="{{multiSelectAttributeWithThreeOptions.option3}}"/>
|
53 | 54 | <argument name="row" value="{{multiSelectAttributeWithThreeOptions.option3}}"/>
|
54 | 55 | </actionGroup>
|
55 |
| - <waitForElement selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton" /> |
56 |
| - <click selector="{{AttributePropertiesSection.Save}}" stepKey="saveAttribute"/> |
| 56 | + <waitForElementVisible selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton"/> |
| 57 | + <actionGroup ref="AdminSaveProductAttributeActionGroup" stepKey="saveMultiSelectAttribute"/> |
57 | 58 | <!-- Pre-condition Step-2 Multiselect Attribute added to default Attribute set -->
|
58 | 59 | <actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage"/>
|
59 | 60 | <actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openDefaultAttributeSet"/>
|
|
71 | 72 | <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct">
|
72 | 73 | <argument name="product" value="$$createSimpleProduct$$"/>
|
73 | 74 | </actionGroup>
|
74 |
| - <waitForElement selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" stepKey="waitForMultiSelectAttributeToSelect" /> |
75 |
| - <selectOption selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" parameterArray="['1','2']" stepKey="selectFirstAndSecondOptions"/> |
| 75 | + <waitForElementVisible |
| 76 | + selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" |
| 77 | + stepKey="waitForMultiSelectAttributeToSelect"/> |
| 78 | + <selectOption |
| 79 | + selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" |
| 80 | + parameterArray="['1','2']" stepKey="selectFirstAndSecondOptions"/> |
76 | 81 | <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/>
|
77 | 82 | </before>
|
78 | 83 | <after>
|
|
91 | 96 | </actionGroup>
|
92 | 97 | <waitForPageLoad stepKey="waitForProductPageLoad"/>
|
93 | 98 | <!-- Step 4 - Uncheck all options of multiselect attribute -->
|
94 |
| - <waitForElement selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" stepKey="waitForMultiSelectAttributeToUnSelect" /> |
95 |
| - <unselectOption selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" parameterArray="['1','2']" stepKey="uncheckAllOptions"/> |
| 99 | + <waitForElement |
| 100 | + selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" |
| 101 | + stepKey="waitForMultiSelectAttributeToUnSelect"/> |
| 102 | + <unselectOption |
| 103 | + selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" |
| 104 | + parameterArray="['1','2']" stepKey="uncheckAllOptions"/> |
96 | 105 | <!-- Step 5 - Save product -->
|
97 | 106 | <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductFormAfterUncheck"/>
|
98 |
| - <waitForElementVisible selector="{{AdminMessagesSection.successMessage}}" stepKey="waitForSuccessMessage"/> |
99 |
| - <seeElement selector="{{AdminMessagesSection.successMessage}}" stepKey="seeSuccessMessage"/> |
100 | 107 | <!-- Assert multiselect attribute has all options unchecked -->
|
101 |
| - <dontSeeOptionIsSelected selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" userInput="1" stepKey="assertOption1NotChecked"/> |
102 |
| - <dontSeeOptionIsSelected selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" userInput="2" stepKey="assertOption2NotChecked"/> |
103 |
| - <dontSeeOptionIsSelected selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" userInput="3" stepKey="assertOption3NotChecked"/> |
| 108 | + <dontSeeOptionIsSelected |
| 109 | + selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" |
| 110 | + userInput="1" stepKey="assertOption1NotChecked"/> |
| 111 | + <dontSeeOptionIsSelected |
| 112 | + selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" |
| 113 | + userInput="2" stepKey="assertOption2NotChecked"/> |
| 114 | + <dontSeeOptionIsSelected |
| 115 | + selector="{{AdminProductFormSection.customSelectAttribute('$$createMultiSelectProductAttributeWith2Options.attribute_code$$')}}" |
| 116 | + userInput="3" stepKey="assertOption3NotChecked"/> |
104 | 117 | </test>
|
105 | 118 | </tests>
|
106 | 119 |
|
0 commit comments