Skip to content

Commit a68e596

Browse files
authored
Merge branch 'develop' into fix-child-content-finding
2 parents 1bfc575 + 476ef8e commit a68e596

File tree

168 files changed

+997
-143
lines changed

Some content is hidden

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

168 files changed

+997
-143
lines changed

app/code/Magento/PageBuilder/Block/GoogleMapsApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class GoogleMapsApi extends \Magento\Framework\View\Element\Template
1818
{
1919
public const GOOGLE_MAPS_API_KEY_PATH = 'cms/pagebuilder/google_maps_api_key';
20-
public const GOOGLE_MAPS_LIBRARY_URL = 'https://maps.googleapis.com/maps/api/js?v=3.53&key=%s';
20+
public const GOOGLE_MAPS_LIBRARY_URL = 'https://maps.googleapis.com/maps/api/js?v=3.56&key=%s';
2121
public const GOOGLE_MAPS_STYLE_PATH = 'cms/pagebuilder/google_maps_style';
2222

2323
/**

app/code/Magento/PageBuilder/Model/Filter/Template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private function generateDecodedHtmlPlaceholderMappingInDocument(DOMDocument $do
221221
$htmlContentTypeNode->setAttribute('data-decoded', 'true');
222222

223223
// if nothing exists inside the node, continue
224-
if (!strlen(trim($htmlContentTypeNode->nodeValue))) {
224+
if (!strlen(trim($htmlContentTypeNode->nodeValue ?? ''))) {
225225
continue;
226226
}
227227

app/code/Magento/PageBuilder/Model/Stage/Renderer/Block.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ public function render(array $params): array
6868
];
6969

7070
$contentTypes = $this->config->getContentTypes();
71-
$backendBlockClassName = isset($contentTypes[$params['role']]['backend_block'])
71+
$backendBlockClassName = isset($params['role']) && isset($contentTypes[$params['role']]['backend_block'])
7272
? $contentTypes[$params['role']]['backend_block'] : false;
73-
$backendBlockTemplate = isset($contentTypes[$params['role']]['backend_template'])
73+
$backendBlockTemplate = isset($params['role']) && isset($contentTypes[$params['role']]['backend_template'])
7474
? $contentTypes[$params['role']]['backend_template'] : false;
7575

7676
if ($backendBlockTemplate) {

app/code/Magento/PageBuilder/Model/Wysiwyg/DefaultConfigProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function getConfig(\Magento\Framework\DataObject $config): \Magento\Frame
4242
$config->addData(
4343
[
4444
'tinymce' => [
45-
'toolbar' => 'undo redo | styleselect | fontsizeselect | lineheight | forecolor backcolor ' .
45+
'toolbar' => 'undo redo | styles | fontsizeselect | lineheight | forecolor backcolor ' .
4646
'| bold italic underline | alignleft aligncenter alignright | numlist bullist ' .
4747
'| link image table charmap',
4848

@@ -55,9 +55,7 @@ public function getConfig(\Magento\Framework\DataObject $config): \Magento\Frame
5555
'link',
5656
'charmap',
5757
'media',
58-
'noneditable',
5958
'table',
60-
'paste',
6159
'code',
6260
'help',
6361
'table',

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
<actualResult type="variable">grabBackgroundColorValue</actualResult>
2929
</assertEquals>
3030
<wait time="5" stepKey="waitToPreventVideoFlakiness"/>
31-
<waitForElementVisible selector="{{section.videoBackgroundVideoElement(index)}}" stepKey="waitForVideoVisible"/>
31+
<scrollToTopOfPage stepKey="scrollToTopToAvoidFlakiness" />
32+
<waitForElement selector="{{section.videoBackgroundVideoElement(index)}}" stepKey="waitForVideoVisible"/>
3233
<waitForElement selector="{{section.videoBackgroundVideoUrl(index, videoUrl.renderedValue)}}" stepKey="waitForVideoUrl"/>
3334
<grabAttributeFrom selector="{{section.videoBackgroundJarallaxContainer(index)}}" userInput="style" stepKey="jarallaxStyle"/>
3435
<assertStringContainsString stepKey="assertHeight">

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/EditFormActionGroup/validateSlideOutPanelFieldIsNotRequiredWithUploaderIdActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<arguments>
1212
<argument name="property"/>
1313
</arguments>
14-
<waitForElementVisible time="2" selector="{{EditPanelForm.panelFieldControlWithUploaderId(property.section, property.fieldName)}}" stepKey="waitForPropertyElement"/>
14+
<waitForElementVisible time="2" selector="{{EditPanelForm.panelFieldNameWithUploaderId(property.section, property.fieldName)}}" stepKey="waitForPropertyElement"/>
1515
<dontSeeElement selector="{{EditPanelForm.panelFieldRequired(property.section, property.fieldName)}}" stepKey="seePropertyIsNotARequiredField"/>
1616
</actionGroup>
1717
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="UploadNewBackgroundImageToContentTypeFromStageActionGroup">
11+
<annotations>
12+
<description>Loads background image from Stage</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="backgroundImage" defaultValue="PageBuilderImageProperty_JPG"/>
16+
<argument name="section"/>
17+
<argument name="index" defaultValue="1" type="string"/>
18+
</arguments>
19+
<attachFile userInput="{{backgroundImage.value}}" selector="{{section.uploadNewImageInputWithUploaderId(index)}}" stepKey="attachBackgroundImageFromLocalToStage"/>
20+
<waitForPageLoad stepKey="waitForLoadingMaskToDisappear"/>
21+
<executeJS function="return window.getComputedStyle(document.evaluate('{{section.backgroundPath(index)}}', document.body).iterateNext()).backgroundImage" stepKey="backgroundImageRawValue"/>
22+
<!-- Return the string value of background-image -->
23+
<executeJS function="return '{{backgroundImage.value}}' ? '{$backgroundImageRawValue}'.match(/(?&lt;=(url\((&quot;|\'))).+(?=(&quot;|\')\))/)[0] : ''" stepKey="backgroundImageValue"/>
24+
<!-- Convert all characters in string variables to regex friendly strings -->
25+
<executeJS function="return '{{backgroundImage.path}}'.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\\\^\\$\|]/g, '\\\\$&amp;')" stepKey="regexFilePath"/>
26+
<executeJS function="return '{{backgroundImage.value}}' ? !!'{$backgroundImageValue}'.match(/.*\/(pub\/|\/)?media.*{$regexFilePath}\/{{backgroundImage.fileName}}(_\d+)?\.{{backgroundImage.extension}}/)[0] : '{$backgroundImageRawValue}' === 'none'" stepKey="actualImageResult"/>
27+
<assertTrue stepKey="assertBackgroundImageContainsFileInformation">
28+
<actualResult type="variable">actualImageResult</actualResult>
29+
</assertTrue>
30+
</actionGroup>
31+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="UploadNewImageToContentTypeFromStageActionGroup">
11+
<arguments>
12+
<argument name="property"/>
13+
<argument name="section" defaultValue="PageBuilderStage"/>
14+
<argument name="index" defaultValue="1" type="string"/>
15+
</arguments>
16+
<attachFile userInput="{{property.value}}" selector="{{section.uploadNewImageInputWithUploaderId(index)}}" stepKey="attachImageFromLocalToStage"/>
17+
<waitForPageLoad stepKey="waitForLoadingMaskToDisappear"/>
18+
<waitForElementVisible selector="{{section.imageSourceByIndex(index, property.fileName)}}" stepKey="waitForMainImageSource1"/>
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/Data/ImageData.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@
6464
<data key="extension">jpg</data>
6565
<data key="path">wysiwyg</data>
6666
</entity>
67+
<entity name="PageBuilderImagePropertyJpgCopyOtherFolder" type="pagebuilder_image_property">
68+
<data key="name">Image</data>
69+
<data key="section">general</data>
70+
<data key="fieldName">image</data>
71+
<data key="value">magento.jpg</data>
72+
<data key="file">duplicatesamename/magento.jpg</data>
73+
<data key="fileName">magento</data>
74+
<data key="extension">jpg</data>
75+
<data key="path">wysiwyg</data>
76+
</entity>
6777
<entity name="PageBuilderBackgroundImagePropertyJpg" type="pagebuilder_image_property">
6878
<data key="name">Image</data>
6979
<data key="section">background</data>

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderBannerSection/BannerOnBackendSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<element name="bannerTitleAttribute" type="text" selector="(//div[@data-content-type='banner'])[{{arg1}}]//div[@title='{{arg2}}']" parameterized="true"/>
2828
<element name="uploadImageInput" type="button" selector="//div[contains(@class,'pagebuilder-image-uploader-container')]//input[@name='background_image']"/>
2929
<element name="uploadImageInputWithUploaderId" type="button" selector="//div[contains(@class,'pagebuilder-image-uploader-container')]//div[@upload-area-id='background_image']//div[contains(@class,'uppy-Root')]//input[contains(@class,'uppy-Dashboard-input')]"/>
30+
<element name="uploadNewImageInputWithUploaderId" type="button" selector="//div[contains(@class,'pagebuilder-image-uploader-container')]//span[@upload-area-id='background_image']//div[contains(@class,'uppy-Root')]//input[contains(@class,'uppy-Dashboard-input')]"/>
3031
<element name="variablePlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-banner')])[{{bannerIndex}}]//*[contains(@class, 'magento-variable') and contains(@class, 'magento-placeholder')]" parameterized="true"/>
3132
<element name="widgetPlaceholder" type="text" selector="(//div[contains(@class,'pagebuilder-banner')])[{{bannerIndex}}]//*[contains(@class, 'magento-placeholder') and contains(@class, 'magento-widget')]" parameterized="true"/>
3233
<element name="tinymce" type="text" selector="(//div[contains(@class,'pagebuilder-banner')])[{{bannerIndex}}]//div[contains(@class, 'inline-wysiwyg')]" parameterized="true"/>

0 commit comments

Comments
 (0)