Skip to content

Commit 42de8b4

Browse files
Merge pull request #583 from magento/510_7_content-snapshot-cms-admin-page
#510: User edits CMS page content in full-screen mode only - #7 Fix broken tests
2 parents cae2fb7 + 9872b75 commit 42de8b4

File tree

641 files changed

+924
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

641 files changed

+924
-91
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/AdminActionGroup/SwitchToPageBuilderStageActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<waitForElementVisible time="30" selector="{{snapshotSelector}}" stepKey="waitForSnapshot"/>
2222
<waitForElementVisible time="30" selector="{{editButtonSelector}}" stepKey="waitForEditButton"/>
2323
<click selector="{{editButtonSelector}}" stepKey="clickEditButton"/>
24+
<waitForPageLoad stepKey="waitForFullScreenAnimation"/>
2425
<!-- Wait for the first row to be added into the stage for it to be "ready" -->
2526
<waitForElementNotVisible selector="{{PageBuilderStage.stageLoading}}" stepKey="waitForStageLoadingGraphicNotVisible"/>
2627
<waitForElementVisible time="30" selector="{{RowOnStage.base(rowIndex)}}" stepKey="waitForPageBuilderRow"/>

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/BackgroundConfigurationActionGroup/ValidateParallaxVideoBackgroundWithAllAttributesActionGroup.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
<annotations>
1212
<description>Validates all video background attributes when all attributes are configured and parallax is enabled. Extends: validateVideoBackgroundWithAllAttributes</description>
1313
</annotations>
14+
<arguments>
15+
<argument name="expectedPosition" defaultValue="position: fixed;" type="string"/>
16+
</arguments>
1417
<assertStringContainsString stepKey="assertVideoPosition">
15-
<expectedResult type="string">position: fixed;</expectedResult>
18+
<expectedResult type="string">{{expectedPosition}}</expectedResult>
1619
<actualResult type="variable">$videoStyle</actualResult>
1720
</assertStringContainsString>
1821
<assertStringContainsString stepKey="assertImagePosition">
19-
<expectedResult type="string">position: fixed;</expectedResult>
22+
<expectedResult type="string">{{expectedPosition}}</expectedResult>
2023
<actualResult type="variable">$fallbackImageStyle</actualResult>
2124
</assertStringContainsString>
2225
</actionGroup>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="ScrollToActionGroup">
11+
<arguments>
12+
<argument name="cssSelector" type="string"/>
13+
<argument name="index" defaultValue="1" type="string" />
14+
<argument name="verticalOffset" defaultValue="0" type="string"/>
15+
</arguments>
16+
<executeJS function="return document.querySelectorAll('{{cssSelector}}')[{{index}}-1].offsetTop" stepKey="elementPosition"/>
17+
<executeJS function="document.querySelector('{{PageBuilderStage.stageWrapperFullScreen}}').scrollTop = parseInt({$elementPosition} - {{verticalOffset}}, 10)" stepKey="scrollToElement"/>
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderSliderSection/SliderOnStageSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<section name="SliderOnStage">
1111
<element name="all" type="button" selector="div[data-content-type=slider]"/>
1212
<element name="base" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}]" parameterized="true"/>
13+
<element name="baseCSS" type="button" selector="div.pagebuilder-content-type.pagebuilder-slider"/>
1314
<element name="containerCSS" type="text" selector="[data-content-type=slider] &gt; .slider-container"/>
1415
<element name="hidden" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}]/ancestor::*[contains(@class, 'pagebuilder-content-type-wrapper') and contains(@class, 'pagebuilder-content-type-hidden')]" parameterized="true"/>
1516
<element name="notHidden" type="button" selector="(//div[@data-content-type='slider'])[{{sliderIndex}}]/parent::*[contains(@class, 'pagebuilder-content-type-wrapper') and not(contains(@class, 'pagebuilder-content-type-hidden'))][1]" parameterized="true"/>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderStageSection/PageBuilderStageSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<element name="exitFullScreen" type="button" selector=".pagebuilder-header .icon-pagebuilder-fullscreen-exit"/>
1717
<element name="stageLoading" type="button" selector="div.pagebuilder-stage-loading"/>
1818
<element name="stageWrapper" type="button" selector="//div[@class='pagebuilder-stage-wrapper']"/>
19-
<element name="snapshot" type="button" selector="div.pagebuilder-content-snapshot"/>
19+
<element name="snapshot" type="button" selector="div.stage-content-snapshot"/>
2020
<element name="editButtonSelector" type="button" selector="//button/span[contains(text(), 'Edit with Page Builder')]"/>
2121
<element name="enabled" type="button" selector="//div[not(contains(@class, '_disabled'))]/div[contains(@class, 'pagebuilder-wysiwyg-wrapper')]/div[@class='pagebuilder-stage-wrapper']"/>
2222
<element name="disabled" type="button" selector="//div[contains(@class, '_disabled')]/div[contains(@class, 'pagebuilder-wysiwyg-wrapper')]/div[@class='pagebuilder-stage-wrapper']"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCMSBlockPageBuilderTest/PageBuilderCmsBlockAddAndEditRowColumnSlideTest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
<seeNumberOfElements selector="{{ColumnOnFrontend.allColumns}}" userInput="2" stepKey="see2ColumnsCMSPageStage" after="seeBackgroundColorRowCMSPageStage"/>
7070
<seeElement selector="{{ColumnOnFrontend.backgroundColor('2', PageBuilderBackgroundColor_Hex_White.rgb)}}" stepKey="seeBackgroundColorColumnCMSPageStage" after="see2ColumnsCMSPageStage"/>
7171
<seeElement selector="{{SlideOnFrontend.backgroundColor('1', PageBuilderBackgroundColor_Plaintext_Green.rgb)}}" stepKey="seeBackgroundColorSlide1CMSPageStage" after="seeBackgroundColorColumnCMSPageStage"/>
72-
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage" after="seeBackgroundColorSlide1CMSPageStage"/>
72+
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen2" after="seeBackgroundColorSlide1CMSPageStage"/>
73+
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage" after="exitPageBuilderFullScreen2"/>
7374
<!-- Validate CMS Page Storefront -->
7475
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToProductStorefront">
7576
<argument name="page" value="$$createCMSPage.identifier$$"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCMSBlockPageBuilderTest/PageBuilderCmsBlockFullScreenCoversEntireScreenTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@
3232
<deleteData createDataKey="createPreReqBlock" stepKey="deleteCreatedProduct" before="logout"/>
3333
<deleteData createDataKey="createCMSPage" stepKey="deleteCreatedCategory" after="deleteCreatedProduct"/>
3434
</after>
35+
<actionGroup ref="openPageBuilderFullScreen" stepKey="openPageBuilderFullScreen"/>
3536
</test>
3637
</tests>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCMSBlockPageBuilderTest/PageBuilderCmsBlockFullScreenLeftPanelHeightAndFunctionalityTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@
3232
<deleteData createDataKey="createPreReqBlock" stepKey="deleteCreatedProduct" before="logout"/>
3333
<deleteData createDataKey="createCMSPage" stepKey="deleteCreatedCategory" after="deleteCreatedProduct"/>
3434
</after>
35+
<actionGroup ref="openPageBuilderFullScreen" stepKey="openPageBuilderFullScreen"/>
3536
</test>
3637
</tests>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCMSBlockPageBuilderTest/PageBuilderCmsBlockVerifyCanAddChildContentTypesFromOnHoverOptionMenusTest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
<argument name="block" value="$$createPreReqBlock$$"/>
6161
</actionGroup>
6262
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings" after="searchBlockInGrid"/>
63-
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage" after="saveEditPanelSettings"/>
63+
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen2" after="saveEditPanelSettings"/>
64+
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage" after="exitPageBuilderFullScreen2"/>
6465
<!-- Validate CMS Page Storefront -->
6566
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToProductStorefront">
6667
<argument name="page" value="$$createCMSPage.identifier$$"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCMSBlockPageBuilderTest/PageBuilderCmsBlockVerifyCanDeleteContentTypesFromOnClickOptionMenusTest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
<argument name="block" value="$$createPreReqBlock$$"/>
6565
</actionGroup>
6666
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings" after="searchBlockInGrid"/>
67-
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage" after="saveEditPanelSettings"/>
67+
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen2" after="saveEditPanelSettings"/>
68+
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage" after="exitPageBuilderFullScreen2"/>
6869
<!-- Validate CMS Page Storefront -->
6970
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToProductStorefront">
7071
<argument name="page" value="$$createCMSPage.identifier$$"/>

0 commit comments

Comments
 (0)