Skip to content

Commit dce7f5f

Browse files
committed
MC-4965: Text Wrapping Inside Inline WYSIWYG Editors Will Break On Words (Storefront as well for Slide & Banner)
- rename action group - add block and text group values - remove column resizing on block and text
1 parent c8e4555 commit dce7f5f

File tree

2 files changed

+54
-30
lines changed

2 files changed

+54
-30
lines changed

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

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,6 +1323,8 @@
13231323
<group value="pagebuilder"/>
13241324
<group value="pagebuilder-block"/>
13251325
<group value="pagebuilder-banner"/>
1326+
<group value="pagebuilder-bannerPoster"/>
1327+
<group value="pagebuilder-wordWrap"/>
13261328
</annotations>
13271329
<before>
13281330
<createData entity="_defaultBlock" stepKey="createPreReqBlock" />
@@ -1342,6 +1344,15 @@
13421344
<actionGroup ref="dragContentTypeToStage" stepKey="dragColumnIntoStage">
13431345
<argument name="contentType" value="PageBuilderColumnContentType"/>
13441346
</actionGroup>
1347+
<!-- Duplicate Column to create small width -->
1348+
<comment userInput="Duplicate Column to create small width" stepKey="commentDuplicateColumnToCreateSmallWidth"/>
1349+
<actionGroup ref="duplicateContentType" stepKey="duplicateColumn">
1350+
<argument name="contentType" value="PageBuilderColumnContentType"/>
1351+
<argument name="targetIndex" value="1"/>
1352+
<argument name="expectedIndex" value="2"/>
1353+
<argument name="contentTypeXCoordinate" value="10"/>
1354+
<argument name="contentTypeYCoordinate" value="0"/>
1355+
</actionGroup>
13451356
<!-- Add content type to Column -->
13461357
<comment userInput="Add content type to Column" stepKey="addContentTypeToColumn"/>
13471358
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupElements">
@@ -1363,11 +1374,6 @@
13631374
</actionGroup>
13641375
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsInBlock"/>
13651376
<click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusEditor"/>
1366-
<!-- Resize Columns -->
1367-
<comment userInput="Resize Columns" stepKey="commentResizeColumns"/>
1368-
<executeJS function="return document.querySelector('{{ColumnOnBackend.columnResizeGridLine('1')}}').clientWidth" stepKey="guideWidth"/>
1369-
<dragAndDrop selector1="{{ColumnOnBackend.columnX('1')}} {{ColumnOnBackend.columnResizeHandle}}" selector2="{{ColumnOnBackend.columnResizeGridLine('3')}}" x="$guideWidth" stepKey="resizeColumn"/>
1370-
<waitForPageLoad stepKey="waitForDragAndDrop"/>
13711377
<click selector="{{CmsNewBlockBlockActionsSection.savePage}}" stepKey="saveBlock"/>
13721378
<waitForPageLoad time="30" stepKey="waitForStageToLoad"/>
13731379
<!-- Go to CMS Page and choose Block -->
@@ -1392,15 +1398,15 @@
13921398
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
13931399
<!-- Validate Height Before Save -->
13941400
<comment userInput="Validate Height Before Save" stepKey="commentValidateBeforeSave"/>
1395-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapStage">
1401+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightStage">
13961402
<argument name="page" value="BannerOnFrontend"/>
13971403
<argument name="height" value="80"/>
13981404
</actionGroup>
13991405
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
14001406
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage2"/>
14011407
<!-- Validate Height After Save -->
14021408
<comment userInput="Validate Height After Save" stepKey="commentValidateAfterSave"/>
1403-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapAfterSave">
1409+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightAfterSave">
14041410
<argument name="page" value="BannerOnFrontend"/>
14051411
<argument name="height" value="80"/>
14061412
</actionGroup>
@@ -1409,7 +1415,7 @@
14091415
</actionGroup>
14101416
<!-- Validate Height Storefront -->
14111417
<comment userInput="Validate Height Storefront" stepKey="commentValidateStorefront"/>
1412-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapStorefront">
1418+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightStorefront">
14131419
<argument name="page" value="BannerOnFrontend"/>
14141420
<argument name="height" value="50"/>
14151421
</actionGroup>
@@ -1426,24 +1432,26 @@
14261432
<group value="pagebuilder"/>
14271433
<group value="pagebuilder-block"/>
14281434
<group value="pagebuilder-banner"/>
1435+
<group value="pagebuilder-bannerCollageLeft"/>
1436+
<group value="pagebuilder-wordWrap"/>
14291437
</annotations>
1438+
<comment userInput="keyForRemoval" stepKey="duplicateColumn"/>
14301439
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearanceProperty">
14311440
<argument name="property" value="PageBuilderAppearance_CollageLeft"/>
14321441
</actionGroup>
1433-
<dragAndDrop selector1="{{ColumnOnBackend.columnX('1')}} {{ColumnOnBackend.columnResizeHandle}}" selector2="{{ColumnOnBackend.columnResizeGridLine('6')}}" x="$guideWidth" stepKey="resizeColumn"/>
1434-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapStage">
1442+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightStage">
14351443
<argument name="page" value="BannerOnFrontend"/>
14361444
<argument name="height" value="120"/>
14371445
</actionGroup>
1438-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapAfterSave">
1446+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightAfterSave">
14391447
<argument name="page" value="BannerOnFrontend"/>
14401448
<argument name="height" value="120"/>
14411449
</actionGroup>
14421450
</test>
14431451
<test name="BlockSlidePosterContentCanWordWrap" extends="BlockBannerPosterContentCanWordWrap">
14441452
<annotations>
14451453
<features value="PageBuilder"/>
1446-
<stories value="Slider"/>
1454+
<stories value="Block"/>
14471455
<title value="Slide Poster Content Can Word Wrap In Block"/>
14481456
<description value="A user can see slide poster content word wrap to multiple lines in a Block"/>
14491457
<severity value="CRITICAL"/>
@@ -1453,6 +1461,7 @@
14531461
<group value="pagebuilder-block"/>
14541462
<group value="pagebuilder-slide"/>
14551463
<group value="pagebuilder-slideItemPoster"/>
1464+
<group value="pagebuilder-wordWrap"/>
14561465
</annotations>
14571466
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupElements">
14581467
<argument name="group" value="PageBuilderSliderContentType"/>
@@ -1468,33 +1477,35 @@
14681477
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditMenuOnStage">
14691478
<argument name="section" value="SlideOnBackend"/>
14701479
</actionGroup>
1471-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapStage">
1480+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightStage">
14721481
<argument name="page" value="SlideOnFrontend"/>
14731482
<argument name="height" value="80"/>
14741483
</actionGroup>
1475-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapAfterSave">
1484+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightAfterSave">
14761485
<argument name="page" value="SlideOnFrontend"/>
14771486
<argument name="height" value="80"/>
14781487
</actionGroup>
1479-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapStorefront">
1488+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightStorefront">
14801489
<argument name="page" value="SlideOnFrontend"/>
14811490
<argument name="height" value="50"/>
14821491
</actionGroup>
14831492
</test>
14841493
<test name="BlockSlideCollageLeftContentCanWordWrap" extends="BlockBannerPosterContentCanWordWrap">
14851494
<annotations>
14861495
<features value="PageBuilder"/>
1487-
<stories value="Slider"/>
1496+
<stories value="Block"/>
14881497
<title value="Slide Collage Left Content Can Word Wrap In Block"/>
14891498
<description value="A user can see slide collage left content word wrap to multiple lines in a Block"/>
14901499
<severity value="CRITICAL"/>
14911500
<useCaseId value="MC-4965"/>
14921501
<testCaseId value="MC-5645"/>
14931502
<group value="pagebuilder"/>
14941503
<group value="pagebuilder-block"/>
1495-
<group value="pagebuilder-slider"/>
1504+
<group value="pagebuilder-slide"/>
14961505
<group value="pagebuilder-slideItemCollageLeft"/>
1506+
<group value="pagebuilder-wordWrap"/>
14971507
</annotations>
1508+
<comment userInput="keyForRemoval" stepKey="duplicateColumn"/>
14981509
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupElements">
14991510
<argument name="group" value="PageBuilderSliderContentType"/>
15001511
</actionGroup>
@@ -1506,30 +1517,29 @@
15061517
<argument name="contentType" value="PageBuilderSliderContentType"/>
15071518
<argument name="content" value="{{PageBuilderMessageProperty_WordBreak.value}}"/>
15081519
</actionGroup>
1509-
<dragAndDrop selector1="{{ColumnOnBackend.columnX('1')}} {{ColumnOnBackend.columnResizeHandle}}" selector2="{{ColumnOnBackend.columnResizeGridLine('6')}}" x="$guideWidth" stepKey="resizeColumn"/>
15101520
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditMenuOnStage">
15111521
<argument name="section" value="SlideOnBackend"/>
15121522
</actionGroup>
15131523
<actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearanceProperty">
15141524
<argument name="property" value="PageBuilderAppearance_CollageLeft"/>
15151525
</actionGroup>
1516-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapStage">
1526+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightStage">
15171527
<argument name="page" value="SlideOnFrontend"/>
15181528
<argument name="height" value="120"/>
15191529
</actionGroup>
1520-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapAfterSave">
1530+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightAfterSave">
15211531
<argument name="page" value="SlideOnFrontend"/>
15221532
<argument name="height" value="120"/>
15231533
</actionGroup>
1524-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapStorefront">
1534+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightStorefront">
15251535
<argument name="page" value="SlideOnFrontend"/>
15261536
<argument name="height" value="50"/>
15271537
</actionGroup>
15281538
</test>
15291539
<test name="BlockTextContentCanWordWrap" extends="BlockBannerPosterContentCanWordWrap">
15301540
<annotations>
15311541
<features value="PageBuilder"/>
1532-
<stories value="Text"/>
1542+
<stories value="Block"/>
15331543
<title value="Text Content Can Word Wrap In Block"/>
15341544
<description value="A user can see text content word wrap to multiple lines in a Block"/>
15351545
<severity value="CRITICAL"/>
@@ -1538,7 +1548,15 @@
15381548
<group value="pagebuilder"/>
15391549
<group value="pagebuilder-block"/>
15401550
<group value="pagebuilder-text"/>
1551+
<group value="pagebuilder-wordWrap"/>
15411552
</annotations>
1553+
<actionGroup ref="duplicateContentType" after="duplicateColumn" stepKey="duplicateColumnAgain">
1554+
<argument name="contentType" value="PageBuilderColumnContentType"/>
1555+
<argument name="targetIndex" value="1"/>
1556+
<argument name="expectedIndex" value="2"/>
1557+
<argument name="contentTypeXCoordinate" value="10"/>
1558+
<argument name="contentTypeYCoordinate" value="0"/>
1559+
</actionGroup>
15421560
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupElements">
15431561
<argument name="group" value="PageBuilderTextContentType"/>
15441562
</actionGroup>
@@ -1551,16 +1569,15 @@
15511569
<comment userInput="keyForRemoval" stepKey="openEditMenuOnStage"/>
15521570
<comment userInput="keyForRemoval" stepKey="enterAppearanceProperty"/>
15531571
<comment userInput="keyForRemoval" stepKey="saveEditPanelSettingsInBlock"/>
1554-
<dragAndDrop selector1="{{ColumnOnBackend.columnX('1')}} {{ColumnOnBackend.columnResizeHandle}}" selector2="{{ColumnOnBackend.columnResizeGridLine('2')}}" x="$guideWidth" stepKey="resizeColumn"/>
1555-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapStage">
1572+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightStage">
15561573
<argument name="page" value="TextOnStorefront"/>
15571574
<argument name="height" value="120"/>
15581575
</actionGroup>
1559-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapAfterSave">
1576+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightAfterSave">
15601577
<argument name="page" value="TextOnStorefront"/>
15611578
<argument name="height" value="120"/>
15621579
</actionGroup>
1563-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapStorefront">
1580+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightStorefront">
15641581
<argument name="page" value="TextOnStorefront"/>
15651582
<argument name="height" value="70"/>
15661583
</actionGroup>

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,10 +2404,18 @@
24042404
<testCaseId value="MC-5634"/>
24052405
<group value="pagebuilder"/>
24062406
<group value="pagebuilder-text"/>
2407+
<group value="pagebuilder-wordWrap"/>
24072408
</annotations>
24082409
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
24092410
<argument name="contentType" value="PageBuilderTextContentType"/>
24102411
</actionGroup>
2412+
<actionGroup ref="duplicateContentType" after="duplicateColumn" stepKey="duplicateColumnAgain">
2413+
<argument name="contentType" value="PageBuilderColumnContentType"/>
2414+
<argument name="targetIndex" value="1"/>
2415+
<argument name="expectedIndex" value="2"/>
2416+
<argument name="contentTypeXCoordinate" value="10"/>
2417+
<argument name="contentTypeYCoordinate" value="0"/>
2418+
</actionGroup>
24112419
<actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandGroupElements">
24122420
<argument name="group" value="PageBuilderTextContentType"/>
24132421
</actionGroup>
@@ -2420,19 +2428,18 @@
24202428
<comment userInput="keyForRemoval" stepKey="openEditMenuOnStage"/>
24212429
<comment userInput="keyForRemoval" stepKey="enterAppearanceProperty"/>
24222430
<comment userInput="keyForRemoval" stepKey="saveEditPanelSettings"/>
2423-
<dragAndDrop selector1="{{ColumnOnBackend.columnX('1')}} {{ColumnOnBackend.columnResizeHandle}}" selector2="{{ColumnOnBackend.columnResizeGridLine('2')}}" x="$guideWidth" stepKey="resizeColumn"/>
2424-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapStage">
2431+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightStage">
24252432
<argument name="page" value="TextOnStage"/>
24262433
<argument name="height" value="80"/>
24272434
</actionGroup>
2428-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapAfterSave">
2435+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightAfterSave">
24292436
<argument name="page" value="TextOnStage"/>
24302437
<argument name="height" value="110"/>
24312438
</actionGroup>
24322439
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
24332440
<argument name="contentType" value="PageBuilderTextContentType"/>
24342441
</actionGroup>
2435-
<actionGroup ref="validateContentWordWrap" stepKey="validateContentWordWrapStorefront">
2442+
<actionGroup ref="validateContentWordHeight" stepKey="validateContentWordHeightStorefront">
24362443
<argument name="page" value="TextOnStorefront"/>
24372444
<argument name="height" value="80"/>
24382445
</actionGroup>

0 commit comments

Comments
 (0)