Skip to content

Commit

Permalink
ENGCOM-9349: Replace repetitive actions with Action Groups in AdminUp…
Browse files Browse the repository at this point in the history
…dateStoreViewTest #34536
  • Loading branch information
sidolov committed Jan 31, 2022
2 parents d542fd8 + 2e484e7 commit f0f64d1
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreViewTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,24 @@
</actionGroup>

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

<!--Go to storefront and verify AssertStoreFrontend-->
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/>
<click selector="{{StorefrontHeaderSection.storeViewSwitcher}}" stepKey="selectStoreSwitcher"/>
<waitForPageLoad stepKey="waitForFirstStoreView"/>
<see selector="{{StorefrontHeaderSection.storeViewDropdown}}" userInput="{{storeViewData.name}}" stepKey="seeAssertStoreViewOnStorefront"/>
<see selector="{{StorefrontHeaderSection.storeViewDropdown}}" userInput="{{SecondStoreUnique.name}}" stepKey="seeAssertUpdatedStoreViewOnStorefront"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="goToStorefrontPage"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectStoreSwitcher"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForFirstStoreView"/>
<actionGroup ref="AssertStorefrontStoreVisibleInHeaderActionGroup" stepKey="seeAssertStoreViewOnStorefront">
<argument name="store" value="{{storeViewData.name}}"/>
</actionGroup>
<actionGroup ref="AssertStorefrontStoreVisibleInHeaderActionGroup" stepKey="seeAssertUpdatedStoreViewOnStorefront">
<argument name="store" value="{{SecondStoreUnique.name}}"/>
</actionGroup>
</test>
</tests>

0 comments on commit f0f64d1

Please sign in to comment.