|
12 | 12 | <annotations>
|
13 | 13 | <features value="Swatches"/>
|
14 | 14 | <stories value="Create/configure swatches"/>
|
15 |
| - <title value="Admin can configure swatches display in configuration"/> |
16 |
| - <description value="Admin can configure swatches display in configuration"/> |
| 15 | + <title value="Admin can create product attribute with picked color swatch"/> |
| 16 | + <description value="Admin can create product attribute with picked color swatch"/> |
17 | 17 | <severity value="CRITICAL"/>
|
18 | 18 | <testCaseId value="MC-3080"/>
|
19 | 19 | <group value="Swatches"/>
|
|
22 | 22 | <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
|
23 | 23 | </before>
|
24 | 24 | <after>
|
| 25 | + <!-- Clean up our modifications to the existing color attribute --> |
| 26 | + <amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="goToProductAttributes"/> |
| 27 | + <waitForPageLoad stepKey="waitForProductAttributes"/> |
| 28 | + <fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="color" stepKey="fillFilter"/> |
| 29 | + <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="clickSearch"/> |
| 30 | + <click selector="{{AdminProductAttributeGridSection.AttributeCode('color')}}" stepKey="clickRowToEdit"/> |
25 | 31 | <click selector="{{AdminManageSwatchSection.nthDelete('1')}}" stepKey="deleteSwatch1"/>
|
26 | 32 | <click selector="{{AdminManageSwatchSection.nthDelete('2')}}" stepKey="deleteSwatch2"/>
|
27 | 33 | <click selector="{{AdminManageSwatchSection.nthDelete('3')}}" stepKey="deleteSwatch3"/>
|
28 |
| - <waitForPageLoad stepKey="waitToClickSave2"/> |
29 |
| - <click selector="{{AttributePropertiesSection.SaveAndEdit}}" stepKey="clickSaveAndEdit2"/> |
| 34 | + <waitForPageLoad stepKey="waitToClickSave"/> |
| 35 | + <click selector="{{AttributePropertiesSection.SaveAndEdit}}" stepKey="clickSaveAndEdit"/> |
| 36 | + <!-- Logout --> |
30 | 37 | <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/>
|
31 | 38 | </after>
|
32 | 39 |
|
|
92 | 99 | <argument name="nthSwatch" value="3"/>
|
93 | 100 | <argument name="expectedStyle" value="background: rgb(52, 152, 219);"/>
|
94 | 101 | </actionGroup>
|
| 102 | + |
| 103 | + <!-- Create a configurable product to verify the storefront with --> |
| 104 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductGridPage"/> |
| 105 | + <waitForPageLoad time="30" stepKey="waitForProductGrid"/> |
| 106 | + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateConfigurableProduct"> |
| 107 | + <argument name="product" value="BaseConfigurableProduct"/> |
| 108 | + </actionGroup> |
| 109 | + <actionGroup ref="fillMainProductForm" stepKey="fillProductForm"> |
| 110 | + <argument name="product" value="BaseConfigurableProduct"/> |
| 111 | + </actionGroup> |
| 112 | + <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/> |
| 113 | + <fillField userInput="{{_defaultProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/> |
| 114 | + <!-- Create configurations based off the Text Swatch we created earlier --> |
| 115 | + <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickCreateConfigurations"/> |
| 116 | + <click selector="{{AdminCreateProductConfigurationsPanel.filters}}" stepKey="clickFilters"/> |
| 117 | + <fillField selector="{{AdminCreateProductConfigurationsPanel.attributeCode}}" userInput="color" stepKey="fillFilterAttributeCodeField"/> |
| 118 | + <click selector="{{AdminCreateProductConfigurationsPanel.applyFilters}}" stepKey="clickApplyFiltersButton"/> |
| 119 | + <click selector="{{AdminCreateProductConfigurationsPanel.firstCheckbox}}" stepKey="clickOnFirstCheckbox"/> |
| 120 | + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton1"/> |
| 121 | + <click selector="{{AdminCreateProductConfigurationsPanel.selectAll}}" stepKey="clickOnSelectAll"/> |
| 122 | + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton2"/> |
| 123 | + <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/> |
| 124 | + <fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="1" stepKey="enterAttributeQuantity"/> |
| 125 | + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton3"/> |
| 126 | + <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton4"/> |
| 127 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton2"/> |
| 128 | + |
| 129 | + <!-- Go to the product page and see text swatch options --> |
| 130 | + <amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="amOnProductPage"/> |
| 131 | + <waitForPageLoad stepKey="waitForProductPage"/> |
| 132 | + |
| 133 | + <!-- Verify that the storefront shows the swatches too --> |
| 134 | + <actionGroup ref="assertStorefrontSwatchColor" stepKey="assertSwatch4"> |
| 135 | + <argument name="nthSwatch" value="1"/> |
| 136 | + <argument name="expectedRgb" value="rgb(231, 77, 60)"/> |
| 137 | + </actionGroup> |
| 138 | + <actionGroup ref="assertStorefrontSwatchColor" stepKey="assertSwatch5"> |
| 139 | + <argument name="nthSwatch" value="2"/> |
| 140 | + <argument name="expectedRgb" value="rgb(46, 204, 112)"/> |
| 141 | + </actionGroup> |
| 142 | + <actionGroup ref="assertStorefrontSwatchColor" stepKey="assertSwatch6"> |
| 143 | + <argument name="nthSwatch" value="3"/> |
| 144 | + <argument name="expectedRgb" value="rgb(52, 152, 219)"/> |
| 145 | + </actionGroup> |
95 | 146 | </test>
|
96 | 147 | </tests>
|
0 commit comments