Skip to content

Commit fa6dc7b

Browse files
committed
Merge branch 'develop' of github.com:magento-commerce/magento2-page-builder into api-changes-develop
2 parents a02c77c + cb03d4c commit fa6dc7b

File tree

795 files changed

+5169
-3985
lines changed

Some content is hidden

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

795 files changed

+5169
-3985
lines changed

.github/.metadata.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"templateVersion": "0.1",
3+
"product": {
4+
"name": "Magento 2 Page Builder",
5+
"description": "Page Builder introduces an intuitive, drag-and-drop interface for creating digital content, powered by content types like images, videos, banners, etc. with instant preview capabilities that enable non-technical users to take control of their content."
6+
},
7+
"contacts": {
8+
"team": {
9+
"name": "Amigos",
10+
"DL": "Grp-amigos",
11+
"slackChannel": "team-amigos"
12+
}
13+
},
14+
"ticketTracker": {
15+
"functionalJiraQueue": {
16+
"projectKey": "PB",
17+
"component": ""
18+
},
19+
"securityJiraQueue": {
20+
"projectKey": "MAGREQ",
21+
"component": "PageBuilder"
22+
}
23+
},
24+
"staticScan": {
25+
"enable": true,
26+
"frequency": "weekly",
27+
"customName": "",
28+
"branchesToScan": []
29+
}
30+
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,5 @@ https://github.com/magento/magento2ce/pull/<related_pr>
6666
- [ ] Pull request has a meaningful description of its purpose
6767
- [ ] All commits are accompanied by meaningful commit messages
6868
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
69+
- [ ] README.md files for modified modules are updated and included in the pull request if any [README.md predefined sections](https://github.com/magento/devdocs/wiki/Magento-module-README.md) require an update
6970
- [ ] All automated tests passed successfully (all builds are green)

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@ https://github.com/magento/magento2-page-builder-docs/wiki.
1414

1515
The wiki provides more information on the Page Builder project, such as:
1616

17+
- [Installation Guide](https://github.com/magento/magento2-page-builder-docs/wiki/Installation-Guide)
18+
- [Community Projects](https://github.com/magento/magento2-page-builder/projects)
1719
- [Links to User Guide tutorials](https://github.com/magento/magento2-page-builder-docs/wiki#page-builder-tutorials)
1820
- [Page Builder roadmaps](https://github.com/magento/magento2-page-builder-docs/wiki#roadmap)
1921
- [MFTF best practices](https://github.com/magento/magento2-page-builder-docs/wiki/%5BRough-Draft%5D-MFTF-Best-Practices)
20-
- [Partners Acceleration Program](https://github.com/magento/magento2-page-builder-docs/wiki/Partners-Acceleration-Program-Team)
2122

2223
## Documentation
23-
Complete documentation located on the [Magento DevDocs](https://devdocs.magento.com/page-builder/docs/), including what you need to know to start local development as described in the [installation guide](https://devdocs.magento.com/page-builder/docs/getting-started/install-pagebuilder.html).
24+
Complete documentation located on the [Magento DevDocs](https://devdocs.magento.com/page-builder/docs/), including what you need to know to start local development as described in the [installation guide](https://github.com/magento/magento2-page-builder-docs/wiki/Installation-Guide).
2425

2526
## Community Engineering Slack
2627

2728
To connect with Magento team and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com).
2829
If you are interested in joining Slack, or a specific channel, use our [self signup](https://opensource.magento.com/slack) link.
2930

30-
Magento 2 Page Builder project slack channel: [#pagebuilder](https://magentocommeng.slack.com/archives/CHB455HPF)
31+
Magento 2 Page Builder project slack channel: [#pagebuilder](https://magentocommeng.slack.com/archives/CHB455HPF)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
9+
<suite name="RemoteStorageAwsS3EnabledPageBuilderSuite">
10+
<before>
11+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage"/>
12+
<magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/>
13+
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/>
14+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" >
15+
<argument name="TinyMCEValue" value="{{EnableTinyMCE.value}}"/>
16+
</actionGroup>
17+
<magentoCLI command="config:set cms/pagebuilder/google_maps_api_key ''" stepKey="setEmptyGoogleMapsAPIKey"/>
18+
<magentoCLI command="config:set web/default_layouts/default_cms_layout cms-full-width" stepKey="setPageBuilderDefaultCmsLayout"/>
19+
<magentoCLI command="config:set web/default_layouts/default_category_layout category-full-width" stepKey="setPageBuilderDefaultCategoryLayout"/>
20+
<magentoCLI command="config:set web/default_layouts/default_product_layout product-full-width" stepKey="setPageBuilderDefaultProductLayout"/>
21+
<magentoCLI command="cache:clean config" stepKey="flushCache"/>
22+
</before>
23+
<after>
24+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage"/>
25+
<magentoCLI command="config:set cms/pagebuilder/enabled 1" stepKey="enablePageBuilder"/>
26+
<actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" >
27+
<argument name="TinyMCEValue" value="{{EnableTinyMCE.value}}"/>
28+
</actionGroup>
29+
<magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/>
30+
<magentoCLI command="config:set cms/pagebuilder/google_maps_api_key ''" stepKey="setEmptyGoogleMapsAPIKey"/>
31+
<magentoCLI command="cache:clean config" stepKey="flushCache"/>
32+
</after>
33+
<include>
34+
<group name="remote_storage_aws_s3_pagebuilder"/>
35+
</include>
36+
</suite>
37+
</suites>

app/code/Magento/AwsS3PageBuilder/Test/Mftf/Test/AdminPageBuilderImageTest/AwsS3ImageAddImageContentTypeToCMSPageTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
<group value="pagebuilder"/>
2020
<group value="pagebuilder-image"/>
2121
<group value="remote_storage_aws_s3"/>
22+
<group value="remote_storage_aws_s3_pagebuilder"/>
2223
</annotations>
2324
<before>
24-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" after="loginAsAdmin"/>
25+
<comment userInput="BIC workaround" stepKey="enableRemoteStorage"/>
2526
</before>
2627
<after>
27-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logout"/>
28+
<comment userInput="BIC workaround" stepKey="disableRemoteStorage"/>
2829
</after>
2930
</test>
3031
</tests>

app/code/Magento/AwsS3PageBuilder/Test/Mftf/Test/AdminPageBuilderImageTest/AwsS3ImageAddImageIntoPageBuilderStageTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
<group value="pagebuilder"/>
2020
<group value="pagebuilder-image"/>
2121
<group value="remote_storage_aws_s3"/>
22+
<group value="remote_storage_aws_s3_pagebuilder"/>
2223
</annotations>
2324
<before>
24-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" after="loginAsAdmin"/>
25+
<comment userInput="BIC workaround" stepKey="enableRemoteStorage"/>
2526
</before>
2627
<after>
27-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logout"/>
28+
<comment userInput="BIC workaround" stepKey="disableRemoteStorage"/>
2829
</after>
2930
</test>
3031
</tests>

app/code/Magento/AwsS3PageBuilder/Test/Mftf/Test/AdminPageBuilderImageTest/AwsS3ImageInvalidFileTypeValidationTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
<group value="pagebuilder"/>
1818
<group value="pagebuilder-image"/>
1919
<group value="remote_storage_aws_s3"/>
20+
<group value="remote_storage_aws_s3_pagebuilder"/>
2021
</annotations>
2122
<before>
22-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" after="loginAsAdmin"/>
23+
<comment userInput="BIC workaround" stepKey="enableRemoteStorage"/>
2324
</before>
2425
<after>
25-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logout"/>
26+
<comment userInput="BIC workaround" stepKey="disableRemoteStorage"/>
2627
</after>
2728
</test>
2829
</tests>

app/code/Magento/AwsS3PageBuilder/Test/Mftf/Test/AdminPageBuilderImageTest/AwsS3ImageRemoveImageFromStageTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
<group value="pagebuilder"/>
2020
<group value="pagebuilder-image"/>
2121
<group value="remote_storage_aws_s3"/>
22+
<group value="remote_storage_aws_s3_pagebuilder"/>
2223
</annotations>
2324
<before>
24-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" after="loginAsAdmin"/>
25+
<comment userInput="BIC workaround" stepKey="enableRemoteStorage"/>
2526
</before>
2627
<after>
27-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logout"/>
28+
<comment userInput="BIC workaround" stepKey="disableRemoteStorage"/>
2829
</after>
2930
</test>
3031
</tests>

app/code/Magento/AwsS3PageBuilder/Test/Mftf/Test/AdminPageBuilderTemplateTests/AwsS3PageBuilderCreateTemplateOnCMSBlockForPageAndApplyTemplateToCatalogCategory.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121
<group value="pagebuilder-cms-block"/>
2222
<group value="pagebuilder-cms-category"/>
2323
<group value="remote_storage_aws_s3"/>
24+
<group value="remote_storage_aws_s3_pagebuilder"/>
2425
</annotations>
2526
<before>
26-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" after="loginAsAdmin"/>
27+
<comment userInput="BIC workaround" stepKey="enableRemoteStorage"/>
2728
</before>
2829
<after>
29-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logout"/>
30+
<comment userInput="BIC workaround" stepKey="disableRemoteStorage"/>
3031
</after>
3132
</test>
3233
</tests>

app/code/Magento/AwsS3PageBuilder/Test/Mftf/Test/AdminPageBuilderTemplateTests/AwsS3PageBuilderDeleteTemplate.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
<group value="pagebuilder"/>
2020
<group value="pagebuilder-templates"/>
2121
<group value="remote_storage_aws_s3"/>
22+
<group value="remote_storage_aws_s3_pagebuilder"/>
2223
</annotations>
2324
<before>
24-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" after="loginAsAdmin"/>
25+
<comment userInput="BIC workaround" stepKey="enableRemoteStorage"/>
2526
</before>
2627
<after>
27-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logout"/>
28+
<comment userInput="BIC workaround" stepKey="disableRemoteStorage"/>
2829
</after>
2930
</test>
3031
</tests>

app/code/Magento/AwsS3PageBuilder/Test/Mftf/Test/AdminPageBuilderTemplateTests/AwsS3PageBuilderVerifySaveContentAsTemplateModalAndApplyTemplateSlideOut.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
<group value="pagebuilder"/>
2020
<group value="pagebuilder-templates"/>
2121
<group value="remote_storage_aws_s3"/>
22+
<group value="remote_storage_aws_s3_pagebuilder"/>
2223
</annotations>
2324
<before>
24-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" after="loginAsAdmin"/>
25+
<comment userInput="BIC workaround" stepKey="enableRemoteStorage"/>
2526
</before>
2627
<after>
27-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logout"/>
28+
<comment userInput="BIC workaround" stepKey="disableRemoteStorage"/>
2829
</after>
2930
</test>
3031
</tests>

app/code/Magento/AwsS3PageBuilder/Test/Mftf/Test/AdminPageBuilderVideoTest/AwsS3CanAddVideoToColumnTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
<group value="pagebuilder-column"/>
2121
<group value="pagebuilder-video"/>
2222
<group value="remote_storage_aws_s3"/>
23+
<group value="remote_storage_aws_s3_pagebuilder"/>
2324
</annotations>
2425
<before>
25-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" after="loginAsAdmin"/>
26+
<comment userInput="BIC workaround" stepKey="enableRemoteStorage"/>
2627
</before>
2728
<after>
28-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logout"/>
29+
<comment userInput="BIC workaround" stepKey="disableRemoteStorage"/>
2930
</after>
3031
</test>
3132
</tests>

app/code/Magento/AwsS3PageBuilder/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Aws S3 Page Builder module",
44
"require": {
55
"magento/framework": "*",
6-
"php": "~7.3.0||~7.4.0"
6+
"php": "~7.4.0||~8.1.0"
77
},
88
"suggest": {
99
"magento/module-page-builder": "*",

app/code/Magento/CatalogPageBuilderAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"magento/module-page-builder-analytics": "*",
99
"magento/module-catalog": "*",
1010
"magento/framework": "*",
11-
"php": "~7.3.0||~7.4.0"
11+
"php": "~7.4.0||~8.1.0"
1212
},
1313
"type": "magento2-module",
1414
"license": [

app/code/Magento/CmsPageBuilderAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"magento/module-page-builder-analytics": "*",
99
"magento/module-cms": "*",
1010
"magento/framework": "*",
11-
"php": "~7.3.0||~7.4.0"
11+
"php": "~7.4.0||~8.1.0"
1212
},
1313
"type": "magento2-module",
1414
"license": [

app/code/Magento/PageBuilder/Component/Form/Element/Wysiwyg.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\PageBuilder\Component\Form\Element;
99

10+
use Magento\Catalog\Setup\CategorySetup;
1011
use Magento\Framework\App\ObjectManager;
1112
use Magento\Framework\Data\FormFactory;
1213
use Magento\Framework\View\Asset\Repository;
@@ -17,7 +18,6 @@
1718
use Magento\PageBuilder\Model\Config as PageBuilderConfig;
1819
use Magento\PageBuilder\Model\State as PageBuilderState;
1920
use Magento\PageBuilder\Model\Stage\Config as Config;
20-
use Magento\Framework\View\ConfigInterface as ViewConfigInterface;
2121

2222
/**
2323
* Updates wysiwyg element with Page Builder specific config
@@ -45,11 +45,10 @@ class Wysiwyg extends \Magento\Ui\Component\Form\Element\Wysiwyg
4545
* @param array $config
4646
* @param PageBuilderConfig|null $pageBuilderConfig
4747
* @param bool $overrideSnapshot
48-
* @param Repository $assetRepo
48+
* @param Repository|null $assetRepo
4949
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
5050
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
5151
* @SuppressWarnings(PHPMD.NPathComplexity)
52-
* @throws \Magento\Framework\Exception\NoSuchEntityException
5352
*/
5453
public function __construct(
5554
ContextInterface $context,
@@ -66,14 +65,14 @@ public function __construct(
6665
Repository $assetRepo = null
6766
) {
6867
$this->assetRepo = $assetRepo ?: ObjectManager::getInstance()->get(Repository::class);
69-
$wysiwygConfigData = isset($config['wysiwygConfigData']) ? $config['wysiwygConfigData'] : [];
68+
$wysiwygConfigData = $config['wysiwygConfigData'] ?? [];
7069

7170
// If a dataType is present we're dealing with an attribute
7271
if (isset($config['dataType'])) {
7372
try {
7473
$attribute = $attrRepository->get($data['name']);
7574

76-
if ($attribute) {
75+
if ($attribute && $attribute->getEntityTypeId() === CategorySetup::CATEGORY_ENTITY_TYPE_ID) {
7776
$config['wysiwyg'] = (bool)$attribute->getIsWysiwygEnabled();
7877
}
7978
} catch (NoSuchEntityException $e) {

app/code/Magento/PageBuilder/Controller/Adminhtml/Form/Element/ProductTotals.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@
99
namespace Magento\PageBuilder\Controller\Adminhtml\Form\Element;
1010

1111
use Exception;
12-
use Magento\Backend\App\Action;
1312
use Magento\Backend\App\Action\Context;
13+
use Magento\CatalogWidget\Controller\Adminhtml\Product\Widget;
1414
use Magento\Framework\App\Action\HttpPostActionInterface;
1515
use Magento\Framework\Controller\Result\JsonFactory;
1616

1717
/**
1818
* Returns the number of products that match the provided conditions
1919
*/
20-
class ProductTotals extends Action implements HttpPostActionInterface
20+
class ProductTotals extends Widget implements HttpPostActionInterface
2121
{
22-
const ADMIN_RESOURCE = 'Magento_Catalog::products';
2322

2423
/**
2524
* @var \Magento\PageBuilder\Model\Catalog\ProductTotals

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function render(array $params): array
9292
->load();
9393

9494
if ($blocks->count() === 0) {
95-
$result['error'] = sprintf(__('Block with ID: %s doesn\'t exist'), $params['block_id']);
95+
$result['error'] = sprintf(__('Block with ID: %s doesn\'t exist')->render(), $params['block_id']);
9696

9797
return $result;
9898
}

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

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

@@ -57,15 +57,11 @@ public function getConfig(\Magento\Framework\DataObject $config): \Magento\Frame
5757
'media',
5858
'noneditable',
5959
'table',
60-
'contextmenu',
6160
'paste',
6261
'code',
6362
'help',
6463
'table',
65-
'textcolor',
66-
'image',
67-
'colorpicker',
68-
'lineheight'
64+
'image'
6965
]
7066
),
7167
'content_css' => [

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
</arguments>
1919
<waitForPageLoad stepKey="waitForPageLoad"/>
2020
<waitForElementVisible selector="{{section.backgroundType(index, 'video')}}" stepKey="waitForVideoBackground"/>
21+
<wait time="5" stepKey="waitToPreventVideoFlakiness"/>
2122
<waitForElementVisible selector="{{section.videoBackgroundVideoElement(index)}}" stepKey="waitForVideo"/>
2223
<waitForElementVisible selector="{{section.videoBackgroundFallbackImage(index)}}" stepKey="waitForFallbackImageVisible"/>
2324
<grabAttributeFrom selector="{{section.videoBackgroundFallbackImageSource(index, fallbackImage.fileName)}}" userInput="src" stepKey="fallbackImageSource"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<argument name="index" defaultValue="1" type="string"/>
1818
<argument name="acceptableOffset" defaultValue="5" type="string"/>
1919
</arguments>
20+
<wait time="5" stepKey="waitToPreventVideoFlakiness"/>
2021
<waitForElementVisible selector="{{section.videoBackgroundVideoElement(index)}}" stepKey="waitForVideoBackgroundElement"/>
2122
<executeJS function="return document.evaluate(&quot;{{section.videoBackgroundVideoElement(index)}}&quot;, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.getBoundingClientRect().width" stepKey="actualVideoWidth"/>
2223
<executeJS function="return document.evaluate(&quot;{{section.videoBackgroundVideoElement(index)}}&quot;, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.getBoundingClientRect().height" stepKey="actualVideoHeight"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
</arguments>
1818
<waitForPageLoad stepKey="waitForPageLoad"/>
1919
<waitForElement selector="{{section.videoBackgroundJarallaxContainer(index)}}" stepKey="waitForJarallaxContainer"/>
20+
<wait time="5" stepKey="waitForIFrameSwitch"/>
2021
<seeElement selector="{{section.videoBackgroundVideoElement(index)}}" stepKey="seeVideoInDOM"/>
2122
</actionGroup>
2223
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<annotations>
1212
<description>Validates that the video in the video background is loaded but not playing for an element that is not visible.</description>
1313
</annotations>
14+
<wait time="5" stepKey="waitToPreventVideoFlakiness"/>
1415
<waitForElement selector="{{section.videoBackgroundVideoElement(index)}}" stepKey="waitForVideoVisible"/>
1516
<assertStringNotContainsString stepKey="assertVideoPlaying">
1617
<expectedResult type="string">transform: translate3d(</expectedResult>

0 commit comments

Comments
 (0)