Skip to content

Commit 3bdb6e0

Browse files
committed
add MFTF for Cms Page
1 parent cfd6d98 commit 3bdb6e0

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

app/code/Magento/Cms/Test/Mftf/Section/CmsPagesPageActionsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@
3030
<element name="pageRowCheckboxByIdentifier" type="checkbox" selector="//table[@data-role='grid']//td[count(../../..//th[./*[.='URL Key']]/preceding-sibling::th) + 1][./*[.='{{identifier}}']]/../td//input[@data-action='select-row']" parameterized="true" />
3131
<element name="massActionsButton" type="button" selector="//div[@class='admin__data-grid-header'][(not(ancestor::*[@class='sticky-header']) and not(contains(@style,'visibility: hidden'))) or (ancestor::*[@class='sticky-header' and not(contains(@style,'display: none'))])]//button[contains(@class, 'action-select')]" />
3232
<element name="massActionsOption" type="button" selector="//div[@class='admin__data-grid-header'][(not(ancestor::*[@class='sticky-header']) and not(contains(@style,'visibility: hidden'))) or (ancestor::*[@class='sticky-header' and not(contains(@style,'display: none'))])]//span[contains(@class, 'action-menu-item') and .= '{{action}}']" parameterized="true"/>
33+
<element name="homePage" type="text" selector="//div[contains(text(),'Home page')]"/>
3334
</section>
3435
</sections>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminGoToCmsEditPageAfterClickPageOnGridTest">
11+
<annotations>
12+
<features value="Cms"/>
13+
<stories value="Go to CMS Edit Page"/>
14+
<title value="Go to CMS Edit Page after choosing page on the grid."/>
15+
<description value="Go to CMS Edit Page after choosing page on the grid."/>
16+
<severity value="MINOR"/>
17+
</annotations>
18+
<before>
19+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
20+
</before>
21+
<after>
22+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
23+
</after>
24+
25+
<amOnPage url="{{CmsPagesPage.url}}" stepKey="navigateToCMSPagesGrid"/>
26+
<waitForPageLoad stepKey="waitForGridLoad"/>
27+
<click selector="{{CmsPagesPageActionsSection.homePage}}" stepKey="navigateToHomePage"/>
28+
<waitForPageLoad stepKey="waitForCmsHomePageLoad"/>
29+
<seeInCurrentUrl url="cms/page/edit/page_id/2" stepKey="seeInHomePage"/>
30+
</test>
31+
</tests>

0 commit comments

Comments
 (0)