Skip to content

Commit 0370a7f

Browse files
authored
ENGCOM-9358: Replace repetitive actions with Action Groups in AdminCreateStoreViewTest magento#34552
2 parents 926b334 + 8e66f69 commit 0370a7f

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,19 @@
3333
</after>
3434

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

0 commit comments

Comments
 (0)