|
148 | 148 | <waitForPageLoad stepKey="waitForAttributeToSave"/>
|
149 | 149 | <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSuccessMessage"/>
|
150 | 150 | </actionGroup>
|
| 151 | + |
| 152 | + <!--Clicks Add Attribute and adds the given attribute--> |
| 153 | + <actionGroup name="addProductAttributeInProductModal"> |
| 154 | + <arguments> |
| 155 | + <argument name="attributeCode" type="string"/> |
| 156 | + </arguments> |
| 157 | + <click stepKey="addAttribute" selector="{{AdminProductFormActionSection.addAttributeButton}}"/> |
| 158 | + <conditionalClick selector="{{AdminProductAddAttributeModalSection.clearFilters}}" dependentSelector="{{AdminProductAddAttributeModalSection.clearFilters}}" visible="true" stepKey="clearFilters"/> |
| 159 | + <click stepKey="clickFilters" selector="{{AdminProductAddAttributeModalSection.filters}}"/> |
| 160 | + <fillField stepKey="fillCode" selector="{{AdminProductAddAttributeModalSection.attributeCodeFilter}}" userInput="{{attributeCode}}"/> |
| 161 | + <click stepKey="clickApply" selector="{{AdminProductAddAttributeModalSection.applyFilters}}"/> |
| 162 | + <waitForPageLoad stepKey="waitForFilters"/> |
| 163 | + <checkOption selector="{{AdminProductAddAttributeModalSection.firstRowCheckBox}}" stepKey="checkAttribute"/> |
| 164 | + <click stepKey="addSelected" selector="{{AdminProductAddAttributeModalSection.addSelected}}"/> |
| 165 | + </actionGroup> |
| 166 | + |
| 167 | + <!--Clicks createNewAttribute and fills out form--> |
| 168 | + <actionGroup name="createProductAttribute"> |
| 169 | + <arguments> |
| 170 | + <argument name="attribute" type="entity" defaultValue="productAttributeWysiwyg"/> |
| 171 | + </arguments> |
| 172 | + <click stepKey="createNewAttribute" selector="{{AdminProductAttributeGridSection.NewAttribute}}"/> |
| 173 | + <fillField stepKey="fillDefaultLabel" selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="{{attribute.attribute_code}}"/> |
| 174 | + <selectOption selector="{{AttributePropertiesSection.InputType}}" stepKey="checkInputType" userInput="{{attribute.frontend_input}}"/> |
| 175 | + <selectOption selector="{{AttributePropertiesSection.ValueRequired}}" stepKey="checkRequired" userInput="{{attribute.is_required_admin}}"/> |
| 176 | + <click stepKey="saveAttribute" selector="{{AttributePropertiesSection.Save}}"/> |
| 177 | + </actionGroup> |
| 178 | + |
| 179 | + <!-- Inputs text default value and attribute code--> |
| 180 | + <actionGroup name="createProductAttributeWithTextField" extends="createProductAttribute" insertAfter="checkRequired"> |
| 181 | + <click stepKey="openAdvancedProperties" selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}"/> |
| 182 | + <fillField stepKey="fillCode" selector="{{AdvancedAttributePropertiesSection.AttributeCode}}" userInput="{{attribute.attribute_code}}"/> |
| 183 | + <fillField stepKey="fillDefaultValue" selector="{{AdvancedAttributePropertiesSection.DefaultValueText}}" userInput="{{attribute.default_value}}"/> |
| 184 | + </actionGroup> |
| 185 | + |
| 186 | + <!-- Inputs date default value and attribute code--> |
| 187 | + <actionGroup name="createProductAttributeWithDateField" extends="createProductAttribute" insertAfter="checkRequired"> |
| 188 | + <arguments> |
| 189 | + <argument name="date" type="string"/> |
| 190 | + </arguments> |
| 191 | + <click stepKey="openAdvancedProperties" selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}"/> |
| 192 | + <fillField stepKey="fillCode" selector="{{AdvancedAttributePropertiesSection.AttributeCode}}" userInput="{{attribute.attribute_code}}"/> |
| 193 | + <fillField stepKey="fillDefaultValue" selector="{{AdvancedAttributePropertiesSection.DefaultValueDate}}" userInput="{{date}}"/> |
| 194 | + </actionGroup> |
| 195 | + |
| 196 | + <!-- Creates dropdown option at row without saving--> |
| 197 | + <actionGroup name="createAttributeDropdownNthOption"> |
| 198 | + <arguments> |
| 199 | + <argument name="row" type="string"/> |
| 200 | + <argument name="adminName" type="string"/> |
| 201 | + <argument name="frontName" type="string"/> |
| 202 | + </arguments> |
| 203 | + <click stepKey="clickAddOptions" selector="{{AttributePropertiesSection.dropdownAddOptions}}"/> |
| 204 | + <waitForPageLoad stepKey="waitForNewOption"/> |
| 205 | + <fillField stepKey="fillAdmin" selector="{{AttributePropertiesSection.dropdownNthOptionAdmin(row)}}" userInput="{{adminName}}"/> |
| 206 | + <fillField stepKey="fillStoreView" selector="{{AttributePropertiesSection.dropdownNthOptionDefaultStoreView(row)}}" userInput="{{frontName}}"/> |
| 207 | + </actionGroup> |
| 208 | + |
| 209 | + <!-- Creates dropdown option at row as default--> |
| 210 | + <actionGroup name="createAttributeDropdownNthOptionAsDefault" extends="createAttributeDropdownNthOption"> |
| 211 | + <checkOption selector="{{AttributePropertiesSection.dropdownNthOptionIsDefault(row)}}" stepKey="setAsDefault" after="fillStoreView"/> |
| 212 | + </actionGroup> |
151 | 213 | </actionGroups>
|
0 commit comments