Skip to content

Commit 27abcb4

Browse files
committed
MC-3694: Add/Update MFTF Tests
- Adding tests for each banner appearance for inline edit wysiwyg disabled and inline edit tinymce3
1 parent c0a459f commit 27abcb4

File tree

4 files changed

+286
-27
lines changed

4 files changed

+286
-27
lines changed

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

Lines changed: 92 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
<group value="pagebuilder-bannerCollageCenter"/>
2323
</annotations>
2424
<!-- Change Appearance -->
25-
<comment userInput="Change Appearance" stepKey="commentChangeAppearanceExtended"/>
26-
<actionGroup ref="openPageBuilderEditPanel" after="dragContentTypeIntoContainer" stepKey="openEditMenuOnStageExtended">
25+
<comment userInput="Change Appearance" after="dragContentTypeIntoContainer" stepKey="commentChangeAppearanceExtended"/>
26+
<actionGroup ref="openPageBuilderEditPanel" after="commentChangeAppearanceExtended" stepKey="openEditMenuOnStageExtended">
2727
<argument name="contentType" value="PageBuilderBannerContentType"/>
2828
</actionGroup>
2929
<actionGroup ref="chooseVisualSelectOption" after="openEditMenuOnStageExtended" stepKey="enterAppearancePropertyExtended">
@@ -45,21 +45,105 @@
4545
<group value="pagebuilder-bannerCollageCenter"/>
4646
</annotations>
4747
<!-- Change Appearance -->
48-
<comment userInput="Change Appearance" stepKey="commentChangeAppearanceExtended"/>
49-
<actionGroup ref="openPageBuilderEditPanel" after="dragContentTypeIntoContainer2" stepKey="openEditMenuOnStageExtended">
48+
<comment userInput="Change Appearance" after="dragContentTypeIntoContainer2" stepKey="commentChangeAppearanceExtended"/>
49+
<actionGroup ref="openPageBuilderEditPanel" after="commentChangeAppearanceExtended" stepKey="openEditMenuOnStageExtended">
5050
<argument name="contentType" value="PageBuilderBannerContentType"/>
5151
</actionGroup>
5252
<actionGroup ref="chooseVisualSelectOption" after="openEditMenuOnStageExtended" stepKey="enterAppearancePropertyExtended">
5353
<argument name="property" value="PageBuilderBannerCollageCenteredProperty"/>
5454
</actionGroup>
5555
<actionGroup ref="saveEditPanelSettings" after="enterAppearancePropertyExtended" stepKey="saveEditPanelSettingsExtended"/>
5656
</test>
57+
<test name="BannerCollageCenterWYSIWYGDisabledInlineEdit" extends="BannerPosterCanInlineEditContent">
58+
<annotations>
59+
<features value="PageBuilder"/>
60+
<stories value="Banner"/>
61+
<title value="Collage Center - Inline Edit With WYSIWYG Disabled"/>
62+
<description value="Verify that a user can inline edit Banner collage center content when WYSIWYG is disabled"/>
63+
<severity value="MAJOR"/>
64+
<useCaseId value="MC-521"/>
65+
<testCaseId value="MC-3949"/>
66+
<group value="pagebuilder"/>
67+
<group value="pagebuilder-banner"/>
68+
<group value="pagebuilder-bannerCollageCenter"/>
69+
</annotations>
70+
<before>
71+
<remove keyForRemoval="enableWYSIWYG"/>
72+
<remove keyForRemoval="enableTinyMCE4"/>
73+
<magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG" before="loginAsAdmin"/>
74+
</before>
75+
<after>
76+
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG" before="logout"/>
77+
</after>
78+
<!-- Change Appearance -->
79+
<comment userInput="Change Appearance" after="dragContentTypeIntoContainer" stepKey="commentChangeAppearanceExtended"/>
80+
<actionGroup ref="openPageBuilderEditPanel" after="commentChangeAppearanceExtended" stepKey="openEditMenuOnStageExtended">
81+
<argument name="contentType" value="PageBuilderBannerContentType"/>
82+
</actionGroup>
83+
<actionGroup ref="chooseVisualSelectOption" after="openEditMenuOnStageExtended" stepKey="enterAppearancePropertyExtended">
84+
<argument name="property" value="PageBuilderBannerCollageCenteredProperty"/>
85+
</actionGroup>
86+
<actionGroup ref="saveEditPanelSettings" after="enterAppearancePropertyExtended" stepKey="saveEditPanelSettingsExtended"/>
87+
<actionGroup ref="inlineEditTextAreaFromStage" stepKey="inlineEdit">
88+
<argument name="contentType" value="PageBuilderBannerContentType"/>
89+
<argument name="content" value="{{PageBuilderBannerMessageProperty.value}}"/>
90+
</actionGroup>
91+
<executeJS function="return document.querySelector('{{BannerOnConfigurationPanel.textArea}}').value" stepKey="seeMessageText"/>
92+
<assertEquals stepKey="assertTextAreaValueEditPanel" after="seeMessageText">
93+
<expectedResult type="string">{{PageBuilderBannerMessageProperty.value}}</expectedResult>
94+
<actualResult type="variable">seeMessageText</actualResult>
95+
</assertEquals>
96+
<actionGroup ref="assertTextareaContainsValue" stepKey="seeMessageContentStage">
97+
<argument name="selector" value="{{PageBuilderStage.inlineTextAreaEditor(PageBuilderBannerContentType.role, '1')}}"/>
98+
<argument name="value" value="{{PageBuilderBannerMessageProperty.value}}"/>
99+
</actionGroup>
100+
<seeElement selector="{{BannerOnFrontend.messageContentTextArea('1', PageBuilderBannerMessageProperty.value)}}" stepKey="seeMessageContentStorefront"/>
101+
</test>
102+
<test name="BannerCollageCenterTinyMCE3InlineEdit" extends="BannerPosterCanInlineEditContent">
103+
<annotations>
104+
<features value="PageBuilder"/>
105+
<stories value="Banner"/>
106+
<title value="Collage Center - Inline Edit With TinyMCE3 Enabled"/>
107+
<description value="Verify that a user can inline edit Banner collage center content when TinyMCE3 is enabled"/>
108+
<severity value="MAJOR"/>
109+
<useCaseId value="MC-521"/>
110+
<testCaseId value="MC-3951"/>
111+
<group value="pagebuilder"/>
112+
<group value="pagebuilder-banner"/>
113+
<group value="pagebuilder-bannerCollageCenter"/>
114+
</annotations>
115+
<before>
116+
<remove keyForRemoval="enableTinyMCE4"/>
117+
<magentoCLI command="config:set cms/wysiwyg/editor Magento_Tinymce3/tinymce3Adapter" stepKey="enableTinyMCE3" before="loginAsAdmin"/>
118+
</before>
119+
<after>
120+
<magentoCLI command="config:set cms/wysiwyg/editor mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter" stepKey="enableTinyMCE4" before="logout"/>
121+
</after>
122+
<!-- Change Appearance -->
123+
<comment userInput="Change Appearance" after="dragContentTypeIntoContainer" stepKey="commentChangeAppearanceExtended"/>
124+
<actionGroup ref="openPageBuilderEditPanel" after="commentChangeAppearanceExtended" stepKey="openEditMenuOnStageExtended">
125+
<argument name="contentType" value="PageBuilderBannerContentType"/>
126+
</actionGroup>
127+
<actionGroup ref="chooseVisualSelectOption" after="openEditMenuOnStageExtended" stepKey="enterAppearancePropertyExtended">
128+
<argument name="property" value="PageBuilderBannerCollageCenteredProperty"/>
129+
</actionGroup>
130+
<actionGroup ref="saveEditPanelSettings" after="enterAppearancePropertyExtended" stepKey="saveEditPanelSettingsExtended"/>
131+
<actionGroup ref="inlineEditTextAreaFromStage" stepKey="inlineEdit">
132+
<argument name="contentType" value="PageBuilderBannerContentType"/>
133+
<argument name="content" value="{{PageBuilderBannerMessageProperty.value}}"/>
134+
</actionGroup>
135+
<actionGroup ref="assertTextareaContainsValue" stepKey="seeMessageContentStage">
136+
<argument name="selector" value="{{PageBuilderStage.inlineTextAreaEditor(PageBuilderBannerContentType.role, '1')}}"/>
137+
<argument name="value" value="{{PageBuilderBannerMessageProperty.value}}"/>
138+
</actionGroup>
139+
<seeElement selector="{{BannerOnFrontend.messageContentTextArea('1', PageBuilderBannerMessageProperty.value)}}" stepKey="seeMessageContentStorefront"/>
140+
</test>
57141
<test name="BannerCollageCenterMobileWithMobileImageValues">
58142
<annotations>
59143
<features value="PageBuilder"/>
60144
<stories value="Banner"/>
61-
<title value="Collage Center - Check desktop and mobile images of a collage left banner with mobile image"/>
62-
<description value="Check desktop and mobile images of a collage left banner with mobile image"/>
145+
<title value="Collage Center - Check desktop and mobile images of a collage center banner with mobile image"/>
146+
<description value="Check desktop and mobile images of a collage center banner with mobile image"/>
63147
<severity value="CRITICAL"/>
64148
<useCaseId value="MAGETWO-83553"/>
65149
<testCaseId value="MAGETWO-89591"/>
@@ -143,8 +227,8 @@
143227
<annotations>
144228
<features value="PageBuilder"/>
145229
<stories value="Banner"/>
146-
<title value="Collage Center - Check desktop and mobile images of a collage left banner without mobile image"/>
147-
<description value="Check desktop and mobile images of a collage left banner without mobile image"/>
230+
<title value="Collage Center - Check desktop and mobile images of a collage center banner without mobile image"/>
231+
<description value="Check desktop and mobile images of a collage center banner without mobile image"/>
148232
<severity value="CRITICAL"/>
149233
<useCaseId value="MAGETWO-83553"/>
150234
<testCaseId value="MAGETWO-89588"/>

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

