Skip to content

Commit a7a619a

Browse files
Action group added and MFTF test moved to seperate file
1 parent 345acd1 commit a7a619a

File tree

3 files changed

+60
-33
lines changed

3 files changed

+60
-33
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 & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -49,36 +49,4 @@
4949
<see userInput="You saved the block." stepKey="seeSavedBlockMsgOnGrid"/>
5050
<seeElement selector="div[data-role='grid-wrapper']" stepKey="seeGridPage" />
5151
</test>
52-
<test name="AdminCreateCmsBlockTest">
53-
<annotations>
54-
<features value="Cms"/>
55-
<stories value="CMS Block Creation and Reset Removal"/>
56-
<title value="Admin should be able to create a CMS block"/>
57-
<description value="Admin should be able to create a CMS block"/>
58-
<severity value="CRITICAL"/>
59-
<group value="Cms"/>
60-
</annotations>
61-
<before>
62-
<actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/>
63-
<actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/>
64-
</before>
65-
<after>
66-
<actionGroup ref="deleteBlock" stepKey="deleteCreatedBlock">
67-
<argument name="Block" value="_defaultBlock"/>
68-
</actionGroup>
69-
<actionGroup ref="logout" stepKey="logout"/>
70-
</after>
71-
<amOnPage url="{{CmsNewBlock.url}}" stepKey="amOnBlocksCreationForm"/>
72-
<waitForPageLoad stepKey="waitForPageLoad1"/>
73-
<!--Verify Save&Duplicate button and Save&Close button-->
74-
<click selector="{{BlockNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn1" />
75-
<see selector="{{BlockNewPagePageActionsSection.saveAndDuplicate}}" userInput="Save &amp; Duplicate" stepKey="seeSaveAndDuplicate"/>
76-
<see selector="{{BlockNewPagePageActionsSection.saveAndClose}}" userInput="Save &amp; Close" stepKey="seeSaveAndClose"/>
77-
<!--Create new CMS Block page-->
78-
<actionGroup ref="FillOutBlockContent" stepKey="FillOutBlockContent"/>
79-
<click selector="{{BlockNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn2" />
80-
<click selector="{{BlockNewPagePageActionsSection.saveAndClose}}" stepKey="clickSaveAndClose" />
81-
<waitForPageLoad stepKey="waitForPageLoad3"/>
82-
<see userInput="You saved the block." stepKey="seeSavedBlockMsgOnForm"/>
83-
</test>
84-
</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)