|
6 | 6 | */
|
7 | 7 | -->
|
8 | 8 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
9 |
| - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
10 |
| - <test name="StorefrontValidateConfigurableProductSwatchOptionToBePreSelectFromCartEditPageTest" extends="StorefrontConfigurableProductSwatchMinimumPriceProductPageTest"> |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="StorefrontValidateConfigurableProductSwatchOptionToBePreSelectFromCartEditPageTest"> |
11 | 11 | <annotations>
|
12 | 12 | <features value="Swatches"/>
|
13 | 13 | <stories value="Edit cart line item configurable product failed to Pre-select Production Option in 2.4.4"/>
|
|
18 | 18 | <useCaseId value="ACP2E-891"/>
|
19 | 19 | <group value="Swatches"/>
|
20 | 20 | </annotations>
|
21 |
| - <remove keyForRemoval="amOnConfigurableProductPage"/> |
22 |
| - <remove keyForRemoval="waitForConfigurableProductPage"/> |
23 |
| - <remove keyForRemoval="assertProductPrice"/> |
24 |
| - <remove keyForRemoval="assertMinimumPriceForBlackOption"/> |
25 |
| - <remove keyForRemoval="assertMinimumPriceForWhiteOption"/> |
26 |
| - <remove keyForRemoval="assertMinimumPriceForBlueOption"/> |
27 |
| - |
| 21 | + <before> |
| 22 | + <!-- Create category --> |
| 23 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 24 | + <!-- Login as Admin --> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin1"/> |
| 26 | + </before> |
| 27 | + <after> |
| 28 | + <!-- Delete configurable product and all child products --> |
| 29 | + <actionGroup ref="DeleteProductsByKeywordActionGroup" stepKey="deleteProductsByKeyword"> |
| 30 | + <argument name="keyword" value="{{_defaultProduct.sku}}"/> |
| 31 | + </actionGroup> |
| 32 | + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilters"/> |
| 33 | + <!-- Delete category --> |
| 34 | + <deleteData createDataKey="createCategory" stepKey="deleteCategoryAttribute"/> |
| 35 | + <!-- Delete color attribute --> |
| 36 | + <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteColorAttribute"> |
| 37 | + <argument name="ProductAttribute" value="ProductColorAttribute"/> |
| 38 | + </actionGroup> |
| 39 | + <!-- Delete size attribute --> |
| 40 | + <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteSizeAttribute"> |
| 41 | + <argument name="ProductAttribute" value="ProductSizeAttribute"/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 44 | + <argument name="indices" value=""/> |
| 45 | + </actionGroup> |
| 46 | + <!-- Logout --> |
| 47 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> |
| 48 | + </after> |
| 49 | + <!--Create text swatch attribute with 3 options: Black, White and Blue--> |
| 50 | + <actionGroup ref="AddTextSwatchToProductActionGroup" stepKey="addColorAttribute"> |
| 51 | + <argument name="attributeName" value="{{ProductColorAttribute.frontend_label}}"/> |
| 52 | + <argument name="attributeCode" value="{{ProductColorAttribute.attribute_code}}"/> |
| 53 | + <argument name="option1" value="Black"/> |
| 54 | + <argument name="option2" value="White"/> |
| 55 | + <argument name="option3" value="Blue"/> |
| 56 | + <argument name="usedInProductListing" value="Yes"/> |
| 57 | + </actionGroup> |
| 58 | + <!--Create text swatch attribute with 3 options: Small, Medium and Large--> |
| 59 | + <actionGroup ref="AddTextSwatchToProductActionGroup" stepKey="addSizeAttribute"> |
| 60 | + <argument name="attributeName" value="{{ProductSizeAttribute.frontend_label}}"/> |
| 61 | + <argument name="attributeCode" value="{{ProductSizeAttribute.attribute_code}}"/> |
| 62 | + <argument name="option1" value="Small"/> |
| 63 | + <argument name="option2" value="Medium"/> |
| 64 | + <argument name="option3" value="Large"/> |
| 65 | + </actionGroup> |
| 66 | + <!--Create configurable product with two attributes: Color and Size--> |
| 67 | + <actionGroup ref="CreateConfigurableProductWithTwoAttributesActionGroup" stepKey="createProduct"> |
| 68 | + <argument name="product" value="_defaultProduct"/> |
| 69 | + <argument name="category" value="$$createCategory$$"/> |
| 70 | + <argument name="attribute1" value="ProductColorAttribute"/> |
| 71 | + <argument name="attribute2" value="ProductSizeAttribute"/> |
| 72 | + </actionGroup> |
| 73 | + <!--Save configurable product--> |
| 74 | + <actionGroup ref="SaveConfigurableProductActionGroup" stepKey="saveProduct"> |
| 75 | + <argument name="product" value="_defaultProduct"/> |
| 76 | + </actionGroup> |
28 | 77 | <!-- Go to the edit page for the "color" attribute -->
|
29 | 78 | <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/>
|
30 | 79 | <fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{ProductColorAttribute.attribute_code}}" stepKey="fillFilter"/>
|
|
84 | 133 | <argument name="rowNumber" value="1"/>
|
85 | 134 | </actionGroup>
|
86 | 135 |
|
| 136 | + <wait time="60" stepKey="testWait"/> |
| 137 | + |
87 | 138 | <waitForElementVisible selector="{{StorefrontProductInfoMainSection.selectedSwatchValue('Blue')}}" time="30" stepKey="waitForElementSwatchColorVisible"/>
|
88 | 139 |
|
89 | 140 | <see selector="{{StorefrontProductInfoMainSection.selectedSwatchValue('Blue')}}" userInput="Blue" stepKey="seeSwatchColorRemainsSelected"/>
|
|
0 commit comments