Lines changed: 88 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
<group value="pagebuilder-bannerCollageLeft"/>
2323
</annotations>
2424
<!-- Change Appearance -->
25-
<comment userInput="Change Appearance" stepKey="commentChangeAppearanceExtended"/>
26-
<actionGroup ref="openPageBuilderEditPanel" after="dragContentTypeIntoContainer" stepKey="openEditMenuOnStageExtended">
25+
<comment userInput="Change Appearance" after="dragContentTypeIntoContainer" stepKey="commentChangeAppearanceExtended"/>
26+
<actionGroup ref="openPageBuilderEditPanel" after="commentChangeAppearanceExtended" stepKey="openEditMenuOnStageExtended">
2727
<argument name="contentType" value="PageBuilderBannerContentType"/>
2828
</actionGroup>
2929
<actionGroup ref="chooseVisualSelectOption" after="openEditMenuOnStageExtended" stepKey="enterAppearancePropertyExtended">
@@ -45,15 +45,99 @@
4545
<group value="pagebuilder-bannerCollageLeft"/>
4646
</annotations>
4747
<!-- Change Appearance -->
48-
<comment userInput="Change Appearance" stepKey="commentChangeAppearanceExtended"/>
49-
<actionGroup ref="openPageBuilderEditPanel" after="dragContentTypeIntoContainer2" stepKey="openEditMenuOnStageExtended">
48+
<comment userInput="Change Appearance" after="dragContentTypeIntoContainer2" stepKey="commentChangeAppearanceExtended"/>
49+
<actionGroup ref="openPageBuilderEditPanel" after="commentChangeAppearanceExtended" stepKey="openEditMenuOnStageExtended">
5050
<argument name="contentType" value="PageBuilderBannerContentType"/>
5151
</actionGroup>
5252
<actionGroup ref="chooseVisualSelectOption" after="openEditMenuOnStageExtended" stepKey="enterAppearancePropertyExtended">
5353
<argument name="property" value="PageBuilderBannerCollageLeftProperty"/>
5454
</actionGroup>
5555
<actionGroup ref="saveEditPanelSettings" after="enterAppearancePropertyExtended" stepKey="saveEditPanelSettingsExtended"/>
5656
</test>
57+
<test name="BannerCollageLeftWYSIWYGDisabledInlineEdit" extends="BannerPosterCanInlineEditContent">
58+
<annotations>
59+
<features value="PageBuilder"/>
60+
<stories value="Banner"/>
61+
<title value="Collage Left - Inline Edit With WYSIWYG Disabled"/>
62+
<description value="Verify that a user can inline edit Banner collage left content when WYSIWYG is disabled"/>
63+
<severity value="MAJOR"/>
64+
<useCaseId value="MC-521"/>
65+
<testCaseId value="MC-3954"/>
66+
<group value="pagebuilder"/>
67+
<group value="pagebuilder-banner"/>
68+
<group value="pagebuilder-bannerCollageLeft"/>
69+
</annotations>
70+
<before>
71+
<remove keyForRemoval="enableWYSIWYG"/>
72+
<remove keyForRemoval="enableTinyMCE4"/>
73+
<magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG" before="loginAsAdmin"/>
74+
</before>
75+
<after>
76+
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG" before="logout"/>
77+
</after>
78+
<!-- Change Appearance -->
79+
<comment userInput="Change Appearance" after="dragContentTypeIntoContainer" stepKey="commentChangeAppearanceExtended"/>
80+
<actionGroup ref="openPageBuilderEditPanel" after="commentChangeAppearanceExtended" stepKey="openEditMenuOnStageExtended">
81+
<argument name="contentType" value="PageBuilderBannerContentType"/>
82+
</actionGroup>
83+
<actionGroup ref="chooseVisualSelectOption" after="openEditMenuOnStageExtended" stepKey="enterAppearancePropertyExtended">
84+
<argument name="property" value="PageBuilderBannerCollageLeftProperty"/>
85+
</actionGroup>
86+
<actionGroup ref="saveEditPanelSettings" after="enterAppearancePropertyExtended" stepKey="saveEditPanelSettingsExtended"/>
87+
<actionGroup ref="inlineEditTextAreaFromStage" stepKey="inlineEdit">
88+
<argument name="contentType" value="PageBuilderBannerContentType"/>
89+
<argument name="content" value="{{PageBuilderBannerMessageProperty.value}}"/>
90+
</actionGroup>
91+
<executeJS function="return document.querySelector('{{BannerOnConfigurationPanel.textArea}}').value" stepKey="seeMessageText"/>
92+
<assertEquals stepKey="assertTextAreaValueEditPanel" after="seeMessageText">
93+
<expectedResult type="string">{{PageBuilderBannerMessageProperty.value}}</expectedResult>
94+
<actualResult type="variable">seeMessageText</actualResult>
95+
</assertEquals>
96+
<actionGroup ref="assertTextareaContainsValue" stepKey="seeMessageContentStage">
97+
<argument name="selector" value="{{PageBuilderStage.inlineTextAreaEditor(PageBuilderBannerContentType.role, '1')}}"/>
98+
<argument name="value" value="{{PageBuilderBannerMessageProperty.value}}"/>
99+
</actionGroup>
100+
<seeElement selector="{{BannerOnFrontend.messageContentTextArea('1', PageBuilderBannerMessageProperty.value)}}" stepKey="seeMessageContentStorefront"/>
101+
</test>
102+
<test name="BannerCollageLeftTinyMCE3InlineEdit" extends="BannerPosterCanInlineEditContent">
103+
<annotations>
104+
<features value="PageBuilder"/>
105+
<stories value="Banner"/>
106+
<title value="Collage Left - Inline Edit With TinyMCE3 Enabled"/>
107+
<description value="Verify that a user can inline edit Banner collage left content when TinyMCE3 is enabled"/>
108+
<severity value="MAJOR"/>
109+
<useCaseId value="MC-521"/>
110+
<testCaseId value="MC-3952"/>
111+
<group value="pagebuilder"/>
112+
<group value="pagebuilder-banner"/>
113+
<group value="pagebuilder-bannerCollageLeft"/>
114+
</annotations>
115+
<before>
116+
<remove keyForRemoval="enableTinyMCE4"/>
117+
<magentoCLI command="config:set cms/wysiwyg/editor Magento_Tinymce3/tinymce3Adapter" stepKey="enableTinyMCE3" before="loginAsAdmin"/>
118+
</before>
119+
<after>
120+
<magentoCLI command="config:set cms/wysiwyg/editor mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter" stepKey="enableTinyMCE4" before="logout"/>
121+
</after>
122+
<!-- Change Appearance -->
123+
<comment userInput="Change Appearance" after="dragContentTypeIntoContainer" stepKey="commentChangeAppearanceExtended"/>
124+
<actionGroup ref="openPageBuilderEditPanel" after="commentChangeAppearanceExtended" stepKey="openEditMenuOnStageExtended">
125+
<argument name="contentType" value="PageBuilderBannerContentType"/>
126+
</actionGroup>
127+
<actionGroup ref="chooseVisualSelectOption" after="openEditMenuOnStageExtended" stepKey="enterAppearancePropertyExtended">
128+
<argument name="property" value="PageBuilderBannerCollageLeftProperty"/>
129+
</actionGroup>
130+
<actionGroup ref="saveEditPanelSettings" after="enterAppearancePropertyExtended" stepKey="saveEditPanelSettingsExtended"/>
131+
<actionGroup ref="inlineEditTextAreaFromStage" stepKey="inlineEdit">
132+
<argument name="contentType" value="PageBuilderBannerContentType"/>
133+
<argument name="content" value="{{PageBuilderBannerMessageProperty.value}}"/>
134+
</actionGroup>
135+
<actionGroup ref="assertTextareaContainsValue" stepKey="seeMessageContentStage">
136+
<argument name="selector" value="{{PageBuilderStage.inlineTextAreaEditor(PageBuilderBannerContentType.role, '1')}}"/>
137+
<argument name="value" value="{{PageBuilderBannerMessageProperty.value}}"/>
138+
</actionGroup>
139+
<seeElement selector="{{BannerOnFrontend.messageContentTextArea('1', PageBuilderBannerMessageProperty.value)}}" stepKey="seeMessageContentStorefront"/>
140+
</test>
57141
<test name="BannerCollageLeftMobileWithMobileImageValues">
58142
<annotations>
59143
<features value="PageBuilder"/>

0 commit comments

Comments
 (0)