|
| 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="StorefrontVerifyCustomCustomerAddressAttributeTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Customer"/> |
| 14 | + <stories value="Storefront Custom Customer Address Attribute"/> |
| 15 | + <title value="Verify Custom Customer Address Attribute Value Shows On Storefront Customer Checkout"/> |
| 16 | + <description value="Verify that custom customer address attribute value shows at checkout on storefront for second address"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MC-37569"/> |
| 19 | + <group value="customer"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 23 | + <createData entity="SimpleProduct2" stepKey="simpleProduct"/> |
| 24 | + <createData entity="Simple_US_Customer" stepKey="simpleCustomer"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> |
| 28 | + <deleteData createDataKey="simpleCustomer" stepKey="deleteCustomer"/> |
| 29 | + <!--Remove Custom Customer Address Attribute--> |
| 30 | + <actionGroup ref="AdminDeleteCustomerAttribute" stepKey="adminDeleteFirstCustomerAttribute"> |
| 31 | + <argument name="defaultLabel" value="{{AttributeDropdownData.label}}"/> |
| 32 | + </actionGroup> |
| 33 | + </after> |
| 34 | + |
| 35 | + <!--Create new custom customer address attribute--> |
| 36 | + <actionGroup ref="AdminNavigateToCustomerAddressAttributesPageActionGroup"/> |
| 37 | + <actionGroup ref="AdminAddOptionsCustomerAttribute" stepKey="adminCreateCustomerFirstAttribute"> |
| 38 | + <argument name="defaultLabel" value="{{AttributeDropdownData.label}}"/> |
| 39 | + <argument name="attributeCode" value="{{AttributeDropdownData.code}}"/> |
| 40 | + <argument name="inputType" value="{{AttributeDropdownData.inputType}}"/> |
| 41 | + <argument name="sortOrder" value="{{AttributeDropdownData.sortOrder}}"/> |
| 42 | + <argument name="firstOption" value="{{AttributeDropdownData.firstOption}}"/> |
| 43 | + <argument name="secondOption" value="{{AttributeDropdownData.secondOption}}"/> |
| 44 | + </actionGroup> |
| 45 | + |
| 46 | + <!--Add address to B2C Customer--> |
| 47 | + <actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPage"> |
| 48 | + <argument name="customerId" value="$$simpleCustomer.id$"/> |
| 49 | + </actionGroup> |
| 50 | + <click selector="{{AdminEditCustomerAddressesSection.addresses}}" stepKey="proceedToAddresses"/> |
| 51 | + <waitForPageLoad stepKey="waitForPageToLoad"/> |
| 52 | + <click selector="{{AdminCustomerAddressesGridSection.firstRowEditLink}}" stepKey="editFirstAddress"/> |
| 53 | + <waitForPageLoad time="60" stepKey="waitForAddressForm"/> |
| 54 | + |
| 55 | + <actionGroup ref="SelectDropdownCustomerAddressAttributeValueActionGroup" stepKey="selectOptionValue"> |
| 56 | + <argument name="customerAddressAttribute" value="AttributeDropdownData"/> |
| 57 | + <argument name="optionValue" value="{{AttributeDropdownData.firstOption}}"/> |
| 58 | + </actionGroup> |
| 59 | + |
| 60 | + <!--Login To Store Front By B2C Customer--> |
| 61 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsStoreFront"> |
| 62 | + <argument name="Customer" value="$$simpleCustomer$$"/> |
| 63 | + </actionGroup> |
| 64 | + <!-- Add Product To Cart From Product Detail Page--> |
| 65 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPageOnStorefront"> |
| 66 | + <argument name="product" value="$$simpleProduct$$"/> |
| 67 | + </actionGroup> |
| 68 | + <actionGroup ref="StorefrontAddToTheCartActionGroup" stepKey="addToCartFromStorefrontProductPage"/> |
| 69 | + |
| 70 | + <!--Go To Checkout and Verify Default Address--> |
| 71 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckoutPage"/> |
| 72 | + <!-- Ensure that the selected shipping address is similar to first address --> |
| 73 | + <actionGroup ref="CheckSelectedShippingAddressInCheckoutWithSearchActionGroup" stepKey="assertShippingAddress"> |
| 74 | + <argument name="customerVar" value="$$simpleCustomer$$"/> |
| 75 | + <argument name="customerAddressVar" value="CustomerAddressSimple"/> |
| 76 | + </actionGroup> |
| 77 | + <!--Verify that selected "Test Dropdown" options appears on the page--> |
| 78 | + <see selector="{{CheckoutShippingAddressSection.selectedShippingAddress}}" userInput="{{AttributeDropdownData.firstOption}}" stepKey="seeShippingAddressCustomAttribute"/> |
| 79 | + |
| 80 | + <!--Add Second Shipping Address--> |
| 81 | + <actionGroup ref="StorefrontClickAddNewAddressButtonFromCheckoutShippingActionGroup" stepKey="clickAddNewAddressButton" |
| 82 | + |
| 83 | + <!--Fill in Shipping Address required fields and Custom Customer Address Attribute and click *Ship Here* button--> |
| 84 | + <actionGroup ref="FillNewShippingAddressModalActionGroup" stepKey="changeAddress"> |
| 85 | + <argument name="address" value="US_Address_NY"/> |
| 86 | + </actionGroup> |
| 87 | + <actionGroup ref="StorefrontSelectDropdownCustomerAddressAttributeValueActionGroup" stepKey="selectOptionValue1"> |
| 88 | + <argument name="customerAddressAttribute" value="AttributeDropdownData"/> |
| 89 | + <argument name="optionValue" value="{{AttributeDropdownData.firstOption}}"/> |
| 90 | + </actionGroup> |
| 91 | + <actionGroup ref="StorefrontClickSaveOnNewAddressFormActionGroup" stepKey="clickOnSaveNewAddress"/> |
| 92 | + |
| 93 | + <!-- Ensure that the selected shipping address is similar to second address --> |
| 94 | + <actionGroup ref="CheckSelectedShippingAddressInCheckoutWithSearchActionGroup" stepKey="assertShippingAddress1"> |
| 95 | + <argument name="customerVar" value="$$simpleCustomer$$"/> |
| 96 | + <argument name="customerAddressVar" value="US_Address_NY"/> |
| 97 | + </actionGroup> |
| 98 | + <!--Verify that selected "Test Dropdown" options appears on the page--> |
| 99 | + <see selector="{{CheckoutShippingAddressSection.selectedShippingAddress}}" userInput="{{AttributeDropdownData.firstOption}}" stepKey="seeShippingAddressCustomAttribute1"/> |
| 100 | + |
| 101 | + <!-- Select First Shipping Method and Go To Billing Section --> |
| 102 | + <click selector="{{CheckoutShippingSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/> |
| 103 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/> |
| 104 | + |
| 105 | + <!-- Ensure that the Billing address is similar to first address --> |
| 106 | + <actionGroup ref="StorefrontCheckSelectedBillingAddressInCheckoutWithSearchActionGroup" stepKey="assertBillingAddress"> |
| 107 | + <argument name="customerVar" value="$$simpleCustomer$$"/> |
| 108 | + <argument name="customerAddressVar" value="CustomerAddressSimple"/> |
| 109 | + </actionGroup> |
| 110 | + <!--Verify that selected "Test Dropdown" options appears on the page--> |
| 111 | + <see selector="{{CheckoutBillingAddressSection.selectedBillingAddress}}" userInput="{{AttributeDropdownData.firstOption}}" stepKey="seeBillingAddressCustomAttribute"/> |
| 112 | + </test> |
| 113 | +</tests> |
0 commit comments