|
| 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="OnePageCheckoutCancelEditingBillingAddress"> |
| 12 | + <annotations> |
| 13 | + <features value="OnePageCheckout"/> |
| 14 | + <stories value="MC-39581: Billing Address empty after going back and forth between shipping and payment step"/> |
| 15 | + <title value="Billing Address empty after going back and forth between shipping and payment step"/> |
| 16 | + <description value="Check billing address editing cancelation during checkout on the payment step"/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <group value="checkout"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!-- Create Simple Product --> |
| 22 | + <createData entity="SimpleProduct2" stepKey="createSimpleProduct"> |
| 23 | + <field key="price">160</field> |
| 24 | + </createData> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <!-- Delete created product --> |
| 28 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 29 | + </after> |
| 30 | + |
| 31 | + <!-- Add Simple Product to cart --> |
| 32 | + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToSimpleProductPage"/> |
| 33 | + <waitForPageLoad stepKey="waitForSimpleProductPageLoad"/> |
| 34 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> |
| 35 | + <argument name="productName" value="$$createSimpleProduct.name$$"/> |
| 36 | + </actionGroup> |
| 37 | + |
| 38 | + <!-- Navigate to checkout --> |
| 39 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 40 | + <!-- Fill shipping address --> |
| 41 | + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping"> |
| 42 | + <argument name="shippingMethod" value="Flat Rate"/> |
| 43 | + </actionGroup> |
| 44 | + |
| 45 | + <!-- Change the address --> |
| 46 | + |
| 47 | + <waitForElementVisible selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="waitForElementToBeVisible"/> |
| 48 | + <uncheckOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="uncheckSameBillingAndShippingAddress"/> |
| 49 | + |
| 50 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/> |
| 51 | + |
| 52 | + <!-- Fill in New Billing Address --> |
| 53 | + <actionGroup ref="StorefrontFillBillingAddressActionGroup" stepKey="fillBillingAddress"> |
| 54 | + <argument name="address" value="US_Address_CA"/> |
| 55 | + </actionGroup> |
| 56 | + <selectOption selector="{{CheckoutPaymentSection.guestRegion}}" userInput="{{US_Address_CA.state}}" stepKey="selectRegion"/> |
| 57 | + <click selector="{{CheckoutPaymentSection.update}}" stepKey="clickOnUpdateButton"/> |
| 58 | + |
| 59 | + |
| 60 | + <!-- Edit Billing Address --> |
| 61 | + <click selector="{{CheckoutShippingSection.editAddressButton}}" stepKey="clickOnEditButton"/> |
| 62 | + <fillField selector="{{CheckoutPaymentSection.guestFirstName}}" userInput="" stepKey="enterEmptyFirstName"/> |
| 63 | + <fillField selector="{{CheckoutPaymentSection.guestLastName}}" userInput="" stepKey="enterEmptyLastName"/> |
| 64 | + |
| 65 | + <!-- Cancel Editing Billing Address --> |
| 66 | + <click selector="{{CheckoutHeaderSection.shippingMethodStep}}" stepKey="goToShipping"/> |
| 67 | + <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/> |
| 68 | + |
| 69 | + <!-- Place order --> |
| 70 | + <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSectionLoaded"/> |
| 71 | + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrderButton"/> |
| 72 | + <seeElement selector="{{CheckoutSuccessMainSection.success}}" stepKey="orderIsSuccessfullyPlaced"/> |
| 73 | + </test> |
| 74 | +</tests> |
0 commit comments