|
11 | 11 | <annotations>
|
12 | 12 | <features value="Store"/>
|
13 | 13 | <stories value="Create a store view in admin"/>
|
14 |
| - <title value="Admin should be able to create a store view"/> |
15 |
| - <description value="Admin should be able to create a store view"/> |
| 14 | + <title value="Admin shouldn't be able to create a Store View with the same code"/> |
| 15 | + <description value="Admin shouldn't be able to create a Store View with the same code"/> |
16 | 16 | <group value="storeView"/>
|
17 | 17 | <severity value="AVERAGE"/>
|
18 |
| - <testCaseId value="MAGETWO-95111"/> |
| 18 | + <useCaseId value="MAGETWO-95111"/> |
| 19 | + <testCaseId value="MC-15422"/> |
19 | 20 | </annotations>
|
| 21 | + |
20 | 22 | <before>
|
21 |
| - <actionGroup ref="LoginActionGroup" stepKey="login"/> |
| 23 | + <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> |
22 | 24 | <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView" />
|
23 |
| - <!--<createData stepKey="b2" entity="customStoreGroup"/>--> |
24 | 25 | </before>
|
25 |
| - <!--Save store view on Store Grid--> |
26 |
| - <actionGroup ref="AdminCreateStoreViewActionSaveGroup" stepKey="createStoreViewSave" /> |
27 |
| - <!--Confirm new store view created on Store Grid--> |
28 |
| - <fillField selector="{{AdminStoresGridSection.storeFilterTextField}}" userInput="{{customStore.name}}" stepKey="fillStoreViewFilter"/> |
29 |
| - <click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearch" /> |
30 |
| - <waitForPageLoad stepKey="waitForPageLoad"/> |
31 |
| - <see selector="{{AdminStoresGridSection.storeNameInFirstRow}}" userInput="{{customStore.name}}" stepKey="seeNewStoreView" /> |
32 |
| - <!--Creating the same store view to validate the code uniqueness on store form--> |
33 |
| - <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView2" /> |
34 |
| - <actionGroup ref="AdminCreateStoreViewCodeUniquenessActionGroup" stepKey="createStoreViewCode" /> |
| 26 | + |
35 | 27 | <after>
|
36 | 28 | <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView">
|
37 | 29 | <argument name="customStore" value="customStore"/>
|
38 | 30 | </actionGroup>
|
| 31 | + <click selector="{{AdminStoresGridSection.resetButton}}" stepKey="resetSearchFilter"/> |
39 | 32 | <actionGroup ref="logout" stepKey="logout"/>
|
40 | 33 | </after>
|
| 34 | + |
| 35 | + <!--Filter grid and see created store view--> |
| 36 | + <amOnPage url="{{AdminSystemStorePage.url}}" 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"/> |
| 41 | + <!--Try to create store view with the same code--> |
| 42 | + <actionGroup ref="AdminCreateStoreViewWithoutCheckActionGroup" stepKey="createSameStoreView"/> |
| 43 | + <dontSeeElement selector="{{AdminMessagesSection.success}}" stepKey="dontSeeSuccessMessage"/> |
| 44 | + <see selector="{{AdminMessagesSection.error}}" userInput="Store with the same code already exists." stepKey="seeErrorMessage"/> |
41 | 45 | </test>
|
42 | 46 | </tests>
|
0 commit comments