|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontCustomerCanChangeProductOptionsUsingSwatchesTest" extends="AdminCreateVisualSwatchTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Swatches"/> |
| 14 | + <stories value="Swatches"/> |
| 15 | + <title value="Customer can change product options using swatches"/> |
| 16 | + <description value="Customer can change product options using swatches"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MC-3085"/> |
| 19 | + <group value="swatches"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <createData entity="Simple_US_Customer" after="createCategory" stepKey="createCustomer"/> |
| 23 | + </before> |
| 24 | + <after> |
| 25 | + <deleteData createDataKey="createCustomer" before="goToProductAttributes" stepKey="deleteCustomer"/> |
| 26 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" after="deleteCustomer" stepKey="logoutFromCustomer"/> |
| 27 | + </after> |
| 28 | + |
| 29 | + <!-- Remove steps that are not used for this test --> |
| 30 | + <remove keyForRemoval="assertSwatch4"/> |
| 31 | + <remove keyForRemoval="assertSwatch5"/> |
| 32 | + <remove keyForRemoval="assertSwatch6"/> |
| 33 | + |
| 34 | + <!-- Login to storefront from customer --> |
| 35 | + <actionGroup ref="LoginToStorefrontActionGroup" before="amOnProductPage" stepKey="loginCustomer"> |
| 36 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 37 | + </actionGroup> |
| 38 | + |
| 39 | + <!-- Add configurable product with swatch attribute to the cart --> |
| 40 | + <actionGroup ref="StorefrontAddProductWithSwatchesToTheCartActionGroup" stepKey="addConfigurableProductToTheCart"> |
| 41 | + <argument name="productQty" value="1"/> |
| 42 | + <argument name="product" value="_defaultProduct"/> |
| 43 | + <argument name="productOption" value="3498db"/> |
| 44 | + </actionGroup> |
| 45 | + |
| 46 | + <!-- Go to shopping cart and update option of configurable product --> |
| 47 | + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="openShoppingCartPage"/> |
| 48 | + <actionGroup ref="StorefrontUpdateCartConfigurableProductWithSwatches" stepKey="updateConfigurableProductInTheCart"> |
| 49 | + <argument name="product" value="_defaultProduct"/> |
| 50 | + <argument name="productOption" value="e74d3c"/> |
| 51 | + </actionGroup> |
| 52 | + </test> |
| 53 | +</tests> |
0 commit comments