Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace repetitive actions with Action Groups in AdminCreateStoreViewTest #34552

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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>