|
23 | 23 | <waitForElementVisible time="10" selector="{{PageBuilderContentTypeOptionsMenu.contentTypeOptionsMenuByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForOptions"/> |
24 | 24 | <waitForElementVisible selector="{{ColumnOnBackend.columnMoveByIndex(contentTypeIndex)}}" stepKey="waitForMoveHandle"/> |
25 | 25 | <dragAndDrop selector1="{{ColumnOnBackend.columnMoveByIndex(contentTypeIndex)}}" selector2="{{PageBuilderStage.contentTypeContainer(contentType.role, containerTargetIndex)}}" stepKey="moveContentTypeIntoContainer"/> |
26 | | - <waitForPageLoad stepKey="waitForDragOperation" /> |
| 26 | + <waitForPageLoad stepKey="waitForDragOperation"/> |
27 | 27 | </actionGroup> |
28 | 28 | <actionGroup name="openGridSizeForm"> |
29 | 29 | <arguments> |
30 | 30 | <argument name="index" defaultValue="1" type="string"/> |
31 | 31 | </arguments> |
32 | | - <waitForElementVisible selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="waitForGridSizeButtonVisible" /> |
33 | | - <click selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="clickGridSizeButton" /> |
34 | | - <waitForPageLoad stepKey="waitForAnimation" /> |
35 | | - <waitForElementVisible selector="{{ColumnOnBackend.gridSizeInput(index)}}" stepKey="waitForGridVisible" /> |
| 32 | + <waitForElementVisible selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="waitForGridSizeButtonVisible"/> |
| 33 | + <click selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="clickGridSizeButton"/> |
| 34 | + <waitForPageLoad stepKey="waitForAnimation"/> |
| 35 | + <waitForElementVisible selector="{{ColumnOnBackend.gridSizeInput(index)}}" stepKey="waitForGridVisible"/> |
36 | 36 | </actionGroup> |
37 | 37 | <actionGroup name="closeGridSizeForm"> |
38 | 38 | <arguments> |
39 | 39 | <argument name="index" defaultValue="1" type="string"/> |
40 | 40 | </arguments> |
41 | | - <click selector="{{ColumnOnBackend.columnX('1')}}" stepKey="clickColumn" /> |
42 | | - <waitForPageLoad stepKey="waitForAnimation" /> |
43 | | - <waitForElementNotVisible selector="{{ColumnOnBackend.gridSizeInput(index)}}" stepKey="waitForGridNotVisible" /> |
| 41 | + <click selector="{{ColumnOnBackend.columnX('1')}}" stepKey="clickColumn"/> |
| 42 | + <waitForPageLoad stepKey="waitForAnimation"/> |
| 43 | + <waitForElementNotVisible selector="{{ColumnOnBackend.gridSizeInput(index)}}" stepKey="waitForGridNotVisible"/> |
44 | 44 | </actionGroup> |
45 | 45 | <actionGroup name="updateGridSize"> |
46 | 46 | <arguments> |
47 | 47 | <argument name="index" defaultValue="1" type="string"/> |
48 | 48 | <argument name="gridSize" defaultValue="12" type="string"/> |
49 | 49 | </arguments> |
50 | | - <waitForElementVisible selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="waitForGridSizeButtonVisible" /> |
51 | | - <click selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="clickGridSizeButton" /> |
52 | | - <waitForPageLoad stepKey="waitForAnimation" /> |
53 | | - <waitForElementVisible selector="{{ColumnOnBackend.gridSizeInput(index)}}" stepKey="waitForGridVisible" /> |
| 50 | + <waitForElementVisible selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="waitForGridSizeButtonVisible"/> |
| 51 | + <click selector="{{ColumnOnBackend.gridSizeButton(index)}}" stepKey="clickGridSizeButton"/> |
| 52 | + <waitForPageLoad stepKey="waitForAnimation"/> |
| 53 | + <waitForElementVisible selector="{{ColumnOnBackend.gridSizeInput(index)}}" stepKey="waitForGridVisible"/> |
54 | 54 | <fillField selector="{{ColumnOnBackend.gridSizeInput(index)}}" userInput="{{gridSize}}" stepKey="enterGridSize"/> |
55 | 55 | <pressKey selector="{{ColumnOnBackend.gridSizeInput(index)}}" parameterArray="['su',\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="pressKeyEnter"/> |
56 | | - <waitForPageLoad stepKey="waitForUpdate" /> |
57 | | - <waitForElementVisible selector="{{ColumnOnBackend.displayLabelGridSize(index, gridSize)}}" stepKey="validateGridSize" /> |
| 56 | + <waitForPageLoad stepKey="waitForUpdate"/> |
| 57 | + <waitForElementVisible selector="{{ColumnOnBackend.displayLabelGridSize(index, gridSize)}}" stepKey="validateGridSize"/> |
58 | 58 | </actionGroup> |
59 | 59 | <actionGroup name="updateGridSizeInvalid"> |
60 | 60 | <arguments> |
|
63 | 63 | <argument name="errorMessage"/> |
64 | 64 | </arguments> |
65 | 65 | <fillField selector="{{ColumnOnBackend.gridSizeInput(index)}}" userInput="{{gridSize}}" stepKey="enterGridSize"/> |
66 | | - <click selector="{{ColumnOnBackend.columnX(index)}}" stepKey="clickColumn" /> |
67 | | - <waitForPageLoad stepKey="waitForAnimation" /> |
| 66 | + <click selector="{{ColumnOnBackend.columnX(index)}}" stepKey="clickColumn"/> |
| 67 | + <waitForPageLoad stepKey="waitForAnimation"/> |
68 | 68 | <waitForElementVisible selector="{{ColumnOnBackend.gridSizeError(index, errorMessage)}}" stepKey="verifyError"/> |
69 | 69 | </actionGroup> |
| 70 | + <actionGroup name="validateColumnAppearanceFullHeight"> |
| 71 | + <arguments> |
| 72 | + <argument name="section" defaultValue="ColumnOnBackend"/> |
| 73 | + <argument name="columnIndex" defaultValue="1" type="string"/> |
| 74 | + <argument name="columnGroupIndex" defaultValue="1" type="string"/> |
| 75 | + <argument name="acceptableOffset" defaultValue="2" type="string"/> |
| 76 | + </arguments> |
| 77 | + <comment userInput="validateColumnAppearanceFullHeight" stepKey="comment"/> |
| 78 | + <waitForElementVisible selector="{{section.columnGroup(columnGroupIndex)}}" stepKey="waitForColumnGroup"/> |
| 79 | + <waitForElementVisible selector="{{section.base(columnIndex)}}" stepKey="waitForColumn"/> |
| 80 | + <seeElement selector="{{section.appearance(columnIndex, PageBuilderColumnAppearanceProperty_FullHeight.value)}}" stepKey="seeColumnAppearance"/> |
| 81 | + <executeJS function="return document.querySelectorAll('{{section.allColumnGroups}}')[{{columnGroupIndex}}-1].clientHeight" stepKey="columnGroupHeight"/> |
| 82 | + <executeJS function="return document.querySelectorAll('{{section.baseCSS}}')[{{columnIndex}}-1].clientHeight" stepKey="individualColumnHeight"/> |
| 83 | + <executeJS function="return Math.round(Math.abs({$columnGroupHeight}-{$individualColumnHeight}))" stepKey="heightDifference"/> |
| 84 | + <assertLessThan stepKey="assertColumnHeightEqualToColumnGroupHeight"> |
| 85 | + <expectedResult type="int">{{acceptableOffset}}</expectedResult> |
| 86 | + <actualResult type="variable">heightDifference</actualResult> |
| 87 | + </assertLessThan> |
| 88 | + </actionGroup> |
| 89 | + <actionGroup name="validateColumnAppearanceTopAligned"> |
| 90 | + <arguments> |
| 91 | + <argument name="section" defaultValue="ColumnOnBackend"/> |
| 92 | + <argument name="height" defaultValue="PageBuilderMinHeightProperty_300"/> |
| 93 | + <argument name="columnIndex" defaultValue="1" type="string"/> |
| 94 | + <argument name="columnGroupIndex" defaultValue="1" type="string"/> |
| 95 | + <argument name="acceptableOffset" defaultValue="2" type="string"/> |
| 96 | + </arguments> |
| 97 | + <comment userInput="validateColumnAppearanceTopAligned" stepKey="comment"/> |
| 98 | + <waitForElementVisible selector="{{section.columnGroup(columnGroupIndex)}}" stepKey="waitForColumnGroup"/> |
| 99 | + <waitForElementVisible selector="{{section.base(columnIndex)}}" stepKey="waitForColumn"/> |
| 100 | + <seeElement selector="{{section.appearance(columnIndex, PageBuilderColumnAppearanceProperty_Top.value)}}" stepKey="seeColumnAppearance"/> |
| 101 | + <executeJS function="return document.querySelectorAll('{{section.baseCSS}}')[{{columnIndex}}-1].clientHeight" stepKey="individualColumnHeight"/> |
| 102 | + <executeJS function="return Math.round(Math.abs({$individualColumnHeight}-{{height.value}}))" stepKey="heightDifference"/> |
| 103 | + <!-- Validate height of column --> |
| 104 | + <assertLessThanOrEqual stepKey="assertContentHeightAcceptable"> |
| 105 | + <expectedResult type="int">{{acceptableOffset}}</expectedResult> |
| 106 | + <actualResult type="variable">heightDifference</actualResult> |
| 107 | + </assertLessThanOrEqual> |
| 108 | + <executeJS function="return document.querySelectorAll('{{section.allColumnGroups}}')[{{columnGroupIndex}}-1].getBoundingClientRect().top" stepKey="topOfColumnGroup"/> |
| 109 | + <executeJS function="return document.querySelectorAll('{{section.baseCSS}}')[{{columnIndex}}-1].getBoundingClientRect().top" stepKey="topOfIndividualColumn"/> |
| 110 | + <executeJS function="return Math.round(Math.abs({$topOfColumnGroup}-{$topOfIndividualColumn}))" stepKey="topOfColumnDifference"/> |
| 111 | + <!-- Validate position of column --> |
| 112 | + <assertLessThan stepKey="assertTopOfColumnAcceptable"> |
| 113 | + <expectedResult type="int">{{acceptableOffset}}</expectedResult> |
| 114 | + <actualResult type="variable">topOfColumnDifference</actualResult> |
| 115 | + </assertLessThan> |
| 116 | + </actionGroup> |
| 117 | + <actionGroup name="validateColumnAppearanceCenterAligned" extends="validateColumnAppearanceTopAligned"> |
| 118 | + <comment userInput="validateColumnAppearanceCenterAligned" stepKey="comment"/> |
| 119 | + <seeElement selector="{{section.appearance(columnIndex, PageBuilderColumnAppearanceProperty_Center.value)}}" stepKey="seeColumnAppearance"/> |
| 120 | + <executeJS function="return Math.round(document.querySelectorAll('{{section.allColumnGroups}}')[{{columnGroupIndex}}-1].getBoundingClientRect().top + (document.querySelectorAll('{{section.allColumnGroups}}')[{{columnGroupIndex}}-1].clientHeight / 2))" stepKey="topOfColumnGroup"/> |
| 121 | + <executeJS function="return Math.round(document.querySelectorAll('{{section.baseCSS}}')[{{columnIndex}}-1].getBoundingClientRect().top + (document.querySelectorAll('{{section.baseCSS}}')[{{columnIndex}}-1].clientHeight / 2))" stepKey="topOfIndividualColumn"/> |
| 122 | + </actionGroup> |
| 123 | + <actionGroup name="validateColumnAppearanceBottomAligned" extends="validateColumnAppearanceTopAligned"> |
| 124 | + <comment userInput="validateColumnAppearanceBottomAligned" stepKey="comment"/> |
| 125 | + <seeElement selector="{{section.appearance(columnIndex, PageBuilderColumnAppearanceProperty_Bottom.value)}}" stepKey="seeColumnAppearance"/> |
| 126 | + <executeJS function="return document.querySelectorAll('{{section.allColumnGroups}}')[{{columnGroupIndex}}-1].getBoundingClientRect().bottom" stepKey="topOfColumnGroup"/> |
| 127 | + <executeJS function="return document.querySelectorAll('{{section.baseCSS}}')[{{columnIndex}}-1].getBoundingClientRect().bottom" stepKey="topOfIndividualColumn"/> |
| 128 | + </actionGroup> |
70 | 129 | </actionGroups> |
0 commit comments