Skip to content

Commit 3101ae9

Browse files
committed
Merge remote-tracking branch 'origin/MC-4867' into mtf-eol
2 parents b5507f8 + a40e8fb commit 3101ae9

File tree

5 files changed

+172
-1
lines changed

5 files changed

+172
-1
lines changed

app/code/Magento/Config/Test/Mftf/Section/AdminConfigSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<element name="generalTabClosed" type="text" selector="//div[@class='admin__page-nav-title title _collapsible' and @aria-expanded='false' or @aria-expanded='0']//strong[text()='General']"/>
1313
<element name="generalTabOpened" type="text" selector="//div[@class='admin__page-nav-title title _collapsible' and @aria-expanded='true' or @aria-expanded='1']//strong[text()='General']"/>
1414
<element name="defaultConfigButton" type="button" selector="#store-change-button" timeout="30"/>
15-
<element name="defaultConfigDropdown" type="textarea" selector="//ul[@class='dropdown-menu']"/>
15+
<element name="defaultConfigDropdown" type="button" selector="//ul[@class='dropdown-menu']" timeout="30"/>
1616
</section>
1717
</sections>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
<!-- Test XML Example -->
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertStoreConfigurationBackendActionGroup">
12+
<arguments>
13+
<argument name="website" type="string"/>
14+
<argument name="customStore" type="string"/>
15+
<argument name="storeView1" type="string"/>
16+
<argument name="storeView2" type="string"/>
17+
</arguments>
18+
<amOnPage url="{{AdminConfigPage.url}}" stepKey="goToConfigStoreConfigurationPage"/>
19+
<waitForPageLoad stepKey="waitForSystemStoreConfigurationPageLoad"/>
20+
<click selector="{{AdminConfigSection.defaultConfigButton}}" stepKey="clickDefaultConfigButton"/>
21+
<see selector="{{AdminConfigSection.defaultConfigDropdown}}" userInput="{{website}}" stepKey="seeAssertWebsiteInDefaultConfigDropdown"/>
22+
<see selector="{{AdminConfigSection.defaultConfigDropdown}}" userInput="{{customStore}}" stepKey="seeAssertSecondStoreInDefaultConfigDropdown"/>
23+
<see selector="{{AdminConfigSection.defaultConfigDropdown}}" userInput="{{storeView1}}" stepKey="seeAssertFirstStoreViewInDefaultConfigDropdown"/>
24+
<see selector="{{AdminConfigSection.defaultConfigDropdown}}" userInput="{{storeView2}}" stepKey="seeAssertSecondStoreViewInDefaultConfigDropdown"/>
25+
</actionGroup>
26+
</actionGroups>
Lines changed: 27 additions & 0 deletions
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+
<!-- Test XML Example -->
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertStoreFrontendActionGroup">
12+
<arguments>
13+
<argument name="customStore" type="string"/>
14+
<argument name="storeView1" type="string"/>
15+
<argument name="storeView2" type="string"/>
16+
</arguments>
17+
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontPage"/>
18+
<waitForPageLoad stepKey="waitForStorefrontHomePageLoad"/>
19+
<click selector="{{StorefrontFooterSection.switchStoreButton}}" stepKey="clickSwitchStoreButton"/>
20+
<waitForElementVisible selector="{{StorefrontFooterSection.storeLink(customStore)}}" stepKey="waitForStoreLinkToVosible"/>
21+
<click selector="{{StorefrontFooterSection.storeLink(customStore)}}" stepKey="clickStoreLinkCustomStore"/>
22+
<waitForPageLoad stepKey="waitForCustomStoreToLoad"/>
23+
<see selector="{{StorefrontHeaderSection.storeViewName}}" userInput="{{storeView1}}" stepKey="seeAssertFirstStoreViewOnStorefront"/>
24+
<click selector="{{StorefrontHeaderSection.storeViewName}}" stepKey="clickStoreViewName"/>
25+
<see selector="{{StorefrontHeaderSection.storeViewDropdown}}" userInput="{{storeView2}}" stepKey="seeAssertSecondStoreViewOnStorefront"/>
26+
</actionGroup>
27+
</actionGroups>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<!-- Test XML Example -->
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="ChangeStoreInStoreViewActionGroup">
12+
<arguments>
13+
<argument name="storeDropdown" type="string"/>
14+
</arguments>
15+
<click selector="{{AdminStoresGridSection.storeNameInFirstRow}}" stepKey="clickStoreViewFirstRowInGrid"/>
16+
<waitForPageLoad stepKey="waitForAdminSystemStoreViewPageLoad"/>
17+
<selectOption selector="{{AdminNewStoreSection.storeGrpDropdown}}" userInput="{{storeDropdown}}" stepKey="selectStoreGrpDropdown"/>
18+
<click selector="{{AdminNewStoreViewActionsSection.saveButton}}" stepKey="clickSaveButton"/>
19+
<waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForModal"/>
20+
<see selector="{{AdminConfirmationModalSection.title}}" userInput="Warning message" stepKey="seeWarningAboutTakingALongTimeToComplete"/>
21+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmModal"/>
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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+
<!-- Test XML Example -->
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminMoveStoreToOtherGroupSameWebsiteTest">
11+
<annotations>
12+
<stories value="Move Store"/>
13+
<title value="Move Store To Other Group Same Website and Verify Backend and Frontend"/>
14+
<description value="Test log in to Stores and Move Store To Other Group Same Website Test"/>
15+
<testCaseId value="MC-14294"/>
16+
<severity value="CRITICAL"/>
17+
<group value="store"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
21+
<before>
22+
<actionGroup ref = "LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
<!-- Create first store -->
24+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createFirstStore">
25+
<argument name="website" value="{{_defaultWebsite.name}}"/>
26+
<argument name="storeGroupName" value="{{customStore.name}}"/>
27+
<argument name="storeGroupCode" value="{{customStore.code}}"/>
28+
</actionGroup>
29+
<!-- Create first store view -->
30+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createFirstStoreView">
31+
<argument name="StoreGroup" value="customStore"/>
32+
<argument name="customStore" value="storeViewData1"/>
33+
</actionGroup>
34+
<!-- Create second store -->
35+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createSecondStore">
36+
<argument name="website" value="{{_defaultWebsite.name}}"/>
37+
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
38+
<argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
39+
</actionGroup>
40+
<!-- Create second store view -->
41+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createSecondStoreView">
42+
<argument name="StoreGroup" value="customStoreGroup"/>
43+
<argument name="customStore" value="storeViewData2"/>
44+
</actionGroup>
45+
</before>
46+
<after>
47+
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteFirstStore">
48+
<argument name="storeGroupName" value="customStore.name"/>
49+
</actionGroup>
50+
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteSecondStore">
51+
<argument name="storeGroupName" value="customStoreGroup.name"/>
52+
</actionGroup>
53+
<actionGroup ref="logout" stepKey="logout"/>
54+
</after>
55+
56+
<!--Search created second store view in grid-->
57+
<actionGroup ref="AssertStoreViewInGridActionGroup" stepKey="searchCreatedStoreViewInGrid">
58+
<argument name="storeViewName" value="{{storeViewData2.name}}"/>
59+
</actionGroup>
60+
<!--Move created store view to other store keeping website same-->
61+
<actionGroup ref="ChangeStoreInStoreViewActionGroup" stepKey="moveStoreView">
62+
<argument name="storeDropdown" value="{{customStore.name}}"/>
63+
</actionGroup>
64+
<!--Save the above store view and verify AssertStoreViewSuccessSaveMessage-->
65+
<actionGroup ref="AdminCreateStoreViewActionSaveGroup" stepKey="verifyAssertStoreViewSuccessSaveMessage"/>
66+
67+
<!--Search moved store view(from above step) in grid and verify AssertStoreInGrid-->
68+
<actionGroup ref="AssertStoreViewInGridActionGroup" stepKey="searchMovedStoreViewInGrid">
69+
<argument name="storeViewName" value="{{storeViewData2.name}}"/>
70+
</actionGroup>
71+
72+
<!--Go to store view form page and verify AssertStoreForm-->
73+
<actionGroup ref="AssertStoreViewFormActionGroup" stepKey="verifyStoreViewForm">
74+
<argument name="storeDropdown" value="{{customStore.name}}"/>
75+
<argument name="storeViewName" value="{{storeViewData2.name}}"/>
76+
<argument name="storeViewCode" value="{{storeViewData2.code}}"/>
77+
<argument name="status" value="Enabled"/>
78+
</actionGroup>
79+
80+
<!--Go to store configuration page and verify AssertStoreBackend-->
81+
<actionGroup ref="AssertStoreConfigurationBackendActionGroup" stepKey="verifyValuesOnStoreBackend">
82+
<argument name="website" value="{{_defaultWebsite.name}}"/>
83+
<argument name="customStore" value="{{customStore.name}}"/>
84+
<argument name="storeView1" value="{{storeViewData1.name}}"/>
85+
<argument name="storeView2" value="{{storeViewData2.name}}"/>
86+
</actionGroup>
87+
88+
<!--Go to storefront and verify AssertStoreFrontend-->
89+
<actionGroup ref="AssertStoreFrontendActionGroup" stepKey="verifyValuesOnStoreFrontend">
90+
<argument name="customStore" value="{{customStore.name}}"/>
91+
<argument name="storeView1" value="{{storeViewData1.name}}"/>
92+
<argument name="storeView2" value="{{storeViewData2.name}}"/>
93+
</actionGroup>
94+
</test>
95+
</tests>

0 commit comments

Comments
 (0)