|
11 | 11 | <annotations>
|
12 | 12 | <title value="Country filter on Customers page when allowed countries restriction for a default website is applied"/>
|
13 | 13 | <description value="Country filter on Customers page when allowed countries restriction for a default website is applied"/>
|
14 |
| - <features value="Module/ Customer"/> |
| 14 | + <features value="Customer"/> |
15 | 15 | <severity value="MAJOR"/>
|
16 | 16 | <testCaseId value="MC-6441"/>
|
17 | 17 | <useCaseId value="MAGETWO-91523"/>
|
|
23 | 23 | <requiredEntity createDataKey="createCategory"/>
|
24 | 24 | </createData>
|
25 | 25 | <actionGroup ref="LoginActionGroup" stepKey="login"/>
|
26 |
| - |
27 | 26 | <!--Create new website,store and store view-->
|
| 27 | + <comment userInput="Create new website,store and store view" stepKey="createWebsite"/> |
28 | 28 | <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="goToAdminSystemStorePage"/>
|
29 |
| - <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="AdminCreateNewWebsite"> |
| 29 | + <actionGroup ref="AdminCreateWebsite" stepKey="AdminCreateNewWebsite"> |
30 | 30 | <argument name="newWebsiteName" value="{{NewWebSiteData.name}}"/>
|
31 | 31 | <argument name="websiteCode" value="{{NewWebSiteData.code}}"/>
|
32 | 32 | </actionGroup>
|
33 |
| - <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="AdminCreateNewStore"> |
| 33 | + <actionGroup ref="AdminCreateNewStore" stepKey="AdminCreateNewStore"> |
34 | 34 | <argument name="website" value="{{NewWebSiteData.name}}"/>
|
35 | 35 | <argument name="storeGroupName" value="{{NewStoreData.name}}"/>
|
36 | 36 | <argument name="storeGroupCode" value="{{NewStoreData.code}}"/>
|
37 | 37 | </actionGroup>
|
38 |
| - <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="AdminCreateNewStoreView"> |
| 38 | + <actionGroup ref="AdminCreateStoreView" stepKey="AdminCreateNewStoreView"> |
39 | 39 | <argument name="StoreGroup" value="NewStoreData"/>
|
40 | 40 | </actionGroup>
|
41 | 41 | <!--Set account sharing option - Default value is 'Per Website'-->
|
42 |
| - <actionGroup ref="SetAccountSharingOptionActionGroup" stepKey="setAccountSharingOptionToDefault"/> |
| 42 | + <comment userInput="Set account sharing option - Default value is 'Per Website'" stepKey="setAccountSharingOption"/> |
| 43 | + <createData entity="CustomerAccountSharingDefault" stepKey="setToAccountSharingToDefault"/> |
43 | 44 | <magentoCLI command="indexer:reindex" stepKey="reindex"/>
|
44 | 45 | </before>
|
45 | 46 | <after>
|
46 | 47 | <!--delete all created data and set main website country options to default-->
|
| 48 | + <comment userInput="Delete all created data and set main website country options to default" stepKey="resetConfigToDefault"/> |
47 | 49 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
|
48 | 50 | <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
|
49 | 51 | <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
|
|
54 | 56 | <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="adminSwitchWebsiteActionGroup">
|
55 | 57 | <argument name="website" value="_defaultWebsite"/>
|
56 | 58 | </actionGroup>
|
57 |
| - <actionGroup ref="SetMainWebsiteCountryOptionsToDefaultActionGroup" stepKey="setCountryOptionsToDefault"/> |
| 59 | + <actionGroup ref="SetWebsiteCountryOptionsToDefaultActionGroup" stepKey="setCountryOptionsToDefault"/> |
| 60 | + <createData entity="CustomerAccountSharingSystemValue" stepKey="setAccountSharingToSystemValue"/> |
58 | 61 | <actionGroup ref="logout" stepKey="logout"/>
|
| 62 | + <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
| 63 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
59 | 64 | </after>
|
60 | 65 | <!--Check that all countries are allowed initially and get amount-->
|
| 66 | + <comment userInput="Check that all countries are allowed initially and get amount" stepKey="checkAllCountriesAreAllowed"/> |
61 | 67 | <actionGroup ref="NavigateToConfigurationGeneralPage" stepKey="navigateToConfigGeneralPage"/>
|
62 |
| - <conditionalClick selector="{{CountryOptionsSection.countryOptions}}" dependentSelector="{{CountryOptionsSection.countryOptionsOpen}}" visible="false" stepKey="clickOnStoreInformation"/> |
63 |
| - <waitForElementVisible selector="{{CountryOptionsSection.allowedCountries}}" stepKey="waitTabToExpand"/> |
64 |
| - <executeJS function="return document.querySelectorAll('{{CountryOptionsSection.allowedCountries}} option').length" stepKey="CountriesAmount"/> |
65 |
| - <checkOption selector="{{CountryOptionsSection.generalCountryAllowInherit}}" stepKey="markAllCountriesAsAvailable"/> |
66 |
| - <click selector="{{CountryOptionsSection.countryOptions}}" stepKey="collapseTab"/> |
67 |
| - <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/> |
68 |
| - <waitForPageLoad stepKey="waitForSavingSystemConfiguration"/> |
69 |
| - <see userInput="You saved the configuration." stepKey="seeSuccessMessage"/> |
| 68 | + <createData entity="DisableAdminAccountAllowCountry" stepKey="setDefaultValueForAllowCountries"/> |
| 69 | + <executeJS function="return document.querySelectorAll('{{CountryOptionsSection.allowedCountries}} option').length" stepKey="countriesAmount"/> |
70 | 70 | <!-- Create customer for US -->
|
| 71 | + <comment userInput="Create customer for US" stepKey="createUSCustomer"/> |
71 | 72 | <createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/>
|
72 |
| - <!-- Switch to first website, allow only Canada and set Canada as default country--> |
| 73 | + <!-- Switch to first website, allow only Canada and set Canada as default country --> |
| 74 | + <comment userInput="Switch to first website, allow only Canada and set Canada as default country" stepKey="setCanadaAsDefaultCountry"/> |
73 | 75 | <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="adminSwitchWebsiteActionGroup">
|
74 | 76 | <argument name="website" value="_defaultWebsite"/>
|
75 | 77 | </actionGroup>
|
|
82 | 84 | <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig2"/>
|
83 | 85 | <waitForPageLoad stepKey="waitForSavingSystemConfiguration2"/>
|
84 | 86 | <!--Switch to second website and allow all countries except Canada-->
|
| 87 | + <comment userInput="Switch to second website and allow all countries except Canada" stepKey="switchToWebsiteAndAllowOnlyCanada"/> |
85 | 88 | <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="adminSwitchWebsiteActionGroup2">
|
86 | 89 | <argument name="website" value="NewWebSiteData"/>
|
87 | 90 | </actionGroup>
|
|
94 | 97 | <amOnPage url="{{AdminEditCustomerPage.url($$createCustomer.id$$)}}" stepKey="goToCustomerEditPage"/>
|
95 | 98 | <waitForPageLoad stepKey="waitPageToLoad"/>
|
96 | 99 | <!--Open created customer details page and change US address to Canada address-->
|
| 100 | + <comment userInput="Open created customer details page and change US address to Canada address" stepKey="changeCustomerAddressToCanada"/> |
97 | 101 | <actionGroup ref="OpenEditCustomerAddressFromAdminActionGroup" stepKey="editCustomerAddress">
|
98 | 102 | <argument name="address" value="US_Address_CA"/>
|
99 | 103 | </actionGroup>
|
|
104 | 108 | <click stepKey="saveCustomer" selector="{{AdminCustomerAccountInformationSection.saveCustomerAndContinueEdit}}"/>
|
105 | 109 | <waitForPageLoad stepKey="waitForCustomersPage"/>
|
106 | 110 | <!--Go to Customers grid and check that filter countries amount is the same as initial allowed countries amount-->
|
| 111 | + <comment userInput="Go to Customers grid and check that filter countries amount is the same as initial allowed countries amount" stepKey="compareCountriesAmount"/> |
107 | 112 | <amOnPage url="{{AdminCustomerPage.url}}" stepKey="goToCustomersGrid"/>
|
108 | 113 | <waitForPageLoad stepKey="waitForCustomersGrid"/>
|
109 | 114 | <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openFiltersSectionOnCustomersGrid"/>
|
110 |
| - <executeJS function="var len = document.querySelectorAll('{{AdminDataGridHeaderSection.countryOptions}}').length; return len-1;" stepKey="CountriesAmount2"/> |
111 |
| - <assertEquals expected='($CountriesAmount)' expectedType="integer" actual="($CountriesAmount2)" stepKey="assertCountryAmounts"/> |
| 115 | + <executeJS function="var len = document.querySelectorAll('{{AdminCustomerFiltersSection.countryOptions}}').length; return len-1;" stepKey="countriesAmount2"/> |
| 116 | + <assertEquals expected='($countriesAmount)' expectedType="integer" actual="($countriesAmount2)" stepKey="assertCountryAmounts"/> |
112 | 117 | </test>
|
113 | 118 | </tests>
|
0 commit comments