|
19 | 19 | <group value="Swatches"/>
|
20 | 20 | </annotations>
|
21 | 21 | <before>
|
| 22 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
22 | 23 | <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
|
23 | 24 | </before>
|
24 | 25 | <after>
|
25 |
| - <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> |
| 26 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 27 | + <actionGroup ref="logout" stepKey="logout"/> |
26 | 28 | </after>
|
27 | 29 |
|
28 | 30 | <!-- Begin creating a new product attribute of type "Image Swatch" -->
|
|
67 | 69 | <click selector="{{AttributePropertiesSection.AdvancedProperties}}" stepKey="expandAdvancedProperties"/>
|
68 | 70 | <selectOption selector="{{AttributePropertiesSection.Scope}}" userInput="1" stepKey="selectGlobalScope"/>
|
69 | 71 |
|
| 72 | + <scrollToTopOfPage stepKey="scrollToTabs"/> |
| 73 | + <click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="clickStorefrontPropertiesTab"/> |
| 74 | + <waitForElementVisible selector="{{AdvancedAttributePropertiesSection.UseInProductListing}}" stepKey="waitForTabSwitch"/> |
| 75 | + <selectOption selector="{{AdvancedAttributePropertiesSection.UseInProductListing}}" userInput="Yes" stepKey="useInProductListing"/> |
| 76 | + |
70 | 77 | <!-- Save the new product attribute -->
|
71 | 78 | <click selector="{{AttributePropertiesSection.SaveAndEdit}}" stepKey="clickSaveAndEdit1"/>
|
72 | 79 | <waitForElementVisible selector="{{AdminProductMessagesSection.successMessage}}" stepKey="waitForSuccess"/>
|
|
97 | 104 | <actionGroup ref="fillMainProductForm" stepKey="fillProductForm">
|
98 | 105 | <argument name="product" value="BaseConfigurableProduct"/>
|
99 | 106 | </actionGroup>
|
| 107 | + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="fillCategory"/> |
100 | 108 |
|
101 | 109 | <!-- Create configurations based off the Image Swatch we created earlier -->
|
102 | 110 | <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickCreateConfigurations"/>
|
|
134 | 142 | <expectedResult type="string">adobe-base</expectedResult>
|
135 | 143 | <actualResult type="string">{$grabSwatch6}</actualResult>
|
136 | 144 | </assertContains>
|
| 145 | + |
| 146 | + <!-- Go to the product listing page and see text swatch options --> |
| 147 | + <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategoryPageStorefront"/> |
| 148 | + <waitForPageLoad stepKey="waitForProductListingPage"/> |
| 149 | + |
| 150 | + <!-- Verify the storefront --> |
| 151 | + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.nthSwatchOption('1')}}" userInput="style" stepKey="grabSwatch7"/> |
| 152 | + <assertContains stepKey="assertSwatch7"> |
| 153 | + <expectedResult type="string">adobe-thumb</expectedResult> |
| 154 | + <actualResult type="string">{$grabSwatch7}</actualResult> |
| 155 | + </assertContains> |
| 156 | + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.nthSwatchOption('2')}}" userInput="style" stepKey="grabSwatch8"/> |
| 157 | + <assertContains stepKey="assertSwatch8"> |
| 158 | + <expectedResult type="string">adobe-small</expectedResult> |
| 159 | + <actualResult type="string">{$grabSwatch8}</actualResult> |
| 160 | + </assertContains> |
| 161 | + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.nthSwatchOption('3')}}" userInput="style" stepKey="grabSwatch9"/> |
| 162 | + <assertContains stepKey="assertSwatch9"> |
| 163 | + <expectedResult type="string">adobe-base</expectedResult> |
| 164 | + <actualResult type="string">{$grabSwatch9}</actualResult> |
| 165 | + </assertContains> |
137 | 166 | </test>
|
138 | 167 | </tests>
|
0 commit comments