|
| 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 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="CheckStaticBlocksTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Cms"/> |
| 14 | + <stories value="MAGETWO-91559 - Static blocks with same ID appear in place of correct block"/> |
| 15 | + <title value="Check static blocks: ID should be unique per Store View"/> |
| 16 | + <description value="Check static blocks: ID should be unique per Store View"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MAGETWO-94229"/> |
| 19 | + <group value="Cms"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> |
| 23 | + <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="AdminCreateWebsite"> |
| 24 | + <argument name="newWebsiteName" value="secondWebsite"/> |
| 25 | + <argument name="websiteCode" value="second_website"/> |
| 26 | + </actionGroup> |
| 27 | + <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="AdminCreateStore"> |
| 28 | + <argument name="website" value="secondWebsite"/> |
| 29 | + <argument name="storeGroupName" value="{{customStoreGroup.name}}"/> |
| 30 | + <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/> |
| 31 | + </actionGroup> |
| 32 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="AdminCreateStoreView"> |
| 33 | + <argument name="StoreGroup" value="customStoreGroup"/> |
| 34 | + <argument name="customStore" value="customStore"/> |
| 35 | + </actionGroup> |
| 36 | + </before> |
| 37 | + |
| 38 | + <!--Go to Cms blocks page--> |
| 39 | + <amOnPage url="{{CmsBlocksPage.url}}" stepKey="navigateToCMSPagesGrid"/> |
| 40 | + <waitForPageLoad stepKey="waitForPageLoad1"/> |
| 41 | + <seeInCurrentUrl url="cms/block/" stepKey="VerifyPageIsOpened"/> |
| 42 | + <!--Click to create new block--> |
| 43 | + <click selector="{{BlockPageActionsSection.addNewBlock}}" stepKey="ClickToAddNewBlock"/> |
| 44 | + <waitForPageLoad stepKey="waitForPageLoad2"/> |
| 45 | + <seeInCurrentUrl url="cms/block/new" stepKey="VerifyNewBlockPageIsOpened"/> |
| 46 | + <actionGroup ref="FillOutBlockContent" stepKey="FillOutBlockContent"/> |
| 47 | + <click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="ClickToSaveBlock"/> |
| 48 | + <waitForPageLoad stepKey="waitForPageLoad3"/> |
| 49 | + <see userInput="You saved the block." stepKey="VerifyBlockIsSaved"/> |
| 50 | + <!--Click to go back and add new block--> |
| 51 | + <click selector="{{BlockNewPagePageActionsSection.back}}" stepKey="ClickToGoBack"/> |
| 52 | + <waitForPageLoad stepKey="waitForPageLoad4"/> |
| 53 | + <click selector="{{BlockPageActionsSection.addNewBlock}}" stepKey="ClickToAddNewBlock1"/> |
| 54 | + <waitForPageLoad stepKey="waitForPageLoad5"/> |
| 55 | + <seeInCurrentUrl url="cms/block/new" stepKey="VerifyNewBlockPageIsOpened1"/> |
| 56 | + <!--Add new BLock with the same data--> |
| 57 | + <actionGroup ref="FillOutBlockContent" stepKey="FillOutBlockContent1"/> |
| 58 | + <selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="Default Store View" stepKey="selectDefaultStoreView" /> |
| 59 | + <selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="{{customStore.name}}" stepKey="selectSecondStoreView1" /> |
| 60 | + <click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="ClickToSaveBlock1"/> |
| 61 | + <waitForPageLoad stepKey="waitForPageLoad6"/> |
| 62 | + <!--Verify that corresponding message is displayed--> |
| 63 | + <see userInput="A block identifier with the same properties already exists in the selected store." stepKey="VerifyBlockIsSaved1"/> |
| 64 | + |
| 65 | + <after> |
| 66 | + <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="DeleteWebsite"> |
| 67 | + <argument name="websiteName" value="secondWebsite"/> |
| 68 | + </actionGroup> |
| 69 | + <actionGroup ref="DeleteCMSBlockActionGroup" stepKey="DeleteCMSBlockActionGroup"/> |
| 70 | + </after> |
| 71 | + </test> |
| 72 | +</tests> |
0 commit comments