Skip to content

Commit 237652d

Browse files
committed
MC-3168: Create MFTF Tests
- Added another scenario - Fixed selectors
1 parent 02bce1d commit 237652d

File tree

2 files changed

+81
-42
lines changed

2 files changed

+81
-42
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
<element name="nothingFound" type="text" selector='//*[@id="pagebuilder-panel"]/div[2]/div' timeout="30"/>
5757
<element name="draggableContentTypeInPanel" type="button" selector='//*[text()="{{arg1}}"]/ancestor::*[contains(@class, "ui-draggable")]' parameterized="true"/>
5858
<element name="group" type="button" selector="//ul[@class='pagebuilder-panel-groups']//li[@id='group-{{arg1}}']" parameterized="true"/>
59-
<element name="groupExpanded" type="button" selector="//ul[@class='pagebuilder-panel-groups']//li[@id='group-{{arg1}}' and @class=''active]" parameterized="true"/>
59+
<element name="groupExpanded" type="button" selector="//ul[@class='pagebuilder-panel-groups']//li[@id='group-{{arg1}}' and @class='active']" parameterized="true"/>
6060
<element name="contentTypeInGroup" type="button" selector="//ul[@class='pagebuilder-panel-groups']//li[@id='group-{{arg1}}']//span[text()='{{arg2}}']" parameterized="true"/>
61-
<element name="contentTypeWithIcon" type="button" selector="//ul[@class='pagebuilder-panel-groups']//span[@class='content-type-icon']//i[@class='icon-pagebuilder-{{arg1}}']/../following-sibling::span[text()='{{arg2}}']" parameterized="true"/>
61+
<element name="contentTypeWithIcon" type="button" selector="//ul[@class='pagebuilder-panel-groups']//span[@class='content-type-icon']//i[@class='icon-pagebuilder-{{arg2}}']/../following-sibling::span[text()='{{arg1}}']" parameterized="true"/>
6262
</section>
6363
<section name="PageBuilderContentTypeOptionsMenu">
6464
<element name="contentTypeOptionsMenu" type="button" selector='div.pagebuilder-{{arg1}}.pagebuilder-content-type div.pagebuilder-options' parameterized="true"/>

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

