|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 9 | + <test name="AdminCreateDuplicateNameStoreViewTest"> |
| 10 | + <annotations> |
| 11 | + <features value="Store"/> |
| 12 | + <stories value="Create a store view in admin"/> |
| 13 | + <title value="Admin should be able to create a Store View with the same name"/> |
| 14 | + <description value="Admin should be able to create a Store View with the same name"/> |
| 15 | + <group value="storeView"/> |
| 16 | + <severity value="AVERAGE"/> |
| 17 | + </annotations> |
| 18 | + <before> |
| 19 | + <!--Create two store views with same name, but different codes--> |
| 20 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 21 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createFirstStoreView"> |
| 22 | + <argument name="StoreGroup" value="_defaultStoreGroup"/> |
| 23 | + <argument name="customStore" value="customStoreViewSameNameFirst"/> |
| 24 | + </actionGroup> |
| 25 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createSecondStoreView"> |
| 26 | + <argument name="StoreGroup" value="_defaultStoreGroup"/> |
| 27 | + <argument name="customStore" value="customStoreViewSameNameSecond"/> |
| 28 | + </actionGroup> |
| 29 | + </before> |
| 30 | + <after> |
| 31 | + <!--Delete both store views--> |
| 32 | + <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteFirstStoreView"> |
| 33 | + <argument name="customStore" value="customStoreViewSameNameFirst"/> |
| 34 | + </actionGroup> |
| 35 | + <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteSecondStoreView"> |
| 36 | + <argument name="customStore" value="customStoreViewSameNameSecond"/> |
| 37 | + </actionGroup> |
| 38 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 39 | + </after> |
| 40 | + <!--Get Id of store views--> |
| 41 | + <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="navigateToStoreViews"/> |
| 42 | + <click selector="{{AdminStoresGridSection.storeViewLinkInNthRow('2')}}" stepKey="openFirstViewPAge" /> |
| 43 | + <grabFromCurrentUrl stepKey="getStoreViewIdFirst" regex="~/store_id/(\d+)/~"/> |
| 44 | + <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="navigateToStoreViewsAgain"/> |
| 45 | + <click selector="{{AdminStoresGridSection.storeViewLinkInNthRow('3')}}" stepKey="openSecondViewPAge" /> |
| 46 | + <grabFromCurrentUrl stepKey="getStoreViewIdSecond" regex="~/store_id/(\d+)/~"/> |
| 47 | + <!--Go to catalog -> product grid, open the filter and check the listed store view--> |
| 48 | + <actionGroup ref="AdminCheckStoreViewOptionsActionGroup" stepKey="checkFirstStoreView"> |
| 49 | + <argument name="storeViewId" value="{$getStoreViewIdFirst}"/> |
| 50 | + </actionGroup> |
| 51 | + <actionGroup ref="AdminCheckStoreViewOptionsActionGroup" stepKey="checkSecondStoreView"> |
| 52 | + <argument name="storeViewId" value="{$getStoreViewIdSecond}"/> |
| 53 | + </actionGroup> |
| 54 | + </test> |
| 55 | +</tests> |
0 commit comments