|
| 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="StorefrontPersistentDataForRegisteredCustomerWithVirtualQuoteTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Checkout"/> |
| 14 | + <stories value="Checkout via register customer"/> |
| 15 | + <title value="Persistent Data for register Customer with virtual quote"/> |
| 16 | + <description value="One can use Persistent Data for register Customer with virtual quote"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-4166"/> |
| 19 | + <group value="checkout"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 23 | + <createData entity="VirtualProduct" stepKey="createVirtualProduct"> |
| 24 | + <requiredEntity createDataKey="createCategory"/> |
| 25 | + </createData> |
| 26 | + <createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/> |
| 27 | + <magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/> |
| 28 | + <magentoCLI command="config:set {{EnablePaymentCheckMOConfigData.path}} {{EnablePaymentCheckMOConfigData.value}}" stepKey="enableCheckMoneyOrderPayment"/> |
| 29 | + <magentoCLI command="cache:clean config" stepKey="flushCache"/> |
| 30 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefront"/> |
| 31 | + <executeJS function="window.localStorage.clear();" stepKey="clearLocalStorage"/> |
| 32 | + </before> |
| 33 | + <after> |
| 34 | + <!-- delete created data --> |
| 35 | + <deleteData createDataKey="createVirtualProduct" stepKey="deleteProduct"/> |
| 36 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 37 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 38 | + <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/> |
| 39 | + <magentoCLI command="config:set {{DisableCheckMoneyOrderPaymentMethod.path}} {{DisableCheckMoneyOrderPaymentMethod.value}}" stepKey="disableCheckMoneyOrderPaymentMethod"/> |
| 40 | + </after> |
| 41 | + <!-- Login as Customer Login from Customer page --> |
| 42 | + <!--Login to Frontend--> |
| 43 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> |
| 44 | + <argument name="Customer" value="$$createCustomer$$" /> |
| 45 | + </actionGroup> |
| 46 | + <!-- Add default address --> |
| 47 | + <actionGroup ref="StorefrontAddCustomerDefaultAddressActionGroup" stepKey="addNewDefaultAddress"> |
| 48 | + <argument name="Address" value="US_Address_California"/> |
| 49 | + </actionGroup> |
| 50 | + <!--Add product to cart.--> |
| 51 | + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart"> |
| 52 | + <argument name="product" value="$createVirtualProduct$"/> |
| 53 | + </actionGroup> |
| 54 | + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToShoppingCart"/> |
| 55 | + <click selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" stepKey="openEstimateTaxSection"/> |
| 56 | + <seeInField selector="{{CheckoutCartSummarySection.country}}" userInput="United States" stepKey="assertCountryFieldInCartEstimateShippingAndTaxSection"/> |
| 57 | + <seeInField selector="{{CheckoutCartSummarySection.stateProvinceInput}}" userInput="California" stepKey="assertStateProvinceInCartEstimateShippingAndTaxSection"/> |
| 58 | + <seeInField selector="{{CheckoutCartSummarySection.postcode}}" userInput="90230" stepKey="assertZipPostalCodeInCartEstimateShippingAndTaxSection"/> |
| 59 | + <selectOption selector="{{CheckoutCartSummarySection.country}}" userInput="United Kingdom" stepKey="selectCountry"/> |
| 60 | + <waitForLoadingMaskToDisappear stepKey="waitForCountryLoadingMaskDisappear"/> |
| 61 | + <fillField selector="{{CheckoutShippingGuestInfoSection.regionInput}}" userInput="" stepKey="changeStateProvinceField"/> |
| 62 | + <fillField selector="{{CheckoutCartSummarySection.postcode}}" userInput="KW1 7NQ" stepKey="fillZipPostalCodeField"/> |
| 63 | + <waitForLoadingMaskToDisappear stepKey="waitForZipLoadingMaskDisappear"/> |
| 64 | + <dontSeeJsError stepKey="verifyThatThereIsNoJSErrors"/> |
| 65 | + <reloadPage stepKey="refreshPage"/> |
| 66 | + <waitForPageLoad stepKey="waitForpageload"/> |
| 67 | + <seeInField selector="{{CheckoutCartSummarySection.country}}" userInput="United Kingdom" stepKey="assertCountryFieldInCartEstimateShippingSection"/> |
| 68 | + <seeInField selector="{{CheckoutCartSummarySection.stateProvinceInput}}" userInput="" stepKey="assertStateProvinceInCartEstimateShippingSection"/> |
| 69 | + <seeInField selector="{{CheckoutCartSummarySection.postcode}}" userInput="KW1 7NQ" stepKey="assertZipPostalCodeInCartEstimateShippingSection"/> |
| 70 | + <actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="goToCheckout"/> |
| 71 | + <actionGroup ref="CheckBillingAddressInCheckoutActionGroup" stepKey="checkBillingAddressOnBillingPage"> |
| 72 | + <argument name="customerVar" value="$$createCustomer$$" /> |
| 73 | + <argument name="customerAddressVar" value="US_Address_California" /> |
| 74 | + </actionGroup> |
| 75 | + <conditionalClick selector="{{CheckoutShippingSection.editActiveAddressButton}}" dependentSelector="{{CheckoutShippingSection.editActiveAddressButton}}" visible="true" stepKey="clickEditButton"/> |
| 76 | + <waitForPageLoad stepKey="waitForLoadingMask"/> |
| 77 | + <click selector="{{CheckoutPaymentSection.addressDropdown}}" stepKey="editAddress"/> |
| 78 | + <waitForElementVisible selector="{{CheckoutPaymentSection.addressDropdown}}" stepKey="waitForDropDownToBeVisible"/> |
| 79 | + <selectOption selector="{{CheckoutShippingSection.addressDropdown}}" userInput="New Address" stepKey="addAddress"/> |
| 80 | + <waitForPageLoad stepKey="waitForMaskLoading"/> |
| 81 | + <seeInField stepKey="fillFirstName" selector="{{CheckoutShippingSection.firstName}}" userInput="John"/> |
| 82 | + <seeInField stepKey="fillLastName" selector="{{CheckoutShippingSection.lastName}}" userInput="Doe"/> |
| 83 | + <wait time="10" stepKey="waitForSelectCountry"/> |
| 84 | + <seeOptionIsSelected selector="{{CheckoutShippingSection.selectCountry}}" userInput="{{UK_Address.country}}" stepKey="seeCountryIsUnitedKingdom"/> |
| 85 | + <seeInField stepKey="fillZip" selector="{{CheckoutShippingSection.postcode}}" userInput="KW1 7NQ"/> |
| 86 | + <actionGroup ref="CustomerLoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="changeBillingAddress"> |
| 87 | + <argument name="Address" value="Switzerland_Address"/> |
| 88 | + <argument name="classPrefix" value="[aria-hidden=false]"/> |
| 89 | + </actionGroup> |
| 90 | + <!-- Check order summary in checkout --> |
| 91 | + <actionGroup ref="StorefrontClickUpdateAddressInCheckoutActionGroup" stepKey="clickToUpdate"/> |
| 92 | + <comment userInput="BIC workaround" stepKey="waitForPageLoading"/> |
| 93 | + <reloadPage stepKey="againRefreshPage1"/> |
| 94 | + <wait time="10" stepKey="waitForPageLoad"/> |
| 95 | + <amOnPage url="{{CheckoutCartPage.url}}" stepKey="AgainGoToShoppingCart"/> |
| 96 | + <dontSeeJsError stepKey="againVerifyThatThereIsNoJSErrors"/> |
| 97 | + <conditionalClick selector="{{CheckoutShippingSection.editActiveAddressButton}}" dependentSelector="{{CheckoutShippingSection.editActiveAddressButton}}" visible="true" stepKey="againClickEditButton"/> |
| 98 | + <waitForPageLoad stepKey="againWaitForLoadingMask"/> |
| 99 | + <seeInField selector="{{CheckoutCartSummarySection.country}}" userInput="{{Switzerland_Address.country}}" stepKey="againAssertCountryFieldInCartEstimateShippingAndTaxSection"/> |
| 100 | + <seeInField selector="{{CheckoutCartSummarySection.stateProvinceInput}}" userInput="{{Switzerland_Address.state}}" stepKey="againAssertStateProvinceInCartEstimateShippingAndTaxSection"/> |
| 101 | + <seeInField selector="{{CheckoutCartSummarySection.postcode}}" userInput="{{Switzerland_Address.postcode}}" stepKey="againAssertZipPostalCodeInCartEstimateShippingAndTaxSection"/> |
| 102 | + </test> |
| 103 | +</tests> |
0 commit comments