Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest">
<annotations>
<features value="Cms"/>
<stories value="Default layout configuration MAGETWO-88793"/>
<title value="Admin should be able to configure the default layout for CMS Page from System Configuration"/>
<description value="Admin should be able to configure the default layout for CMS Page from System Configuration"/>
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-89025"/>
<group value="Cms"/>
</annotations>
<before>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="RestoreLayoutSetting" stepKey="sampleActionGroup"/>
<actionGroup ref="logout" stepKey="logout"/>
</after>
<amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<conditionalClick stepKey="expandDefaultLayouts" selector="{{WebSection.DefaultLayoutsTab}}" dependentSelector="{{WebSection.CheckIfTabExpand}}" visible="true" />
<waitForElementVisible selector="{{DefaultLayoutsSection.pageLayout}}" stepKey="DefaultProductLayout" />
<seeOptionIsSelected selector="{{DefaultLayoutsSection.pageLayout}}" userInput="1 column" stepKey="seeOneColumnSelected" />
<seeOptionIsSelected selector="{{DefaultLayoutsSection.productLayout}}" userInput="No layout updates" stepKey="seeNoLayoutUpdatesSelected1" />
<seeOptionIsSelected selector="{{DefaultLayoutsSection.categoryLayout}}" userInput="No layout updates" stepKey="seeNoLayoutUpdatesSelected2" />
<selectOption selector="{{DefaultLayoutsSection.pageLayout}}" userInput="2 columns with right bar" stepKey="selectColumnsWithRightBar"/>
<click selector="{{ContentManagementSection.Save}}" stepKey="clickSaveConfig" />
<amOnPage url="{{CmsNewPagePage.url}}" stepKey="amOnPagePagesGrid"/>
<waitForPageLoad stepKey="waitForPageLoad1"/>
<waitForLoadingMaskToDisappear stepKey="wait2" />
<click selector="{{CmsDesignSection.DesignTab}}" stepKey="clickOnDesignTab"/>
<waitForElementVisible selector="{{CmsDesignSection.LayoutDropdown}}" stepKey="waitForLayoutDropDown" />
<seeOptionIsSelected selector="{{CmsDesignSection.LayoutDropdown}}" userInput="2 columns with right bar" stepKey="seeColumnsWithRightBar" />
</test>
</tests>
74 changes: 3 additions & 71 deletions app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsPageTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,76 +29,8 @@
<actionGroup ref="CreateNewPageWithBasicValues" stepKey="createNewPageWithBasicValues" />
<actionGroup ref="SaveCmsPageActionGroup" stepKey="clickSaveCmsPageButton" />
<actionGroup ref="VerifyCreatedCmsPage" stepKey="verifyCmsPage" />
</test>
<test name="AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest">
<annotations>
<features value="Cms"/>
<stories value="Default layout configuration MAGETWO-88793"/>
<title value="Admin should be able to configure the default layout for CMS Page from System Configuration"/>
<description value="Admin should be able to configure the default layout for CMS Page from System Configuration"/>
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-89025"/>
<group value="Cms"/>
</annotations>
<before>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="RestoreLayoutSetting" stepKey="sampleActionGroup"/>
<actionGroup ref="logout" stepKey="logout"/>
</after>
<amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<conditionalClick stepKey="expandDefaultLayouts" selector="{{WebSection.DefaultLayoutsTab}}" dependentSelector="{{WebSection.CheckIfTabExpand}}" visible="true" />
<waitForElementVisible selector="{{DefaultLayoutsSection.pageLayout}}" stepKey="DefaultProductLayout" />
<seeOptionIsSelected selector="{{DefaultLayoutsSection.pageLayout}}" userInput="1 column" stepKey="seeOneColumnSelected" />
<seeOptionIsSelected selector="{{DefaultLayoutsSection.productLayout}}" userInput="No layout updates" stepKey="seeNoLayoutUpdatesSelected1" />
<seeOptionIsSelected selector="{{DefaultLayoutsSection.categoryLayout}}" userInput="No layout updates" stepKey="seeNoLayoutUpdatesSelected2" />
<selectOption selector="{{DefaultLayoutsSection.pageLayout}}" userInput="2 columns with right bar" stepKey="selectColumnsWithRightBar"/>
<click selector="{{ContentManagementSection.Save}}" stepKey="clickSaveConfig" />
<amOnPage url="{{CmsNewPagePage.url}}" stepKey="amOnPagePagesGrid"/>
<waitForPageLoad stepKey="waitForPageLoad1"/>
<waitForLoadingMaskToDisappear stepKey="wait2" />
<click selector="{{CmsDesignSection.DesignTab}}" stepKey="clickOnDesignTab"/>
<waitForElementVisible selector="{{CmsDesignSection.LayoutDropdown}}" stepKey="waitForLayoutDropDown" />
<seeOptionIsSelected selector="{{CmsDesignSection.LayoutDropdown}}" userInput="2 columns with right bar" stepKey="seeColumnsWithRightBar" />
</test>
<test name="AdminCreateDuplicatedCmsPageTest">
<annotations>
<features value="Cms"/>
<stories value="CMS Page Duplication and Reset Removal MAGETWO-87096"/>
<title value="Admin should be able to duplicate a CMS Page"/>
<description value="Admin should be able to duplicate a CMS Page"/>
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-89184"/>
<group value="Cms"/>
</annotations>
<before>
<actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/>
<actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/>
</before>
<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"/>
<!--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" />
<actionGroup ref="DeletePageByUrlKeyActionGroup" stepKey="deletePage">
<argument name="UrlKey" value="{{_defaultCmsPage.identifier}}"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminCreateDuplicatedCmsPageTest">
<annotations>
<features value="Cms"/>
<stories value="CMS Page Duplication and Reset Removal MAGETWO-87096"/>
<title value="Admin should be able to duplicate a CMS Page"/>
<description value="Admin should be able to duplicate a CMS Page"/>
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-89184"/>
<group value="Cms"/>
</annotations>
<before>
<actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/>
<actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rogyar I don't remember, but it's no longer necessary to add this. How do you think?

</before>
<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"/>
<!--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" />
</test>
</tests>