Skip to content

Commit 7bb9a1b

Browse files
authored
Merge pull request #265 from magento-obsessive-owls/MC-15812
[Owls] MC-15812: 5px of Empty Space On Bottom of Video Content Type
2 parents 036bf2d + 672184c commit 7bb9a1b

File tree

5 files changed

+66
-0
lines changed

5 files changed

+66
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,8 @@
5050
<data key="fieldName">max_width</data>
5151
<data key="value">500</data>
5252
</entity>
53+
<!-- Height -->
54+
<entity name="PageBuilderVideoContainerHeight" type="pagebuilder_video_height_property">
55+
<data key="value">281</data>
56+
</entity>
5357
</entities>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="VideoOnStage">
12+
<element name="mainCSS" type="text" selector="[data-content-type=video][data-element=main]"/>
1213
<element name="wrapperCSS" type="text" selector="[data-content-type=video] [data-element=wrapper]"/>
1314
<!-- Empty Video -->
1415
<element name="empty" type="text" selector="(//div[contains(@class,'pagebuilder-video-wrapper')])[{{arg1}}]//iframe" parameterized="true"/>
@@ -36,6 +37,7 @@
3637
<element name="padding" type="text" selector="(//div[contains(@class,'pagebuilder-video-wrapper')])[{{arg1}}][contains(@style,'padding: {{arg2}}px;')]" parameterized="true"/>
3738
</section>
3839
<section name="VideoOnStorefront">
40+
<element name="mainCSS" type="text" selector="[data-content-type=video][data-element=main]"/>
3941
<element name="wrapperCSS" type="text" selector="[data-content-type=video] [data-element=wrapper]"/>
4042
<!-- Empty Video -->
4143
<element name="empty" type="text" selector="//div[@data-content-type='video'][count(iframe)=0]"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderVideoTest.xml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,62 @@
635635
<argument name="content" value="{{VideoOnStorefront.wrapperCSS}}"/>
636636
</actionGroup>
637637
</test>
638+
<test name="VideoHeightRendersCorrectlyBasedOnMaxWidthAndAspectRatio" extends="RowWithBordersAndPaddingEqualToMinHeight">
639+
<annotations>
640+
<features value="PageBuilder"/>
641+
<stories value="Video"/>
642+
<title value="Video height is based on max width and aspect ratio"/>
643+
<description value="A user can see Video height is based on max width and aspect ratio"/>
644+
<severity value="AVERAGE"/>
645+
<useCaseId value="MC-15812"/>
646+
<testCaseId value="MC-18149"/>
647+
<group value="pagebuilder"/>
648+
<group value="pagebuilder-video"/>
649+
</annotations>
650+
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
651+
<argument name="contentType" value="PageBuilderVideoContentType"/>
652+
</actionGroup>
653+
<actionGroup ref="expandPageBuilderPanelMenuSection" after="enterPageTitle" stepKey="expandMenuSection">
654+
<argument name="contentType" value="PageBuilderVideoContentType"/>
655+
</actionGroup>
656+
<actionGroup ref="dragContentTypeToStage" after="commentConfigureContentType" stepKey="dragContentTypeToStage">
657+
<argument name="contentType" value="PageBuilderVideoContentType"/>
658+
</actionGroup>
659+
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditPanel">
660+
<argument name="contentType" value="PageBuilderVideoContentType"/>
661+
</actionGroup>
662+
<actionGroup ref="fillSlideOutPanelFieldGeneral" after="openEditPanel" stepKey="enterVideoUrlProperty">
663+
<argument name="property" value="PageBuilderVideoUrl_YouTube"/>
664+
</actionGroup>
665+
<actionGroup ref="fillSlideOutPanelFieldGeneral" after="enterVideoUrlProperty" stepKey="enterWidthProperty">
666+
<argument name="property" value="PageBuilderVideoWidth_500"/>
667+
</actionGroup>
668+
<remove keyForRemoval="enterMinHeightProperty"/>
669+
<remove keyForRemoval="enterBorder"/>
670+
<remove keyForRemoval="enterBorderColor"/>
671+
<remove keyForRemoval="enterBorderWidth"/>
672+
<remove keyForRemoval="enterPadding"/>
673+
<comment userInput="Validate height on stage before save" stepKey="commentValidateHeightOnStageBeforeSave"/>
674+
<actionGroup ref="validateContentTypeHeightEqualToMinHeight" stepKey="validateContentTypeHeightBeforeSave">
675+
<argument name="content" value="{{VideoOnStage.mainCSS}}"/>
676+
<argument name="height" value="PageBuilderVideoContainerHeight"/>
677+
<argument name="pixelBuffer" value="2"/>
678+
</actionGroup>
679+
<actionGroup ref="validateContentTypeHeightEqualToMinHeight" stepKey="validateContentTypeHeightAfterSave">
680+
<argument name="content" value="{{VideoOnStage.mainCSS}}"/>
681+
<argument name="height" value="PageBuilderVideoContainerHeight"/>
682+
<argument name="pixelBuffer" value="2"/>
683+
</actionGroup>
684+
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
685+
<argument name="contentType" value="PageBuilderVideoContentType"/>
686+
</actionGroup>
687+
<comment userInput="Validate height on storefront" stepKey="commentValidateHeightOnStorefront"/>
688+
<actionGroup ref="validateContentTypeHeightEqualToMinHeight" stepKey="validateContentTypeHeightStorefront">
689+
<argument name="content" value="{{VideoOnStorefront.mainCSS}}"/>
690+
<argument name="height" value="PageBuilderVideoContainerHeight"/>
691+
<argument name="pixelBuffer" value="2"/>
692+
</actionGroup>
693+
</test>
638694
<test name="VideoValidateURL">
639695
<annotations>
640696
<features value="PageBuilder"/>

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/video/_default.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
div[data-content-type='video'],
2424
.pagebuilder-video {
25+
font-size: 0;
26+
2527
.pagebuilder-video-inner {
2628
box-sizing: border-box;
2729
display: inline-block;

app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/video/_default.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// _____________________________________________
99

1010
div[data-content-type='video'] {
11+
font-size: 0;
12+
1113
.pagebuilder-video-inner {
1214
box-sizing: border-box;
1315
display: inline-block;

0 commit comments

Comments
 (0)