|
| 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="AdminCustomerAttributeChangeUpdateFromRequiredToNoDefaultScopeTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Customer"/> |
| 14 | + <stories value="Customer attribute change from required to no"/> |
| 15 | + <title value="Admin should be able to save customer after changing attributes from required to no"/> |
| 16 | + <description value="Admin should be able to save customer after changing attributes from required to no in default scope"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="AC-6748"/> |
| 19 | + <group value="customer"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Login to admin --> |
| 23 | + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> |
| 24 | + <!-- Create a customer --> |
| 25 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 26 | + </before> |
| 27 | + <after> |
| 28 | + <!-- Navigate to customer configuration page --> |
| 29 | + <actionGroup ref="AdminNavigateToCustomerConfigurationActionGroup" stepKey="gotoCustomerConfiguration"/> |
| 30 | + <!-- Expand "Name and Address Option" section --> |
| 31 | + <actionGroup ref="AdminExpandConfigSectionActionGroup" stepKey="expandConfigSectionDefaultScope"> |
| 32 | + <argument name="sectionName" value="{{CustomerConfigurationSectionNameAndAddressOptions.title}}"/> |
| 33 | + </actionGroup> |
| 34 | + |
| 35 | + <!-- Set "Show Date of Birth" to Required and save in default config scope --> |
| 36 | + <actionGroup ref="AdminCheckUseSystemValueActionGroup" stepKey="checkUseSystemValue"> |
| 37 | + <argument name="rowId" value="row_customer_address_company_show"/> |
| 38 | + </actionGroup> |
| 39 | + <click selector="{{StoreConfigSection.Save}}" stepKey="saveConfig"/> |
| 40 | + |
| 41 | + <!-- Delete customer --> |
| 42 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 43 | + |
| 44 | + <!-- Logout from admin --> |
| 45 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 46 | + </after> |
| 47 | + <!-- Navigate to customer configuration page --> |
| 48 | + <actionGroup ref="AdminNavigateToCustomerConfigurationActionGroup" stepKey="gotoCustomerConfiguration"/> |
| 49 | + <!-- Expand "Name and Address Option" section --> |
| 50 | + <actionGroup ref="AdminExpandConfigSectionActionGroup" stepKey="expandConfigSectionDefaultScope"> |
| 51 | + <argument name="sectionName" value="{{CustomerConfigurationSectionNameAndAddressOptions.title}}"/> |
| 52 | + </actionGroup> |
| 53 | + <!-- Set "Show Company" to Required and save in default config scope --> |
| 54 | + <actionGroup ref="AdminCustomerShowCompanyActionGroup" stepKey="setShowCompanyRequiredDefaultScope"> |
| 55 | + <argument name="value" value="{{ShowCompany.required}}"/> |
| 56 | + </actionGroup> |
| 57 | + |
| 58 | + <!-- Open the customer edit page --> |
| 59 | + <actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="goToCustomerEditPage"> |
| 60 | + <argument name="customerId" value="$createCustomer.id$"/> |
| 61 | + </actionGroup> |
| 62 | + <!-- Switch the addresses tab --> |
| 63 | + <actionGroup ref="AdminOpenAddressesTabFromCustomerEditPageActionGroup" stepKey="openAddressesTab"/> |
| 64 | + <!-- Click "Add New Address" --> |
| 65 | + <actionGroup ref="AdminClickAddNewAddressButtonOnCustomerAddressesTabActionGroup" stepKey="clickAddNewAddressButton"/> |
| 66 | + <!-- Fill address --> |
| 67 | + <actionGroup ref="AdminFillAndSaveCustomerAddressInformationActionGroup" stepKey="fillAndSaveCustomerAddressInformationActionGroup"> |
| 68 | + <argument name="address" value="US_Address_TX"/> |
| 69 | + </actionGroup> |
| 70 | + <!-- Assert that the address is successfully added --> |
| 71 | + <actionGroup stepKey="saveAndContinue" ref="AdminCustomerSaveAndContinue"/> |
| 72 | + |
| 73 | + <!-- Navigate to customer configuration page --> |
| 74 | + <actionGroup ref="AdminNavigateToCustomerConfigurationActionGroup" stepKey="gotoCustomerConfigurationAgain"/> |
| 75 | + <!-- Expand "Name and Address Option" section --> |
| 76 | + <actionGroup ref="AdminExpandConfigSectionActionGroup" stepKey="expandConfigSectionDefaultScopeAgain"> |
| 77 | + <argument name="sectionName" value="{{CustomerConfigurationSectionNameAndAddressOptions.title}}"/> |
| 78 | + </actionGroup> |
| 79 | + <!-- Set "Show Company" to Required and save in default config scope --> |
| 80 | + <actionGroup ref="AdminCheckUseSystemValueActionGroup" stepKey="checkCompanyUseSystemValue"> |
| 81 | + <argument name="rowId" value="row_customer_address_company_show"/> |
| 82 | + </actionGroup> |
| 83 | + |
| 84 | + <click selector="{{StoreConfigSection.Save}}" stepKey="saveConfig"/> |
| 85 | + <!-- Open the customer edit page --> |
| 86 | + <actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="goToCustomerEditPageAgain"> |
| 87 | + <argument name="customerId" value="$createCustomer.id$"/> |
| 88 | + </actionGroup> |
| 89 | + <!-- Switch the addresses tab --> |
| 90 | + <actionGroup ref="AdminOpenAddressesTabFromCustomerEditPageActionGroup" stepKey="openAddressesTabAgain"/> |
| 91 | + <!-- Click "Add New Address" --> |
| 92 | + <actionGroup ref="AdminClickAddNewAddressButtonOnCustomerAddressesTabActionGroup" stepKey="clickAddNewAddressButtonAgain"/> |
| 93 | + <!-- Fill address --> |
| 94 | + <actionGroup ref="AdminFillAndSaveCustomerAddressInformationActionGroup" stepKey="fillAndSaveCustomerAddressInformationActionGroupAgain"> |
| 95 | + <argument name="address" value="addressNoCompany"/> |
| 96 | + </actionGroup> |
| 97 | + <!-- Assert that the address is successfully added --> |
| 98 | + <actionGroup stepKey="saveAndContinueAgain" ref="AdminCustomerSaveAndContinue"/> |
| 99 | + </test> |
| 100 | +</tests> |
0 commit comments