Skip to content

Commit 6d54b10

Browse files
ENGCOM-6766: Action group added for existing test #26568
- Merge Pull Request #26568 from ajithkumar-maragathavel/magento2-1:cms-page-mftf-test - Merged commits: 1. e22b34b
2 parents d71050a + e22b34b commit 6d54b10

File tree

4 files changed

+68
-19
lines changed

4 files changed

+68
-19
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminNavigateToPageGridActionGroup">
12+
<annotations>
13+
<description>Navigates to CMS page grid.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{CmsPagesPage.url}}" stepKey="amOnPagePagesGrid"/>
17+
<waitForPageLoad stepKey="waitForPageLoad1"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="CreateNewPageWithBasicValues">
12+
<annotations>
13+
<description>Click Add new page button and fills basic information in cms page. Values are hardcoded from _defaultCmsPage.</description>
14+
</annotations>
15+
16+
<click selector="{{CmsPagesPageActionsSection.addNewPageButton}}" stepKey="clickAddNewPage"/>
17+
<fillField selector="{{CmsNewPagePageBasicFieldsSection.pageTitle}}" userInput="{{_defaultCmsPage.title}}" stepKey="fillFieldTitle"/>
18+
<click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContent"/>
19+
<fillField selector="{{CmsNewPagePageContentSection.contentHeading}}" userInput="{{_defaultCmsPage.content_heading}}" stepKey="fillFieldContentHeading"/>
20+
<fillField selector="{{CmsNewPagePageContentSection.content}}" userInput="{{_defaultCmsPage.content}}" stepKey="fillFieldContent"/>
21+
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
22+
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="VerifyCreatedCmsPage">
12+
<annotations>
13+
<description>Verify created cms page in store front. Values are hardcoded from _defaultCmsPage.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{_defaultCmsPage.identifier}}" stepKey="amOnPageTestPage"/>
17+
<waitForPageLoad stepKey="waitForPageLoad2"/>
18+
<see userInput="{{_defaultCmsPage.content_heading}}" stepKey="seeContentHeading"/>
19+
<see userInput="{{_defaultCmsPage.content}}" stepKey="seeContent"/>
20+
</actionGroup>
21+
</actionGroups>

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

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,10 @@
2525
<after>
2626
<actionGroup ref="logout" stepKey="adminLogout"/>
2727
</after>
28-
<amOnPage url="{{CmsPagesPage.url}}" stepKey="amOnPagePagesGrid"/>
29-
<waitForPageLoad stepKey="waitForPageLoad1"/>
30-
<click selector="{{CmsPagesPageActionsSection.addNewPageButton}}" stepKey="clickAddNewPage"/>
31-
<fillField selector="{{CmsNewPagePageBasicFieldsSection.pageTitle}}" userInput="{{_defaultCmsPage.title}}" stepKey="fillFieldTitle"/>
32-
<click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContent"/>
33-
<fillField selector="{{CmsNewPagePageContentSection.contentHeading}}" userInput="{{_defaultCmsPage.content_heading}}" stepKey="fillFieldContentHeading"/>
34-
<!-- As of 2017/11/15, this test is failing here (Jenkins only, works locally). See MQE-282. -->
35-
<fillField selector="{{CmsNewPagePageContentSection.content}}" userInput="{{_defaultCmsPage.content}}" stepKey="fillFieldContent"/>
36-
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
37-
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>
38-
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForSaveButtonVisible"/>
39-
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandButtonMenu"/>
40-
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.splitButtonMenu}}" stepKey="waitForSplitButtonMenuVisible"/>
41-
<click selector="{{CmsNewPagePageActionsSection.savePage}}" stepKey="clickSavePage"/>
42-
<see userInput="You saved the page." stepKey="seeSuccessMessage"/>
43-
<amOnPage url="{{_defaultCmsPage.identifier}}" stepKey="amOnPageTestPage"/>
44-
<waitForPageLoad stepKey="waitForPageLoad2"/>
45-
<see userInput="{{_defaultCmsPage.content_heading}}" stepKey="seeContentHeading"/>
46-
<see userInput="{{_defaultCmsPage.content}}" stepKey="seeContent"/>
28+
<actionGroup ref="AdminNavigateToPageGridActionGroup" stepKey="navigateToCmsPageGrid" />
29+
<actionGroup ref="CreateNewPageWithBasicValues" stepKey="createNewPageWithBasicValues" />
30+
<actionGroup ref="SaveCmsPageActionGroup" stepKey="clickSaveCmsPageButton" />
31+
<actionGroup ref="VerifyCreatedCmsPage" stepKey="verifyCmsPage" />
4732
</test>
4833
<test name="AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest">
4934
<annotations>

0 commit comments

Comments
 (0)