Lines changed: 79 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,34 @@
2929
<actionGroup ref="logout" stepKey="logout"/>
3030
</after>
3131
<!-- Validate Layout group-->
32-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Row', 'layout')}}" stepKey="validateContentType1"/>
33-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Column', 'layout')}}" stepKey="validateContentType2"/>
34-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Tabs', 'layout')}}" stepKey="validateContentType3"/>
35-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Accordion', 'layout')}}" stepKey="validateContentType4"/>
32+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('layout', 'Row')}}" stepKey="validateContentType1"/>
33+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('layout', 'Column')}}" stepKey="validateContentType2"/>
34+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('layout', 'Tabs')}}" stepKey="validateContentType3"/>
35+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('layout', 'Accordion')}}" stepKey="validateContentType4"/>
3636
<click selector="{{PageBuilderPanel.group('layout')}}" stepKey="closeLayoutGroup"/>
3737
<!-- Validate Elements group -->
3838
<click selector="{{PageBuilderPanel.group('elements')}}" stepKey="openElementGroup"/>
39-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Text', 'elements')}}" stepKey="validateContentType5"/>
40-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Heading', 'elements')}}" stepKey="validateContentType6"/>
41-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Buttons', 'elements')}}" stepKey="validateContentType7"/>
42-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Divider', 'elements')}}" stepKey="validateContentType8"/>
43-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Newsletter', 'elements')}}" stepKey="validateContentType9"/>
44-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Anchor', 'elements')}}" stepKey="validateContentType10"/>
45-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('HTML Code', 'elements')}}" stepKey="validateContentType11"/>
39+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('elements', 'Text')}}" stepKey="validateContentType5"/>
40+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('elements', 'Heading')}}" stepKey="validateContentType6"/>
41+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('elements', 'Buttons')}}" stepKey="validateContentType7"/>
42+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('elements', 'Divider')}}" stepKey="validateContentType8"/>
43+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('elements', 'Newsletter')}}" stepKey="validateContentType9"/>
44+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('elements', 'Anchor')}}" stepKey="validateContentType10"/>
45+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('elements', 'HTML Code')}}" stepKey="validateContentType11"/>
4646
<click selector="{{PageBuilderPanel.group('elements')}}" stepKey="closeElementGroup"/>
4747
<!-- Validate Media Group -->
4848
<click selector="{{PageBuilderPanel.group('media')}}" stepKey="openMediaGroup"/>
49-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Image', 'media')}}" stepKey="validateContentType12"/>
50-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Video', 'media')}}" stepKey="validateContentType13"/>
51-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Banner', 'media')}}" stepKey="validateContentType14"/>
52-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Slider', 'media')}}" stepKey="validateContentType15"/>
53-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Map', 'media')}}" stepKey="validateContentType16"/>
49+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('media', 'Image')}}" stepKey="validateContentType12"/>
50+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('media', 'Video')}}" stepKey="validateContentType13"/>
51+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('media', 'Banner')}}" stepKey="validateContentType14"/>
52+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('media', 'Slider')}}" stepKey="validateContentType15"/>
53+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('media', 'Map')}}" stepKey="validateContentType16"/>
5454
<click selector="{{PageBuilderPanel.group('media')}}" stepKey="closeMediaGroup"/>
5555
<!-- Validate Add Content Group -->
56-
<click selector="{{PageBuilderPanel.group('add-content')}}" stepKey="openAddContentGroup"/>
57-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Block', 'add-content')}}" stepKey="validateContentType17"/>
58-
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('Products', 'add-content')}}" stepKey="validateContentType18"/>
59-
<click selector="{{PageBuilderPanel.group('add-content')}}" stepKey="closeAddContentGroup"/>
56+
<click selector="{{PageBuilderPanel.group('add_content')}}" stepKey="openAddContentGroup"/>
57+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('add_content', 'Block')}}" stepKey="validateContentType17"/>
58+
<seeElement selector="{{PageBuilderPanel.contentTypeInGroup('add_content', 'Products')}}" stepKey="validateContentType18"/>
59+
<click selector="{{PageBuilderPanel.group('add_content')}}" stepKey="closeAddContentGroup"/>
6060
</test>
6161
<test name="ValidatePanelDefaultState">
6262
<annotations>
@@ -81,7 +81,7 @@
8181
<seeElement selector="{{PageBuilderPanel.groupExpanded('layout')}}" stepKey="checkLayoutActive"/>
8282
<dontSeeElement selector="{{PageBuilderPanel.groupExpanded('elements')}}" stepKey="checkInactiveGroup1"/>
8383
<dontSeeElement selector="{{PageBuilderPanel.groupExpanded('media')}}" stepKey="checkInactiveGroup2"/>
84-
<dontSeeElement selector="{{PageBuilderPanel.groupExpanded('add-content')}}" stepKey="checkInactiveGroup3"/>
84+
<dontSeeElement selector="{{PageBuilderPanel.groupExpanded('add_content')}}" stepKey="checkInactiveGroup3"/>
8585
</test>
8686
<test name="ValidatePanelContentTypeIcons">
8787
<annotations>
@@ -104,32 +104,71 @@
104104
<actionGroup ref="logout" stepKey="logout"/>
105105
</after>
106106
<!-- Validate Layout Icons -->
107-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Row','row')}}" stepKey="validateIcon1"/>
108-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Column','column')}}" stepKey="validateIcon2"/>
109-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Tabs','tabs')}}" stepKey="validateIcon3"/>
110-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Accordion','accordion')}}" stepKey="validateIcon4"/>
107+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('row','Row')}}" stepKey="validateIcon1"/>
108+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('column','Column')}}" stepKey="validateIcon2"/>
109+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('tabs','Tabs')}}" stepKey="validateIcon3"/>
110+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('accordion','Accordion')}}" stepKey="validateIcon4"/>
111111
<click selector="{{PageBuilderPanel.group('layout')}}" stepKey="closeLayoutGroup"/>
112112
<!-- Validate Elements Icons -->
113113
<click selector="{{PageBuilderPanel.group('elements')}}" stepKey="openElementsGroup"/>
114-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Text','text')}}" stepKey="validateIcon5"/>
115-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Heading','heading')}}" stepKey="validateIcon6"/>
116-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Buttons','button')}}" stepKey="validateIcon7"/>
117-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Divider','divider')}}" stepKey="validateIcon8"/>
118-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Newsletter','newsletter')}}" stepKey="validateIcon9"/>
119-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Anchor','anchor')}}" stepKey="validateIcon10"/>
120-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('HTML Code','code')}}" stepKey="validateIcon11"/>
114+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('text','Text')}}" stepKey="validateIcon5"/>
115+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('heading','Heading')}}" stepKey="validateIcon6"/>
116+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('button','Buttons')}}" stepKey="validateIcon7"/>
117+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('divider','Divider')}}" stepKey="validateIcon8"/>
118+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('newsletter','Newsletter')}}" stepKey="validateIcon9"/>
119+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('anchor','Anchor')}}" stepKey="validateIcon10"/>
120+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('code','HTML Code')}}" stepKey="validateIcon11"/>
121121
<click selector="{{PageBuilderPanel.group('elements')}}" stepKey="closeElementsGroup"/>
122122
<!-- Validate Media Icons -->
123123
<click selector="{{PageBuilderPanel.group('media')}}" stepKey="openMediaGroup"/>
124-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Image','image')}}" stepKey="validateIcon12"/>
125-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Video','video')}}" stepKey="validateIcon13"/>
126-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Banner','banner')}}" stepKey="validateIcon14"/>
127-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Slider','slider')}}" stepKey="validateIcon15"/>
128-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Map','map')}}" stepKey="validateIcon16"/>
124+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('image','Image')}}" stepKey="validateIcon12"/>
125+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('video','Video')}}" stepKey="validateIcon13"/>
126+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('banner','Banner')}}" stepKey="validateIcon14"/>
127+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('slider','Slider')}}" stepKey="validateIcon15"/>
128+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('map','Map')}}" stepKey="validateIcon16"/>
129129
<click selector="{{PageBuilderPanel.group('media')}}" stepKey="closeMediaGroup"/>
130130
<!-- Validate Media Icons -->
131-
<click selector="{{PageBuilderPanel.group('add-content')}}" stepKey="openAddContentGroup"/>
132-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Block','block')}}" stepKey="validateIcon17"/>
133-
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('Products','products')}}" stepKey="validateIcon18"/>
131+
<click selector="{{PageBuilderPanel.group('add_content')}}" stepKey="openAddContentGroup"/>
132+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('block','Block')}}" stepKey="validateIcon17"/>
133+
<seeElement selector="{{PageBuilderPanel.contentTypeWithIcon('products','Products')}}" stepKey="validateIcon18"/>
134+
</test>
135+
<test name="HeaderFixedInFullScreen">
136+
<annotations>
137+
<features value="PageBuilder"/>
138+
<stories value="Panel"/>
139+
<title value="Header is fixed in fullscreen"/>
140+
<description value="The header should be fixed at top after scrolling down"/>
141+
<severity value="CRITICAL"/>
142+
<useCaseId value="MC-3168"/>
143+
<testCaseId value="MC-943"/>
144+
<group value="pagebuilder"/>
145+
<group value="pagebuilder-panel"/>
146+
</annotations>
147+
<before>
148+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
149+
<actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/>
150+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
151+
</before>
152+
<after>
153+
<actionGroup ref="logout" stepKey="logout"/>
154+
</after>
155+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowIntoStage1">
156+
<argument name="contentType" value="PageBuilderRowContentType"/>
157+
</actionGroup>
158+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowIntoStage2">
159+
<argument name="contentType" value="PageBuilderRowContentType"/>
160+
</actionGroup>
161+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowIntoStage3">
162+
<argument name="contentType" value="PageBuilderRowContentType"/>
163+
</actionGroup>
164+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowIntoStage4">
165+
<argument name="contentType" value="PageBuilderRowContentType"/>
166+
</actionGroup>
167+
<actionGroup ref="dragContentTypeToStage" stepKey="dragRowIntoStage5">
168+
<argument name="contentType" value="PageBuilderRowContentType"/>
169+
</actionGroup>
170+
<click selector="{{PageBuilderStage.openFullScreen}}" stepKey="enterFullScreen"/>
171+
<scrollTo selector="{{RowOnStage.base('6')}}" stepKey="scrollToBottom"/>
172+
<seeElement selector="{{PageBuilderStage.exitFullScreen}}" stepKey="verifyHeader"/>
134173
</test>
135174
</tests>

0 commit comments

Comments
 (0)