|
46 | 46 | <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProduct">
|
47 | 47 | <argument name="product" value="$$createConfigProduct$$"/>
|
48 | 48 | </actionGroup>
|
| 49 | + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> |
49 | 50 | <actionGroup ref="AdminDeleteAllProductsFromGridActionGroup" stepKey="selectAndDeleteProducts"/>
|
50 | 51 | <waitForElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="deleteMessage"/>
|
51 | 52 | <click selector="{{AdminProductGridFilterSection.clearFilters}}" stepKey="clickClearFiltersAfter"/>
|
52 | 53 | <!-- Delete color attribute -->
|
53 | 54 | <actionGroup ref="DeleteProductAttributeByCodeActionGroup" stepKey="deleteColorAttribute">
|
54 |
| - <argument name="attribute_code" value="{{colorProductAttribute.default_label}}"/> |
| 55 | + <argument name="attribute_code" value="{{colorProductAttributeWithOptions.default_label}}"/> |
55 | 56 | </actionGroup>
|
56 | 57 | <!-- Delete size attribute -->
|
57 | 58 | <actionGroup ref="DeleteProductAttributeByCodeActionGroup" stepKey="deleteSizeAttribute">
|
58 |
| - <argument name="attribute_code" value="{{sizeAttribute.default_label}}"/> |
| 59 | + <argument name="attribute_code" value="{{sizeProductAttributeWithOptions.default_label}}"/> |
59 | 60 | </actionGroup>
|
60 | 61 | <magentoCLI command="config:set {{CatalogInventoryOptionsShowOutOfStockDisable.path}} {{CatalogInventoryOptionsShowOutOfStockDisable.value}}" stepKey="setConfigShowOutOfStockFalse"/>
|
61 | 62 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
|
65 | 66 | <!-- Step 2 - Navigate to Stores > Attributes > Products > Product Attribute-->
|
66 | 67 | <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid" />
|
67 | 68 | <actionGroup ref="FillProductAttributeFieldsActionGroup" stepKey="fillColorAttributeFields">
|
68 |
| - <argument name="attributeLabel" value="{{colorProductAttribute.default_label}}" /> |
69 |
| - <argument name="attributeCode" value="{{colorProductAttribute.default_label}}" /> |
70 |
| - <argument name="inputType" value="{{textSwatchAttribute.input_type}}" /> |
71 |
| - <argument name="scope" value="{{productAttributeDropdownTwoOptions.scope}}" /> |
| 69 | + <argument name="attributeLabel" value="{{colorProductAttributeWithOptions.default_label}}" /> |
| 70 | + <argument name="attributeCode" value="{{colorProductAttributeWithOptions.default_label}}" /> |
| 71 | + <argument name="inputType" value="{{colorProductAttributeWithOptions.input_type}}" /> |
| 72 | + <argument name="scope" value="{{colorProductAttributeWithOptions.scope}}" /> |
72 | 73 | </actionGroup>
|
| 74 | + <waitForElementVisible selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddBlackSwatch" /> |
73 | 75 | <click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddBlackSwatch"/>
|
74 | 76 | <waitForAjaxLoad stepKey="waitForAjaxLoad"/>
|
75 | 77 | <actionGroup ref="AdminAddTextSwatchForAdminActionGroup" stepKey="addBlackSwatchOption">
|
76 | 78 | <argument name="position" value="0"/>
|
77 |
| - <argument name="swatchName" value="Black"/> |
78 |
| - <argument name="swatchDescription" value="Black"/> |
| 79 | + <argument name="swatchName" value="{{colorProductAttributeWithOptions.option1}}"/> |
| 80 | + <argument name="swatchDescription" value="{{colorProductAttributeWithOptions.option1}}"/> |
79 | 81 | </actionGroup>
|
| 82 | + <waitForElementVisible selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddBlueSwatch" /> |
80 | 83 | <click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddBlueSwatch"/>
|
81 | 84 | <waitForAjaxLoad stepKey="waitForAjaxLoad1"/>
|
82 | 85 | <actionGroup ref="AdminAddTextSwatchForAdminActionGroup" stepKey="addBlueSwatchOption">
|
83 | 86 | <argument name="position" value="1"/>
|
84 |
| - <argument name="swatchName" value="Blue"/> |
85 |
| - <argument name="swatchDescription" value="Blue"/> |
| 87 | + <argument name="swatchName" value="{{colorProductAttributeWithOptions.option2}}"/> |
| 88 | + <argument name="swatchDescription" value="{{colorProductAttributeWithOptions.option2}}"/> |
86 | 89 | </actionGroup>
|
| 90 | + <waitForElementVisible selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddWhiteSwatch" /> |
87 | 91 | <click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddWhiteSwatch"/>
|
88 | 92 | <waitForAjaxLoad stepKey="waitForAjaxLoad2"/>
|
89 | 93 | <actionGroup ref="AdminAddTextSwatchForAdminActionGroup" stepKey="addWhiteSwatchOption">
|
90 | 94 | <argument name="position" value="2"/>
|
91 |
| - <argument name="swatchName" value="White"/> |
92 |
| - <argument name="swatchDescription" value="White"/> |
| 95 | + <argument name="swatchName" value="{{colorProductAttributeWithOptions.option3}}"/> |
| 96 | + <argument name="swatchDescription" value="{{colorProductAttributeWithOptions.option3}}"/> |
93 | 97 | </actionGroup>
|
| 98 | + <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="waitForColorSaveButton" /> |
94 | 99 | <click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnColorSaveAttribute"/>
|
95 | 100 | <waitForPageLoad stepKey="waitForColorAttributeToSave"/>
|
96 | 101 | <waitForElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeColorSaveProductMessage"/>
|
97 | 102 | <!-- Step 3: Create other new Attribute with label size -->
|
98 | 103 | <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid1" />
|
99 | 104 | <actionGroup ref="FillProductAttributeFieldsActionGroup" stepKey="fillSizeAttributeFields">
|
100 |
| - <argument name="attributeLabel" value="{{sizeAttribute.default_label}}" /> |
101 |
| - <argument name="attributeCode" value="{{sizeAttribute.default_label}}" /> |
102 |
| - <argument name="inputType" value="{{textSwatchAttribute.input_type}}" /> |
103 |
| - <argument name="scope" value="{{productAttributeDropdownTwoOptions.scope}}" /> |
| 105 | + <argument name="attributeLabel" value="{{sizeProductAttributeWithOptions.default_label}}" /> |
| 106 | + <argument name="attributeCode" value="{{sizeProductAttributeWithOptions.default_label}}" /> |
| 107 | + <argument name="inputType" value="{{sizeProductAttributeWithOptions.input_type}}" /> |
| 108 | + <argument name="scope" value="{{sizeProductAttributeWithOptions.scope}}" /> |
104 | 109 | </actionGroup>
|
| 110 | + <waitForElementVisible selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddSmallSwatch" /> |
105 | 111 | <click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSmallSwatch"/>
|
106 | 112 | <waitForAjaxLoad stepKey="waitForAjaxLoad3"/>
|
107 | 113 | <actionGroup ref="AdminAddTextSwatchForAdminActionGroup" stepKey="addSmallSwatchOption">
|
108 | 114 | <argument name="position" value="0"/>
|
109 |
| - <argument name="swatchName" value="Small"/> |
110 |
| - <argument name="swatchDescription" value="Small"/> |
| 115 | + <argument name="swatchName" value="{{sizeProductAttributeWithOptions.option1}}"/> |
| 116 | + <argument name="swatchDescription" value="{{sizeProductAttributeWithOptions.option1}}"/> |
111 | 117 | </actionGroup>
|
| 118 | + <waitForElementVisible selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddMediumSwatch" /> |
112 | 119 | <click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddMediumSwatch"/>
|
113 | 120 | <waitForAjaxLoad stepKey="waitForAjaxLoad4"/>
|
114 | 121 | <actionGroup ref="AdminAddTextSwatchForAdminActionGroup" stepKey="addMediumSwatchOption">
|
115 | 122 | <argument name="position" value="1"/>
|
116 |
| - <argument name="swatchName" value="Medium"/> |
117 |
| - <argument name="swatchDescription" value="Medium"/> |
| 123 | + <argument name="swatchName" value="{{sizeProductAttributeWithOptions.option2}}"/> |
| 124 | + <argument name="swatchDescription" value="{{sizeProductAttributeWithOptions.option2}}"/> |
118 | 125 | </actionGroup>
|
| 126 | + <waitForElementVisible selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddLargeSwatch" /> |
119 | 127 | <click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddLargeSwatch"/>
|
120 | 128 | <waitForAjaxLoad stepKey="waitForAjaxLoad5"/>
|
121 | 129 | <actionGroup ref="AdminAddTextSwatchForAdminActionGroup" stepKey="addLargeSwatchOption">
|
122 | 130 | <argument name="position" value="2"/>
|
123 |
| - <argument name="swatchName" value="Large"/> |
124 |
| - <argument name="swatchDescription" value="Large"/> |
| 131 | + <argument name="swatchName" value="{{sizeProductAttributeWithOptions.option3}}"/> |
| 132 | + <argument name="swatchDescription" value="{{sizeProductAttributeWithOptions.option3}}"/> |
125 | 133 | </actionGroup>
|
| 134 | + <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="waitForSizeSaveButton" /> |
126 | 135 | <click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSizeSaveAttribute"/>
|
127 | 136 | <waitForPageLoad stepKey="waitForSizeAttributeToSave"/>
|
128 | 137 | <waitForElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSizeSaveProductMessage"/>
|
129 | 138 | <actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage"/>
|
130 | 139 | <actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openAttributeSetForColor">
|
131 | 140 | <argument name="attributeSetName" value="Default"/>
|
132 | 141 | </actionGroup>
|
133 |
| - <waitForText userInput="{{colorProductAttribute.default_label}}" selector="{{AdminProductAttributeSetEditSection.unassignedAttributesTree}}" stepKey="seeColorAttributeInUnassigned"/> |
| 142 | + <waitForText userInput="{{colorProductAttributeWithOptions.default_label}}" selector="{{AdminProductAttributeSetEditSection.unassignedAttributesTree}}" stepKey="seeColorAttributeInUnassigned"/> |
134 | 143 | <actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignColorAttributeToGroup">
|
135 | 144 | <argument name="group" value="Product Details"/>
|
136 |
| - <argument name="attribute" value="{{colorProductAttribute.default_label}}"/> |
| 145 | + <argument name="attribute" value="{{colorProductAttributeWithOptions.default_label}}"/> |
137 | 146 | </actionGroup>
|
138 |
| - <waitForText userInput="{{sizeAttribute.default_label}}" selector="{{AdminProductAttributeSetEditSection.unassignedAttributesTree}}" stepKey="seeSizeAttributeInUnassigned"/> |
| 147 | + <waitForText userInput="{{sizeProductAttributeWithOptions.default_label}}" selector="{{AdminProductAttributeSetEditSection.unassignedAttributesTree}}" stepKey="seeSizeAttributeInUnassigned"/> |
139 | 148 | <actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignSizeAttributeToGroup">
|
140 | 149 | <argument name="group" value="Product Details"/>
|
141 |
| - <argument name="attribute" value="{{sizeAttribute.default_label}}"/> |
| 150 | + <argument name="attribute" value="{{sizeProductAttributeWithOptions.default_label}}"/> |
142 | 151 | </actionGroup>
|
143 | 152 | <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveSizeAttributeSet"/>
|
144 | 153 | <!-- Step 4 - Edit Configurable Product -->
|
|
149 | 158 | <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct2">
|
150 | 159 | <argument name="product" value="$$createConfigProduct$$"/>
|
151 | 160 | </actionGroup>
|
| 161 | + <waitForElementVisible selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="waitForCreateConfigurations" /> |
152 | 162 | <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnCreateConfigurations"/>
|
153 | 163 | <actionGroup ref="AdminSelectAttributeInConfigurableAttributesGrid" stepKey="selectColorAttribute">
|
154 |
| - <argument name="attributeCode" value="{{colorProductAttribute.default_label}}"/> |
| 164 | + <argument name="attributeCode" value="{{colorProductAttributeWithOptions.default_label}}"/> |
155 | 165 | </actionGroup>
|
156 | 166 | <actionGroup ref="AdminSelectAttributeInConfigurableAttributesGrid" stepKey="selectSizeAttribute">
|
157 |
| - <argument name="attributeCode" value="{{sizeAttribute.default_label}}"/> |
| 167 | + <argument name="attributeCode" value="{{sizeProductAttributeWithOptions.default_label}}"/> |
158 | 168 | </actionGroup>
|
159 | 169 | <actionGroup ref="AdminSelectAllValueOfTwoAttributesPageActionGroup" stepKey="selectColorOptions">
|
160 |
| - <argument name="attributeLabel1" value="{{colorProductAttribute.default_label}}" /> |
161 |
| - <argument name="attributeLabel2" value="{{sizeAttribute.default_label}}" /> |
| 170 | + <argument name="attributeLabel1" value="{{colorProductAttributeWithOptions.default_label}}" /> |
| 171 | + <argument name="attributeLabel2" value="{{sizeProductAttributeWithOptions.default_label}}" /> |
| 172 | + <argument name="quantity" value="100" /> |
162 | 173 | </actionGroup>
|
163 |
| - <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct1"/> |
| 174 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveConfigurableProductAfterGeneratingVariations"/> |
164 | 175 | <!-- Step 5 - open child product and make out of stock -->
|
165 | 176 | <actionGroup ref="AdminOpenChildVariationOfConfigurableProductActionGroup" stepKey="OpenChildVariation">
|
166 | 177 | <argument name="variation" value="$$createConfigProduct.name$$-Blue-Medium" />
|
167 | 178 | </actionGroup>
|
168 | 179 | <switchToNextTab stepKey="switchToConfigChildProductPage"/>
|
169 | 180 | <waitForPageLoad stepKey="waitForProductPageLoad"/>
|
170 |
| - <selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{UpdateAttributeQtyAndStockToOutOfStock.stockAvailability}}" stepKey="selectChildProductStockStatus"/> |
171 |
| - <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct2"/> |
| 181 | + <selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{UpdateAttributeQtyAndStockToOutOfStock.stockAvailability}}" stepKey="setChildProductStockStatusToOutOfStock"/> |
| 182 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductAfterSettingChildProductToOutOfStock"/> |
172 | 183 | <closeTab stepKey="closeConfigChildProductPage"/>
|
173 | 184 | <!-- Step 6 - Navigate to Storefront product page -->
|
174 | 185 | <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage">
|
175 | 186 | <argument name="productUrl" value="$$createConfigProduct.custom_attributes[url_key]$$"/>
|
176 | 187 | </actionGroup>
|
177 | 188 | <!-- Step 7 - Verify Blue Medium combination is disabled -->
|
| 189 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('Blue')}}" stepKey="waitForBlueSwatch" /> |
178 | 190 | <click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('Blue')}}" stepKey="clickBlueSwatch1"/>
|
179 | 191 | <waitForElementVisible selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('Medium')}}" stepKey="waitForMediumSwatchVisible"/>
|
180 | 192 | <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('Medium')}}" userInput="disabled" stepKey="grabMediumAttribute"/>
|
|
184 | 196 | </assertEquals>
|
185 | 197 | <!-- Step 8 - Verify Blue Large combination is enabled -->
|
186 | 198 | <!-- Select Blue color swatch -->
|
| 199 | + <waitForElementVisible selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('Blue')}}" stepKey="waitForBlueSwatchAgain" /> |
187 | 200 | <click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('Blue')}}" stepKey="clickBlueSwatch2"/>
|
188 | 201 | <waitForElementClickable selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('Large')}}" stepKey="waitForLargeSwatchClickable"/>
|
189 | 202 | <click selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel('Large')}}" stepKey="clickLargeSize"/>
|
|
0 commit comments