Skip to content

Commit 1957e73

Browse files
author
Lukasz Borowiec
committed
Merge branch '511_content-snapshot-product-admin-page' of github.com:magento/magento2-page-builder into 511_content-snapshot-product-admin-page
2 parents 78cbac4 + 9429c74 commit 1957e73

File tree

4 files changed

+33
-30
lines changed

4 files changed

+33
-30
lines changed

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="PageBuilderPanel">
11-
<element name="leftPanel" type="input" selector="#pagebuilder-panel"/>
12-
<element name="searchField" type="input" selector="//*[@id=&quot;pagebuilder-panel&quot;]/div[1]/a"/>
13-
<element name="clearSearch" type="button" selector="//*[@id=&quot;pagebuilder-panel&quot;]/div[1]/a"/>
14-
<element name="firstSection" type="button" selector="//*[@id=&quot;pagebuilder-panel-menu-sections&quot;]/li[1]" timeout="30"/>
15-
<element name="allPanelMenuSections" type="button" selector="#pagebuilder-panel-menu-sections .menu-section-title"/>
16-
<element name="allMenuSectionContentTypes" type="button" selector="#pagebuilder-panel-menu-sections #menu-section-{{arg1}} .pagebuilder-draggable-content-type" parameterized="true"/>
17-
<element name="panelMenuSection" type="button" selector="//div[@id='pagebuilder-panel']//h4[.='{{arg1}}']" parameterized="true"/>
18-
<element name="panelMenuSectionActive" type="button" selector="//div[@id='pagebuilder-panel']//li[@class='active']//h4[.='{{arg1}}']" parameterized="true"/>
19-
<element name="layoutMenuSection" type="button" selector="//*[@id=&quot;menu-section-layout&quot;]" timeout="10"/>
20-
<element name="layoutMenuSectionContentType" type="button" selector="//*[@id=&quot;menu-section-layout&quot;]/div/div/ul/li/a/span[2]"/>
21-
<element name="elementsMenuSection" type="button" selector="//*[@id=&quot;menu-section-elements&quot;]"/>
22-
<element name="elementsMenuSectionContentType" type="button" selector="//*[@id=&quot;menu-section-elements&quot;]/div/div/ul/li/a/span[2]"/>
23-
<element name="mediaMenuSection" type="button" selector="//*[@id=&quot;menu-section-media&quot;]"/>
24-
<element name="mediaMenuSectionContentType" type="button" selector="//*[@id=&quot;menu-section-media&quot;]/div/div/ul/li/a/span[2]"/>
25-
<element name="addContentMenuSection" type="button" selector="//*[@id=&quot;menu-section-add_content&quot;]"/>
26-
<element name="addContentMenuSectionContentType" type="button" selector="//*[@id=&quot;menu-section-add_content&quot;]/div/div/ul/li/a/span[2]"/>
27-
<element name="searchPanel" type="input" selector="//*[@id=&quot;search-content-types-input&quot;]" timeout="30"/>
28-
<element name="searchResults" type="text" selector="//*[@id=&quot;search-results&quot;]" timeout="30"/>
29-
<element name="nothingFound" type="text" selector="//*[@id=&quot;pagebuilder-panel&quot;]/div[2]/div" timeout="30"/>
30-
<element name="draggableContentTypeInPanel" type="button" selector="//*[text()=&quot;{{arg1}}&quot;]/ancestor::*[contains(@class, &quot;ui-draggable&quot;)]" parameterized="true"/>
31-
<element name="contentTypeInMenuSection" type="button" selector="//ul[@class='pagebuilder-panel-menu-sections']//li[{{arg1}}]//h4[.='{{arg2}}']/../..//ul//li[{{arg3}}]//span[text()='{{arg4}}']" parameterized="true"/>
32-
<element name="contentTypeWithIcon" type="button" selector="//ul[@class='pagebuilder-panel-menu-sections']//span[@class='content-type-icon']//i[@class='icon-pagebuilder-{{arg2}}']/../following-sibling::span[text()='{{arg1}}']" parameterized="true"/>
11+
<element name="leftPanel" type="input" selector=".stage-is-active #pagebuilder-panel"/>
12+
<element name="searchField" type="input" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;pagebuilder-panel&quot;]/div[1]/a"/>
13+
<element name="clearSearch" type="button" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;pagebuilder-panel&quot;]/div[1]/a"/>
14+
<element name="firstSection" type="button" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;pagebuilder-panel-menu-sections&quot;]/li[1]" timeout="30"/>
15+
<element name="allPanelMenuSections" type="button" selector=".stage-is-active #pagebuilder-panel-menu-sections .menu-section-title"/>
16+
<element name="allMenuSectionContentTypes" type="button" selector=".stage-is-active #pagebuilder-panel-menu-sections #menu-section-{{arg1}} .pagebuilder-draggable-content-type" parameterized="true"/>
17+
<element name="panelMenuSection" type="button" selector="//div[contains(@class,'stage-is-active')]//div[@id='pagebuilder-panel']//h4[.='{{arg1}}']" parameterized="true"/>
18+
<element name="panelMenuSectionActive" type="button" selector="//div[contains(@class,'stage-is-active')]//div[@id='pagebuilder-panel']//li[@class='active']//h4[.='{{arg1}}']" parameterized="true"/>
19+
<element name="layoutMenuSection" type="button" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;menu-section-layout&quot;]" timeout="10"/>
20+
<element name="layoutMenuSectionContentType" type="button" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;menu-section-layout&quot;]/div/div/ul/li/a/span[2]"/>
21+
<element name="elementsMenuSection" type="button" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;menu-section-elements&quot;]"/>
22+
<element name="elementsMenuSectionContentType" type="button" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;menu-section-elements&quot;]/div/div/ul/li/a/span[2]"/>
23+
<element name="mediaMenuSection" type="button" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;menu-section-media&quot;]"/>
24+
<element name="mediaMenuSectionContentType" type="button" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;menu-section-media&quot;]/div/div/ul/li/a/span[2]"/>
25+
<element name="addContentMenuSection" type="button" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;menu-section-add_content&quot;]"/>
26+
<element name="addContentMenuSectionContentType" type="button" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;menu-section-add_content&quot;]/div/div/ul/li/a/span[2]"/>
27+
<element name="searchPanel" type="input" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;search-content-types-input&quot;]" timeout="30"/>
28+
<element name="searchResults" type="text" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;search-results&quot;]" timeout="30"/>
29+
<element name="nothingFound" type="text" selector="//div[contains(@class,'stage-is-active')]//*[@id=&quot;pagebuilder-panel&quot;]/div[2]/div" timeout="30"/>
30+
<element name="draggableContentTypeInPanel" type="button" selector="//div[contains(@class,'stage-is-active')]//*[text()=&quot;{{arg1}}&quot;]/ancestor::*[contains(@class, &quot;ui-draggable&quot;)]" parameterized="true"/>
31+
<element name="contentTypeInMenuSection" type="button" selector="//div[contains(@class,'stage-is-active')]//ul[@class='pagebuilder-panel-menu-sections']//li[{{arg1}}]//h4[.='{{arg2}}']/../..//ul//li[{{arg3}}]//span[text()='{{arg4}}']" parameterized="true"/>
32+
<element name="contentTypeWithIcon" type="button" selector="//div[contains(@class,'stage-is-active')]//ul[@class='pagebuilder-panel-menu-sections']//span[@class='content-type-icon']//i[@class='icon-pagebuilder-{{arg2}}']/../following-sibling::span[text()='{{arg1}}']" parameterized="true"/>
3333
</section>
3434
</sections>

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
<element name="openFullScreen" type="button" selector="//i[@class='icon-pagebuilder-fullscreen']"/>
1616
<element name="exitFullScreen" type="button" selector=".pagebuilder-header .icon-pagebuilder-fullscreen-exit"/>
1717
<element name="stageLoading" type="button" selector="div.pagebuilder-stage-loading"/>
18-
<element name="stageWrapper" type="button" selector="//div[@class='pagebuilder-stage-wrapper']"/>
19-
<element name="enabled" type="button" selector="//div[not(contains(@class, '_disabled'))]/div[contains(@class, 'pagebuilder-wysiwyg-wrapper')]/div[@class='pagebuilder-stage-wrapper']"/>
20-
<element name="disabled" type="button" selector="//div[contains(@class, '_disabled')]/div[contains(@class, 'pagebuilder-wysiwyg-wrapper')]/div[@class='pagebuilder-stage-wrapper']"/>
21-
<element name="stageWrapperFullScreen" type="button" selector="div.pagebuilder-stage-wrapper.stage-full-screen"/>
18+
<element name="stagePreview" type="button" selector="//div[contains(@class, 'pagebuilder-stage-wrapper') and not(contains(@class, 'stage-full-screen'))]"/>
19+
<element name="stageWrapper" type="button" selector="//div[contains(@class, 'pagebuilder-stage-wrapper')]"/>
20+
<element name="enabled" type="button" selector="//div[not(contains(@class, '_disabled'))]/div[contains(@class, 'pagebuilder-wysiwyg-wrapper')]/div[contains(@class, 'pagebuilder-stage-wrapper')]"/>
21+
<element name="disabled" type="button" selector="//div[contains(@class, '_disabled')]/div[contains(@class, 'pagebuilder-wysiwyg-wrapper')]/div[contains(@class, 'pagebuilder-stage-wrapper')]"/>
22+
<element name="stageWrapperFullScreen" type="button" selector="div.pagebuilder-stage-wrapper.stage-is-active.stage-full-screen"/>
2223
<element name="stageOverlay" type="button" selector="div.pagebuilder-wysiwyg-overlay"/>
2324
<element name="stageOverlayOnHover" type="button" selector="div.pagebuilder-wysiwyg-overlay._hover"/>
2425
<element name="stageWidthJS" type="button" selector="document.querySelector('div[class~=\'root-container-container\']').clientWidth"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderPanelTest/ActivatePageBuilderFullScreenTest.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@
2727
<after>
2828
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
2929
</after>
30-
<waitForElementVisible selector="{{PageBuilderStage.stageWrapper}}" stepKey="waitForStage"/>
30+
<waitForElementVisible selector="{{PageBuilderStage.stagePreview}}" stepKey="waitForStage"/>
3131
<waitForElementVisible selector="{{PageBuilderStage.openFullScreen}}" stepKey="waitForFullScreenButton"/>
3232
<waitForElementNotVisible selector="{{PageBuilderStage.stageWrapperFullScreen}}" stepKey="verifyStageNotFullScreen"/>
3333
<click selector="{{PageBuilderStage.openFullScreen}}" stepKey="clickFullScreenButton"/>
34+
<waitForPageLoad stepKey="waitForFullScreenAnimation"/>
3435
<waitForElementVisible selector="{{PageBuilderStage.stageWrapperFullScreen}}" stepKey="waitForStageFullScreen"/>
3536
<waitForElementVisible selector="{{PageBuilderStage.exitFullScreen}}" stepKey="waitForExitFullScreenButton"/>
36-
<waitForElementNotVisible selector="{{PageBuilderStage.stageWrapper}}" stepKey="verifyStageNotNormalScreen"/>
37+
<waitForElementNotVisible selector="{{PageBuilderStage.stagePreview}}" stepKey="verifyStageNotNormalScreen"/>
3738
<click selector="{{PageBuilderStage.exitFullScreen}}" stepKey="clickExitFullScreen"/>
38-
<waitForElementVisible selector="{{PageBuilderStage.stageWrapper}}" stepKey="waitForStage2"/>
39+
<waitForPageLoad stepKey="waitForFullScreenAnimation2"/>
40+
<waitForElementVisible selector="{{PageBuilderStage.stagePreview}}" stepKey="waitForStage2"/>
3941
<waitForElementNotVisible selector="{{PageBuilderStage.stageWrapperFullScreen}}" stepKey="verifyStageNotFullScreen2"/>
4042
</test>
4143
</tests>

app/code/Magento/PageBuilder/view/adminhtml/web/template/page-builder.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
-->
77
<div class="pagebuilder-stage-wrapper"
8-
css="'stage-full-screen': isFullScreen, 'stage-content-snapshot': isSnapshot, 'transition-out': isSnapshotTransition"
8+
css="'stage-full-screen': isFullScreen, 'stage-content-snapshot': isSnapshot, 'transition-out': isSnapshotTransition, 'stage-is-active': (!isSnapshot() || isFullScreen)"
99
ko-style="wrapperStyles">
1010
<div class="admin__field pagebuilder-header"
1111
css="visible: panel.isVisible(), 'transition-out': isSnapshotTransition()"

0 commit comments

Comments
 (0)