Skip to content

Commit

Permalink
ENGCOM-6965: Module_Cms MFTF test improvements #26928
Browse files Browse the repository at this point in the history
  • Loading branch information
slavvka committed Feb 25, 2020
2 parents c509eb9 + 3b49324 commit 9674607
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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="AdminSaveAndDuplicateCMSPageWithSplitButtonActionGroup">
<annotations>
<description>Clicks on the Save and Duplicate button.</description>
</annotations>

<waitForElementVisible selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="waitForExpandSplitButtonToBeVisible"/>
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn2" />
<click selector="{{CmsNewPagePageActionsSection.saveAndDuplicate}}" stepKey="clickSaveAndDuplicate" />
<waitForPageLoad stepKey="waitForPageLoadAfterClickingSaveAndDuplicate"/>
<see userInput="You saved the page." stepKey="seeSavedPageMsgOnForm"/>
<see userInput="You duplicated the page." stepKey="seeDuplicatedPageMsg"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?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="AssertAdminCmsPageSaveSplitButtonActionGroup">
<annotations>
<description>Verify Save and Duplicate and Save and Close button.</description>
</annotations>

<amOnPage url="{{CmsNewPagePage.url}}" stepKey="amOnPageCreationForm"/>
<waitForPageLoad stepKey="waitForPageLoad1"/>
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn1" />
<see selector="{{CmsNewPagePageActionsSection.saveAndDuplicate}}" userInput="Save &amp; Duplicate" stepKey="seeSaveAndDuplicate"/>
<see selector="{{CmsNewPagePageActionsSection.saveAndClose}}" userInput="Save &amp; Close" stepKey="seeSaveAndClose"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,19 @@
<after>
<actionGroup ref="logout" stepKey="logout"/>
</after>
<amOnPage url="{{CmsNewPagePage.url}}" stepKey="amOnPageCreationForm"/>
<waitForPageLoad stepKey="waitForPageLoad1"/>
<!--Verify Save&Duplicate button and Save&Close button-->
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn1" />
<see selector="{{CmsNewPagePageActionsSection.saveAndDuplicate}}" userInput="Save &amp; Duplicate" stepKey="seeSaveAndDuplicate"/>
<see selector="{{CmsNewPagePageActionsSection.saveAndClose}}" userInput="Save &amp; Close" stepKey="seeSaveAndClose"/>
<!--Create new CMS Page page-->
<actionGroup ref="FillOutCMSPageContent" stepKey="FillOutBlockContent"/>
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn2" />
<click selector="{{CmsNewPagePageActionsSection.saveAndDuplicate}}" stepKey="clickSaveAndDuplicate" />
<waitForPageLoad stepKey="waitForPageLoad3"/>
<see userInput="You saved the page." stepKey="seeSavedPageMsgOnForm"/>
<see userInput="You duplicated the page." stepKey="seeDuplicatedPageMsg"/>
<!-- Navigate to create a CMS page and Verify Save&Duplicate - Save&Close button -->
<actionGroup ref="AssertAdminCmsPageSaveSplitButtonActionGroup" stepKey="verifyCmsPageSaveButton" />
<!-- Filled out Content -->
<actionGroup ref="FillOutCMSPageContent" stepKey="FillOutPageContent"/>
<!-- Click save and duplicate action -->
<actionGroup ref="AdminSaveAndDuplicateCMSPageWithSplitButtonActionGroup" stepKey="clickSaveAndDuplicateButton"/>
<!--Verify duplicated CMS Page-->
<seeElement selector="{{BlockNewPageBasicFieldsSection.isActive('0')}}" stepKey="seeBlockNotEnable" />
<actionGroup ref="AssertCMSPageContentActionGroup" stepKey="assertContent"/>
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn3" />
<click selector="{{CmsNewPagePageActionsSection.saveAndClose}}" stepKey="clickSaveAndClose"/>
<see userInput="You saved the page." stepKey="seeSavedCMSPageMsgOnGrid"/>
<seeElement selector="div[data-role='grid-wrapper']" stepKey="seeGridPage" />
<!-- Click Save Button -->
<actionGroup ref="SaveCmsPageActionGroup" stepKey="clickSaveCmsPageButton"/>
<actionGroup ref="DeletePageByUrlKeyActionGroup" stepKey="deleteCMSPage">
<argument name="UrlKey" value="{{_duplicatedCMSPage.identifier}}"/>
</actionGroup>
</test>
</tests>

0 comments on commit 9674607

Please sign in to comment.