Skip to content

Commit 2d291ad

Browse files
authored
Merge pull request #33653 from andrewbess/CE-33580-cover-web-setup-page-with-mftf
The Web Setup landing page has been covered with MFTF tests
2 parents 3dd4f41 + ae23ad7 commit 2d291ad

File tree

7 files changed

+133
-0
lines changed

7 files changed

+133
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="GoToWebSetupPageActionGroup">
11+
<annotations>
12+
<description>Go to the Web Setup Page</description>
13+
</annotations>
14+
15+
<amOnPage url="{{WebSetupPage.url}}" stepKey="goToWebSetupPage"/>
16+
<waitForPageLoad stepKey="waitForWebSetupPageLoad" time="10"/>
17+
<seeElementInDOM selector="{{WebSetupPageLandingSection.section}}" stepKey="assertSetupPageHasLandingSection"/>
18+
<seeElementInDOM selector="{{WebSetupPageLicenseSection.section}}" stepKey="assertSetupPageHasLicenseSection"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="WebSetupShowLandingSectionActionGroup">
11+
<annotations>
12+
<description>Action for showing landing section and closing license section on Web Setup Page</description>
13+
</annotations>
14+
15+
<click selector="{{WebSetupPageLicenseSection.go_back_button}}" stepKey="showLandingSection"/>
16+
<waitForElementVisible selector="{{WebSetupPageLandingSection.section}}" stepKey="waitForVisibleWebSetupPageLandingSection" time="5"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="WebSetupShowLicenseSectionActionGroup">
11+
<annotations>
12+
<description>Action for showing license section on Web Setup Page</description>
13+
</annotations>
14+
15+
<click selector="{{WebSetupPageLandingSection.terms_and_agreement_link}}" stepKey="showLicenseSection"/>
16+
<waitForElementVisible selector="{{WebSetupPageLicenseSection.section}}" stepKey="waitForVisibleWebSetupPageLicenseSection" time="5"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
10+
<page name="WebSetupPage" url="setup/" area="storefront" module="Magento_Backend">
11+
<section name="WebSetupLandingPageSection"/>
12+
<section name="WebSetupLicensePageSection"/>
13+
</page>
14+
</pages>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="WebSetupPageLandingSection">
11+
<element name="section" type="text" selector="section[data-section=landing]"/>
12+
<element name="logo" type="text" selector="section[data-section=landing] > img.logo"/>
13+
<element name="version" type="text" selector="section[data-section=landing] > p.text-version"/>
14+
<element name="welcome" type="text" selector="section[data-section=landing] > p.text-welcome"/>
15+
<element name="terms_and_agreement_link" type="text" selector="section[data-section=landing] > p.text-welcome > a[href^='javascript:showSection'][href*='license']"/>
16+
</section>
17+
</sections>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="WebSetupPageLicenseSection">
11+
<element name="section" type="text" selector="section[data-section=license]"/>
12+
<element name="license_text" type="text" selector="section[data-section=license] div.license-text"/>
13+
<element name="go_back_button" type="button" selector="section[data-section=license] div.page-license-footer button[onclick^='showSection'][onclick*='landing']"/>
14+
</section>
15+
</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+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="WebSetupPageTest">
11+
<annotations>
12+
<features value="Setup"/>
13+
<stories value="Setup Magento via Web Interface"/>
14+
<title value="Setup Magento via Web Interface"/>
15+
<description value="Setup Magento via Web Interface should show only landing section with logo, version, and welcome and licence section"/>
16+
<severity value="MAJOR"/>
17+
</annotations>
18+
<actionGroup ref="GoToWebSetupPageActionGroup" stepKey="goToWebSetupPage"/>
19+
<seeElement selector="{{WebSetupPageLandingSection.section}}" stepKey="assertLandingSectionVisibleInSetupPage"/>
20+
<dontSeeElement selector="{{WebSetupPageLicenseSection.section}}" stepKey="assertLicenseSectionInvisibleInSetupPage"/>
21+
<seeElement selector="{{WebSetupPageLandingSection.logo}}" stepKey="assertSetupPageLogoVisibleInSetupPage"/>
22+
<seeElement selector="{{WebSetupPageLandingSection.version}}" stepKey="assertVersionVisibleInSetupPage"/>
23+
<seeElement selector="{{WebSetupPageLandingSection.welcome}}" stepKey="assertWelcomeVisibleInSetupPage"/>
24+
<actionGroup ref="WebSetupShowLicenseSectionActionGroup" stepKey="showLicense"/>
25+
<seeElement selector="{{WebSetupPageLicenseSection.section}}" stepKey="assertLicenseSectionVisibleInSetupPage"/>
26+
<dontSeeElement selector="{{WebSetupPageLandingSection.section}}" stepKey="assertLandingSectionInvisibleInSetupPage"/>
27+
<actionGroup ref="WebSetupShowLandingSectionActionGroup" stepKey="goBackToLanding"/>
28+
<seeElement selector="{{WebSetupPageLandingSection.section}}" stepKey="assertLandingSectionVisibleAfterGoingBackFromLicenseSection"/>
29+
<dontSeeElement selector="{{WebSetupPageLicenseSection.section}}" stepKey="assertLicenseSectionInvisibleAfterGoingBackFromLicenseSection"/>
30+
</test>
31+
</tests>

0 commit comments

Comments
 (0)