Skip to content

Commit 09be019

Browse files
committed
Merge branch 'MC-38913' into 2.4-bugfixes-121520
2 parents f8347e2 + a972c48 commit 09be019

File tree

3 files changed

+97
-4
lines changed

3 files changed

+97
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AdminUpdateCustomerWebsiteInCustomerInformationPageActionGroup">
12+
<annotations>
13+
<description>Update customer website in customer information page</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="websiteName" defaultValue="{{_defaultWebsite.name}}" type="string"/>
17+
</arguments>
18+
<selectOption selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput="{{websiteName}}" stepKey="changeWebsite"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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="AdminChangeCustomerAssociatedWebsiteTest">
12+
<annotations>
13+
<features value="Customer"/>
14+
<title value="Admin should be able to change customer associated website ID"/>
15+
<description value="Admin should be able to change customer associated website ID"/>
16+
<severity value="AVERAGE"/>
17+
<useCaseId value="MC-38913"/>
18+
<testCaseId value="MC-39764"/>
19+
<stories value="Customer Edit"/>
20+
<group value="customer"/>
21+
</annotations>
22+
<before>
23+
<!--Login to admin-->
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25+
<!--Create second website-->
26+
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite">
27+
<argument name="newWebsiteName" value="{{NewWebSiteData.name}}"/>
28+
<argument name="websiteCode" value="{{NewWebSiteData.code}}"/>
29+
</actionGroup>
30+
<!--Create store group and associate it to second website-->
31+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
32+
<argument name="website" value="{{NewWebSiteData.name}}"/>
33+
<argument name="storeGroupName" value="{{NewStoreData.name}}"/>
34+
<argument name="storeGroupCode" value="{{NewStoreData.code}}"/>
35+
</actionGroup>
36+
<!--Create store view and associate it to second store group-->
37+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView">
38+
<argument name="StoreGroup" value="NewStoreData"/>
39+
<argument name="customStore" value="NewStoreViewData"/>
40+
</actionGroup>
41+
<!--Create customer-->
42+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
43+
</before>
44+
<after>
45+
<!--Delete customer-->
46+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
47+
<!--Delete custom website-->
48+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
49+
<argument name="websiteName" value="{{NewWebSiteData.name}}"/>
50+
</actionGroup>
51+
<!--Logout from admin-->
52+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
53+
</after>
54+
<!--Open customer edit page-->
55+
<actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPage">
56+
<argument name="customerId" value="$createCustomer.id$"/>
57+
</actionGroup>
58+
<!--Navigate to "Account Information" tab-->
59+
<actionGroup ref="AdminOpenAccountInformationTabFromCustomerEditPageActionGroup" stepKey="openAccountInformationEditPage"/>
60+
<!--Verify that "Main Website" is selected in website selector-->
61+
<seeOptionIsSelected selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput="{{_defaultWebsite.name}}" stepKey="assertThatMainWebsiteIsSelected"/>
62+
<!--Change customer website to "Second Website"-->
63+
<actionGroup ref="AdminUpdateCustomerWebsiteInCustomerInformationPageActionGroup" stepKey="updateCustomerWebsite">
64+
<argument name="websiteName" value="{{NewWebSiteData.name}}"/>
65+
</actionGroup>
66+
<!--Verify that changes are saved successfully-->
67+
<actionGroup ref="AdminSaveCustomerAndAssertSuccessMessage" stepKey="assertThatChangesAreSavedSuccessfully"/>
68+
<!--Open customer edit page-->
69+
<actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPage2">
70+
<argument name="customerId" value="$createCustomer.id$"/>
71+
</actionGroup>
72+
<!--Navigate to "Account Information" tab-->
73+
<actionGroup ref="AdminOpenAccountInformationTabFromCustomerEditPageActionGroup" stepKey="openAccountInformationEditPage2"/>
74+
<!--Verify that "Second Website" is selected in website selector-->
75+
<seeOptionIsSelected selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput="{{NewWebSiteData.name}}" stepKey="assertThatSecondWebsiteIsSelected"/>
76+
</test>
77+
</tests>

app/code/Magento/Ui/view/base/web/js/form/element/website.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ define([
2626
initialize: function () {
2727
this._super();
2828

29-
if (this.customerId || this.isGlobalScope) {
30-
this.disable(true);
31-
}
32-
3329
return this;
3430
}
3531
});

0 commit comments

Comments
 (0)