|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminSaveCmsPageAfterCopyFromHeadingAndPasteToTextTest"> |
| 11 | + <annotations> |
| 12 | + <features value="PageBuilder"/> |
| 13 | + <stories value="Text"/> |
| 14 | + <title value="Save page after copy and paste between heading and text elements"/> |
| 15 | + <description value="Ensure cms page can be saved after copy text from one page builder element to another"/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <useCaseId value="MC-35220"/> |
| 18 | + <testCaseId value="MC-36666"/> |
| 19 | + <group value="pagebuilder"/> |
| 20 | + <group value="pagebuilder-heading"/> |
| 21 | + <group value="pagebuilder-text"/> |
| 22 | + </annotations> |
| 23 | + <before> |
| 24 | + <createData entity="_emptyCmsPage" stepKey="createCmsPage"/> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 26 | + <actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCmsPage"> |
| 27 | + <argument name="CMSPage" value="$createCmsPage$"/> |
| 28 | + </actionGroup> |
| 29 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 30 | + </before> |
| 31 | + <after> |
| 32 | + <deleteData createDataKey="createCmsPage" stepKey="deleteCmsPage"/> |
| 33 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 34 | + </after> |
| 35 | + <!-- Add Text and Heading --> |
| 36 | + <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection"> |
| 37 | + <argument name="contentType" value="PageBuilderHeadingContentType"/> |
| 38 | + </actionGroup> |
| 39 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragTextIntoStage"> |
| 40 | + <argument name="contentType" value="PageBuilderTextContentType"/> |
| 41 | + </actionGroup> |
| 42 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragHeadingIntoStage"> |
| 43 | + <argument name="contentType" value="PageBuilderHeadingContentType"/> |
| 44 | + </actionGroup> |
| 45 | + <!-- Enter Heading Content --> |
| 46 | + <actionGroup ref="enterHeadingOnStage" stepKey="enterHeadingOnStage"> |
| 47 | + <argument name="headingText" value="PageBuilderHeadingTextProperty"/> |
| 48 | + </actionGroup> |
| 49 | + <actionGroup ref="clickOutsideLiveEditHeading" stepKey="clickOutsideLiveEditHeading"> |
| 50 | + <argument name="index" value="1"/> |
| 51 | + </actionGroup> |
| 52 | + <actionGroup ref="clickInsideLiveEditHeading" stepKey="clickInsideLiveEditHeading"> |
| 53 | + <argument name="index" value="1"/> |
| 54 | + </actionGroup> |
| 55 | + <!-- Select all Heading content and copy, paste into Text --> |
| 56 | + <executeJS function="document.execCommand('selectall', null, false);" stepKey="selectAllText"/> |
| 57 | + <waitForPageLoad stepKey="waitForTextSelect"/> |
| 58 | + <pressKey selector="{{HeadingOnStage.baseByTagName(PageBuilderHeadingTypeProperty_H2.value, '1')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::CONTROL, \Facebook\WebDriver\WebDriverKeys::INSERT]" stepKey="copyAllText"/> |
| 59 | + <waitForPageLoad stepKey="waitForTextCopy"/> |
| 60 | + <actionGroup ref="clickOutsideLiveEditHeading" stepKey="clickOutsideLiveEditHeadingAfterCopy"> |
| 61 | + <argument name="index" value="1"/> |
| 62 | + </actionGroup> |
| 63 | + <clickWithLeftButton x="10" y="10" selector="{{TextOnStage.tinymce('1')}}" stepKey="focusOnTextEditorArea"/> |
| 64 | + <pressKey selector="{{TextOnStage.tinymce('1')}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::SHIFT, \Facebook\WebDriver\WebDriverKeys::INSERT]" stepKey="pasteAllText"/> |
| 65 | + <waitForPageLoad stepKey="waitForTextPaste"/> |
| 66 | + <!-- Save page and verify copy, paste --> |
| 67 | + <actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/> |
| 68 | + <actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="SaveAndContinueEdit"/> |
| 69 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStageAfterSave"/> |
| 70 | + <waitForElementVisible selector="{{HeadingOnStage.headingText(PageBuilderHeadingTypeProperty_H2.value, PageBuilderHeadingTextProperty.value, '1')}}" stepKey="waitForHeadingVisible"/> |
| 71 | + <waitForElementVisible selector="{{TextOnStage.text('1', PageBuilderHeadingTextProperty.value)}}" stepKey="waitForTextVisible"/> |
| 72 | + </test> |
| 73 | +</tests> |
0 commit comments