Skip to content

Commit be82efb

Browse files
authored
[Performance] MCP-242: Extend Customer Group Limitations by Website functional tests (#6708)
* MCP-242: Extend Customer Group Limitations by websites functional tests
1 parent 9cf1f72 commit be82efb

11 files changed

+843
-134
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminCustomerSelectWebsiteGroupStoreActionGroup">
12+
<annotations>
13+
<description>Select Website, Group, Send Welcome Email From on the Customer creation/edit page Account Information Tab.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="website" type="string"/>
17+
<argument name="customerGroup" type="string"/>
18+
<argument name="store" type="string"/>
19+
</arguments>
20+
<selectOption stepKey="selectWebSite" selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput="{{website}}"/>
21+
<click selector="{{AdminCustomerAccountInformationSection.group}}" stepKey="clickToExpandGroup"/>
22+
<click selector="{{AdminCustomerAccountInformationSection.customerGroupOption(customerGroup)}}" stepKey="clickToSelectCustomerGroup"/>
23+
<selectOption stepKey="selectStoreView" selector="{{AdminCustomerAccountInformationSection.storeView}}" userInput="{{store}}"/>
24+
<waitForElement selector="{{AdminCustomerAccountInformationSection.storeView}}" stepKey="waitForCustomerStoreViewExpand"/>
25+
<click stepKey="saveCustomer" selector="{{AdminCustomerAccountInformationSection.saveCustomer}}"/>
26+
<waitForPageLoad stepKey="waitForCustomersPage"/>
27+
<see stepKey="seeCustomerSaveSuccessMessage" userInput="You saved the customer."/>
28+
</actionGroup>
29+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminExcludeWebsiteFromCustomerGroupActionGroup.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertCustomerGroupHasNoExcludedWebsiteActionGroup.xml

Lines changed: 0 additions & 22 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontLoginAsCustomerUsingHeaderSignInLinkActionGroup">
12+
<annotations>
13+
<description>Goes to the Storefront Customer Sign In page. Logs in using the provided Customer.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="Customer"/>
17+
</arguments>
18+
19+
<click selector="{{StorefrontCustomerSignInFormSection.signInAccountLink}}" stepKey="clickSignInAccountLink"/>
20+
<waitForPageLoad time="30" stepKey="waitPageFullyLoaded"/>
21+
<waitForElementVisible selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="waitFormAppears"/>
22+
<fillField userInput="{{Customer.email}}" selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="fillEmail"/>
23+
<fillField userInput="{{Customer.password}}" selector="{{StorefrontCustomerSignInFormSection.passwordField}}" stepKey="fillPassword"/>
24+
<click selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="clickSignInAccountButton"/>
25+
<waitForPageLoad stepKey="waitForCustomerLoggedIn"/>
26+
</actionGroup>
27+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243
<data key="postcode">12345</data>
244244
</entity>
245245
<entity name="updateCustomerFranceAddress" type="address">
246-
<data key="firstname">Jaen</data>
246+
<data key="firstname">Jean</data>
247247
<data key="lastname">Reno</data>
248248
<data key="company">Magento</data>
249249
<data key="telephone">555-888-111-999</data>

app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,32 @@
110110
<data key="store_id">0</data>
111111
<data key="website_id">0</data>
112112
</entity>
113+
<entity name="FrenchCustomerOneAssignedToNewCustomerGroup" type="customer">
114+
<var key="group_id" entityKey="id" entityType="customerGroup"/>
115+
<data key="default_billing">true</data>
116+
<data key="default_shipping">true</data>
117+
<data key="email" unique="prefix">Alain.Delon@example.com</data>
118+
<data key="firstname">Alain</data>
119+
<data key="lastname">Delon</data>
120+
<data key="fullname">Alain Delon</data>
121+
<data key="password">pwdTest123!</data>
122+
<data key="store_id">0</data>
123+
<data key="website_id">0</data>
124+
<requiredEntity type="address">updateCustomerFranceAddress</requiredEntity>
125+
</entity>
126+
<entity name="FrenchCustomerTwoAssignedToNewCustomerGroup" type="customer">
127+
<var key="group_id" entityKey="id" entityType="customerGroup"/>
128+
<data key="default_billing">true</data>
129+
<data key="default_shipping">true</data>
130+
<data key="email" unique="prefix">Jean.Reno@example.com</data>
131+
<data key="firstname">Jean</data>
132+
<data key="lastname">Reno</data>
133+
<data key="fullname">Jean Reno</data>
134+
<data key="password">pwdTest123!</data>
135+
<data key="store_id">0</data>
136+
<data key="website_id">0</data>
137+
<requiredEntity type="address">updateCustomerFranceAddress</requiredEntity>
138+
</entity>
113139
<entity name="Simple_US_Customer_Multiple_Addresses" type="customer">
114140
<data key="group_id">1</data>
115141
<data key="default_billing">true</data>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<element name="accountInformationTitle" type="text" selector=".admin__page-nav-title"/>
1515
<element name="accountInformationButton" type="text" selector="//a/span[text()='Account Information']"/>
1616
<element name="addressesButton" type="select" selector="//a//span[contains(text(), 'Addresses')]"/>
17+
<element name="customerGroupOption" type="text" selector="//label/span[text()='{{groupValue}}']|//select/option[text()='{{groupValue}}']" parameterized="true"/>
1718
<element name="firstName" type="input" selector="input[name='customer[firstname]']"/>
1819
<element name="lastName" type="input" selector="input[name='customer[lastname]']"/>
1920
<element name="email" type="input" selector="input[name='customer[email]']"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
<element name="signInAccountButton" type="button" selector="#send2" timeout="30"/>
1515
<element name="forgotPasswordLink" type="button" selector=".action.remind" timeout="10"/>
1616
<element name="customerLoginBlock" type="text" selector=".login-container .block.block-customer-login"/>
17+
<element name="signInAccountLink" type="button" selector="//header[@class='page-header']//li/a[contains(.,'Sign In')]"/>
1718
</section>
1819
</sections>

0 commit comments

Comments
 (0)