Skip to content

Commit

Permalink
ENGCOM-9358: Replace repetitive actions with Action Groups in AdminCr…
Browse files Browse the repository at this point in the history
…eateStoreViewTest #34552

 - Merge Pull Request #34552 from kate-kyzyma/magento2:Refactoring-AdminCreateStoreViewTest
 - Merged commits:
   1. 1d704b6
   2. 894d525
   3. 978dfcf
   4. 1488797
  • Loading branch information
magento-engcom-team committed Dec 9, 2021
2 parents f3e2166 + 1488797 commit 8e66f69
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewTest.xml
Expand Up @@ -33,14 +33,19 @@
</after>

<!--Filter grid and see created store view-->
<actionGroup ref="AdminSystemStoreOpenPageActionGroup" stepKey="navigateToStoresIndex"/>
<click selector="{{AdminStoresGridSection.resetButton}}" stepKey="resetSearchFilter"/>
<fillField selector="{{AdminStoresGridSection.storeFilterTextField}}" userInput="{{customStore.name}}" stepKey="fillStoreViewFilterField"/>
<click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearch"/>
<see selector="{{AdminStoresGridSection.gridCell('1', 'Store View')}}" userInput="{{customStore.name}}" stepKey="seeNewStoreView"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="navigateToStoresIndex"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="resetSearchFilter"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillStoreViewFilterField"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearch"/>
<actionGroup ref="AssertStoreViewInGridActionGroup" stepKey="seeNewStoreView">
<argument name="storeViewName" value="{{customStore.name}}"/>
</actionGroup>
<!--Try to create store view with the same code-->
<actionGroup ref="AdminCreateStoreViewWithoutCheckActionGroup" stepKey="createSameStoreView"/>
<dontSeeElement selector="{{AdminMessagesSection.success}}" stepKey="dontSeeSuccessMessage"/>
<see selector="{{AdminMessagesSection.error}}" userInput="Store with the same code already exists." stepKey="seeErrorMessage"/>
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeErrorMessage">
<argument name="message" value="Store with the same code already exists."/>
<argument name="messageType" value="error" />
</actionGroup>
</test>
</tests>

0 comments on commit 8e66f69

Please sign in to comment.