Skip to content

Commit f0f64d1

Browse files
authored
ENGCOM-9349: Replace repetitive actions with Action Groups in AdminUpdateStoreViewTest #34536
2 parents d542fd8 + 2e484e7 commit f0f64d1

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreViewTest.xml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,24 @@
6464
</actionGroup>
6565

6666
<!--Go to store configuration page and verify AssertStoreBackend-->
67-
<amOnPage url="{{AdminConfigPage.url}}" stepKey="goToConfigStoreConfigurationPage"/>
68-
<waitForPageLoad stepKey="waitForSystemStoreConfigurationPageLoad" />
69-
<click selector="{{AdminConfigSection.defaultConfigButton}}" stepKey="clickDefaultConfigButton"/>
70-
<see selector="{{AdminConfigSection.defaultConfigDropdown}}" userInput="{{storeViewData.name}}" stepKey="seeAssertStoreViewInDefaultConfigDropdown"/>
71-
<see selector="{{AdminConfigSection.defaultConfigDropdown}}" userInput="{{SecondStoreUnique.name}}" stepKey="seeAssertUpdateStoreViewInDefaultConfigDropdown"/>
67+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="goToConfigStoreConfigurationPage"/>
68+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSystemStoreConfigurationPageLoad"/>
69+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickDefaultConfigButton"/>
70+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="seeAssertStoreViewInDefaultConfigDropdown"/>
71+
<actionGroup ref="AssertStoreConfigurationBackendActionGroup" stepKey="seeAssertUpdateStoreViewInDefaultConfigDropdown">
72+
<argument name="storeView1" value="{{storeViewData.name}}"/>
73+
<argument name="storeView2" value="{{SecondStoreUnique.name}}"/>
74+
</actionGroup>
7275

7376
<!--Go to storefront and verify AssertStoreFrontend-->
74-
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/>
75-
<click selector="{{StorefrontHeaderSection.storeViewSwitcher}}" stepKey="selectStoreSwitcher"/>
76-
<waitForPageLoad stepKey="waitForFirstStoreView"/>
77-
<see selector="{{StorefrontHeaderSection.storeViewDropdown}}" userInput="{{storeViewData.name}}" stepKey="seeAssertStoreViewOnStorefront"/>
78-
<see selector="{{StorefrontHeaderSection.storeViewDropdown}}" userInput="{{SecondStoreUnique.name}}" stepKey="seeAssertUpdatedStoreViewOnStorefront"/>
77+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="goToStorefrontPage"/>
78+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectStoreSwitcher"/>
79+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForFirstStoreView"/>
80+
<actionGroup ref="AssertStorefrontStoreVisibleInHeaderActionGroup" stepKey="seeAssertStoreViewOnStorefront">
81+
<argument name="store" value="{{storeViewData.name}}"/>
82+
</actionGroup>
83+
<actionGroup ref="AssertStorefrontStoreVisibleInHeaderActionGroup" stepKey="seeAssertUpdatedStoreViewOnStorefront">
84+
<argument name="store" value="{{SecondStoreUnique.name}}"/>
85+
</actionGroup>
7986
</test>
8087
</tests>

0 commit comments

Comments
 (0)