Skip to content

Commit e9050ba

Browse files
Manjusha.SManjusha.S
authored andcommitted
Merge branch 'ACQE-4059' into functional-testing-automation
2 parents 1fe57c6 + fa56796 commit e9050ba

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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="AdminVerifyStateProvinceRequiredOnAddingNewAddressPageTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Verification of required fields on new address page test"/>
15+
<title value="Admin verifies State/Province should be required fields on add new address page test"/>
16+
<description value="Admin verifies State/Province should be required fields on add new address page test"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-3912"/>
19+
<group value="configuration"/>
20+
</annotations>
21+
<before>
22+
<!-- Set locale options to United Kingdom-->
23+
<magentoCLI stepKey="localeUK" command="config:set general/locale/code en_GB"/>
24+
<!-- Deploy static content with United Kingdom locale-->
25+
<magentoCLI command="setup:static-content:deploy en_GB" stepKey="deployStaticContentWithUnitedKingdomLocale"/>
26+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
27+
</before>
28+
<after>
29+
<!-- Set locale options to en_US-->
30+
<magentoCLI stepKey="localeUS" command="config:set general/locale/code en_US"/>
31+
<!-- Change Admin locale to default -->
32+
<actionGroup ref="SetAdminAccountActionGroup" stepKey="setAdminAccountToUnitedStates">
33+
<argument name="InterfaceLocaleByValue" value="en_US" />
34+
</actionGroup>
35+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
36+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
37+
<argument name="indices" value=""/>
38+
</actionGroup>
39+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
40+
<argument name="tags" value=""/>
41+
</actionGroup>
42+
</after>
43+
44+
<!-- Open Admin Store Configuration Page -->
45+
<actionGroup ref="AdminOpenStoreConfigPageActionGroup" stepKey="openStoreConfigPage" />
46+
47+
<!--"Choose United Kingdom" as State Option Required and save configuration -->
48+
<conditionalClick selector="{{StateOptionsSection.stateOptions}}" dependentSelector="{{StateOptionsSection.countriesWithRequiredRegions}}" visible="false" stepKey="expandStateOptionsTab"/>
49+
<waitForAjaxLoad stepKey="waitForAjax"/>
50+
<scrollTo selector="{{StateOptionsSection.countriesWithRequiredRegions}}" stepKey="scrollToForm"/>
51+
<selectOption selector="{{StateOptionsSection.countriesWithRequiredRegions}}" userInput="United Kingdom" stepKey="selectCountriesWithRequiredRegion"/>
52+
<click selector="#save" stepKey="saveStateOptionsConfig"/>
53+
<waitForPageLoad stepKey="waitForSavingConfig"/>
54+
55+
<!-- create customer on storefront -->
56+
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/>
57+
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
58+
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm">
59+
<argument name="customer" value="Simple_US_Customer"/>
60+
</actionGroup>
61+
<actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/>
62+
63+
<!-- Open AddressBook and set Country as "United Kingdom" -->
64+
<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToAddressBookPage">
65+
<argument name="menu" value="Address Book"/>
66+
</actionGroup>
67+
68+
<!-- Choose Country as "United Kingdom" -->
69+
<selectOption selector="{{StorefrontCustomerAddressFormSection.country}}" userInput="United Kingdom" stepKey="selectCountry"/>
70+
<click selector="{{StorefrontCustomerAddressFormSection.saveAddress}}" stepKey="saveCustomerAddress"/>
71+
72+
<!-- Assert the error message -->
73+
<seeElement selector="{{StorefrontCustomerMessagesSection.assertErrorMessage}}" stepKey="assetErrorMessage"/>
74+
</test>
75+
</tests>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerMessagesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<section name="StorefrontCustomerMessagesSection">
1212
<element name="successMessage" type="text" selector=".message-success"/>
1313
<element name="errorMessage" type="text" selector=".message-error"/>
14+
<element name="assertErrorMessage" type="text" selector="#region-error"/>
1415
</section>
1516
</sections>

0 commit comments

Comments
 (0)