|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + *CreateNewPage 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" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminUpdateCmsPageEntityTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Cms"/> |
| 14 | + <title value="Update CMS Page via the Admin"/> |
| 15 | + <description value="Admin should be able to update a CMS Page"/> |
| 16 | + <group value="backend"/> |
| 17 | + <group value="cMSContent"/> |
| 18 | + <group value="mtf_migrated"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 22 | + <createData entity="_defaultCmsPage" stepKey="createCMSPage" /> |
| 23 | + </before> |
| 24 | + <after> |
| 25 | + <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage" /> |
| 26 | + <actionGroup ref="logout" stepKey="logout"/> |
| 27 | + </after> |
| 28 | + <!--Update page, deactivate--> |
| 29 | + <!--Navigate to Page in Admin--> |
| 30 | + <actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage"> |
| 31 | + <argument name="CMSPage" value="$$createCMSPage$$"/> |
| 32 | + </actionGroup> |
| 33 | + <!--Fill data using _duplicatedCMSPage--> |
| 34 | + <actionGroup ref="FillOutCMSPageContent" stepKey="fillNewData"/> |
| 35 | + <!--Deactivate page--> |
| 36 | + <seeElement selector="{{CmsNewPagePageBasicFieldsSection.isActive('1')}}" stepKey="seePageIsEnabled" /> |
| 37 | + <click selector="{{CmsNewPagePageBasicFieldsSection.isActiveLabel}}" stepKey="setPageNotActive"/> |
| 38 | + <!--Save page--> |
| 39 | + <actionGroup ref="saveCmsPage" stepKey="saveDeactivatedPage"/> |
| 40 | + <!--Check that page is not found on frontend--> |
| 41 | + <amOnPage url="{{StorefrontHomePage.url}}/{{_duplicatedCMSPage.identifier}}" stepKey="amOnDeactivatedPageOnFrontend"/> |
| 42 | + <waitForPageLoad stepKey="waitForDeactivatedPageLoadOnFrontend"/> |
| 43 | + <see userInput="Whoops, our bad..." stepKey="seePageError"/> |
| 44 | + <!--Check page data is updated properly--> |
| 45 | + <!--Navigate to Page in Admin--> |
| 46 | + <actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToUpdatedCMSPageInAdmin"> |
| 47 | + <argument name="CMSPage" value="_duplicatedCMSPage"/> |
| 48 | + </actionGroup> |
| 49 | + <!--Verify data in admin--> |
| 50 | + <actionGroup ref="AssertCMSPageContent" stepKey="verifyPageDataInAdmin"/> |
| 51 | + <!--Activate page--> |
| 52 | + <seeElement selector="{{CmsNewPagePageBasicFieldsSection.isActive('0')}}" stepKey="seePageIsDisabled" /> |
| 53 | + <click selector="{{CmsNewPagePageBasicFieldsSection.isActiveLabel}}" stepKey="setPageActive"/> |
| 54 | + <actionGroup ref="saveCmsPage" stepKey="saveActivatedPage"/> |
| 55 | + <!--Flush cache--> |
| 56 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 57 | + <!--Verify data on frontend--> |
| 58 | + <amOnPage url="{{StorefrontHomePage.url}}/{{_duplicatedCMSPage.identifier}}" stepKey="amOnPageTestPage"/> |
| 59 | + <actionGroup ref="AssertStoreFrontCMSPage" stepKey="verifyPageDataOnFrontend"> |
| 60 | + <argument name="cmsTitle" value="{{_duplicatedCMSPage.title}}"/> |
| 61 | + <argument name="cmsContent" value="{{_duplicatedCMSPage.content}}"/> |
| 62 | + <argument name="cmsContentHeading" value="{{_duplicatedCMSPage.content_heading}}"/> |
| 63 | + </actionGroup> |
| 64 | + </test> |
| 65 | +</tests> |
0 commit comments