Skip to content

Commit

Permalink
MC-42290: Check bind changes are covered by test
Browse files Browse the repository at this point in the history
- Add some validations to the test
  • Loading branch information
eliseacornejo committed May 18, 2021
1 parent e7f6670 commit af4a2d3
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminClickViewThemeActionGroup">
<annotations>
<description>Clicks on 'View' action of one theme on the themes grid.</description>
</annotations>
<click selector="{{AdminThemeSection.viewAction}}" stepKey="clickViewTheme"/>
</actionGroup>
</actionGroups>
3 changes: 0 additions & 3 deletions app/code/Magento/Theme/Test/Mftf/Data/AdminMenuData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,4 @@
<data key="title">Themes</data>
<data key="dataUiId">magento-theme-system-design-theme</data>
</entity>
<entity name="MagentoBlankEditTheme">
<data key="pageTitle">Theme: Magento Blank</data>
</entity>
</entities>
16 changes: 16 additions & 0 deletions app/code/Magento/Theme/Test/Mftf/Data/ThemeData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
<entity name="MagentoBlankTheme">
<data key="pageTitle">Theme: Magento Blank</data>
<data key="themePath">Magento/blank</data>
<data key="themeTitle">Magento Blank</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminThemeSettingsSection">
<element name="themePath" type="text" selector=".field-theme_path"/>
<element name="themeTitle" type="text" selector=".field-theme_title"/>
<element name="themePreviewImage" type="text" selector="//div[contains(@class, 'field-preview_image')]//label//span[contains(text(), 'Theme Preview Image')]"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@
<argument name="title" value="{{AdminMenuContentDesignThemes.pageTitle}}"/>
</actionGroup>

<click selector="{{AdminThemeSection.viewAction}}" stepKey="clickViewTheme"/>
<actionGroup ref="AdminClickViewThemeActionGroup" stepKey="editTheme"/>

<actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seeEditPageTitle">
<argument name="title" value="{{MagentoBlankEditTheme.pageTitle}}"/>
<argument name="title" value="{{MagentoBlankTheme.pageTitle}}"/>
</actionGroup>

<see selector="{{AdminThemeSettingsSection.themePath}}" userInput="{{MagentoBlankTheme.themePath}}" stepKey="assertThemePath"/>
<see selector="{{AdminThemeSettingsSection.themeTitle}}" userInput="{{MagentoBlankTheme.themeTitle}}" stepKey="assertThemeTitle"/>
<seeElementInDOM selector="{{AdminThemeSettingsSection.themePreviewImage}}" stepKey="seeThemePreviewImage"/>
</test>
</tests>

0 comments on commit af4a2d3

Please sign in to comment.