Skip to content

Commit fab844d

Browse files
ENGCOM-6687: Covered admin cms block creatation with MFTF test #26537
- Merge Pull Request #26537 from ajithkumar-maragathavel/magento2-1:cms-block-creation-mftf-test - Merged commits: 1. 345acd1 2. a7a619a
2 parents 06a0dd0 + a7a619a commit fab844d

File tree

3 files changed

+60
-1
lines changed

3 files changed

+60
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="VerifyCmsBlockSaveSplitButtonActionGroup">
12+
<annotations>
13+
<description>verify Save and Close and Save and Duplicate button.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{CmsNewBlock.url}}" stepKey="amOnBlocksCreationForm"/>
17+
<waitForPageLoad stepKey="waitForPageLoad1"/>
18+
<!--Verify Save&Duplicate button and Save&Close button-->
19+
<click selector="{{BlockNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn1" />
20+
<see selector="{{BlockNewPagePageActionsSection.saveAndDuplicate}}" userInput="Save &amp; Duplicate" stepKey="seeSaveAndDuplicate"/>
21+
<see selector="{{BlockNewPagePageActionsSection.saveAndClose}}" userInput="Save &amp; Close" stepKey="seeSaveAndClose"/>
22+
</actionGroup>
23+
</actionGroups>

app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@
4949
<see userInput="You saved the block." stepKey="seeSavedBlockMsgOnGrid"/>
5050
<seeElement selector="div[data-role='grid-wrapper']" stepKey="seeGridPage" />
5151
</test>
52-
</tests>
52+
</tests>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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="AdminSaveAndCloseCmsBlockTest">
12+
<annotations>
13+
<features value="Cms"/>
14+
<stories value="CMS Block Creation and Reset Removal"/>
15+
<title value="Admin should be able to create a CMS block"/>
16+
<description value="Admin should be able to create a CMS block using save and close"/>
17+
<severity value="CRITICAL"/>
18+
<group value="Cms"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/>
22+
<actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/>
23+
</before>
24+
<after>
25+
<actionGroup ref="deleteBlock" stepKey="deleteCreatedBlock">
26+
<argument name="Block" value="_defaultBlock"/>
27+
</actionGroup>
28+
<actionGroup ref="logout" stepKey="logout"/>
29+
</after>
30+
<!-- Navigate to create cms block page and verify save split button -->
31+
<actionGroup ref="VerifyCmsBlockSaveSplitButtonActionGroup" stepKey="verifyCmsBlockSaveSplitButton" />
32+
<!--Create new CMS Block page-->
33+
<actionGroup ref="FillOutBlockContent" stepKey="FillOutBlockContent"/>
34+
<actionGroup ref="SaveAndCloseCMSBlockWithSplitButtonActionGroup" stepKey="saveCmsBlockContent" />
35+
</test>
36+
</tests>

0 commit comments

Comments
 (0)