|
2224 | 2224 | <!-- Validate Image Editor On Storefront -->
|
2225 | 2225 | <seeElement selector="{{BannerOnFrontend.messageContentTextAreaImage('1', PageBuilderBackgroundImage_JPG.value)}}" stepKey="validateImageFrontEnd"/>
|
2226 | 2226 | </test>
|
| 2227 | + <test name="BannerCannotHaveInlineWysiwygLinkAndLinkUrl"> |
| 2228 | + <annotations> |
| 2229 | + <features value="PageBuilder"/> |
| 2230 | + <stories value="Banner"/> |
| 2231 | + <title value="Banner inline WYSIWYG editor will notify user that they cannot add TinyMCE Link and Link URL at the same time"/> |
| 2232 | + <description value="Banner edit form and inline editor validate banner TinyMCE Link and Link URL could not be added at the same time."/> |
| 2233 | + <severity value="MAJOR"/> |
| 2234 | + <useCaseId value="MC-5386"/> |
| 2235 | + <testCaseId value="MC-6052"/> |
| 2236 | + <group value="pagebuilder"/> |
| 2237 | + <group value="pagebuilder-banner"/> |
| 2238 | + <group value="pagebuilder-bannerCommon"/> |
| 2239 | + </annotations> |
| 2240 | + <before> |
| 2241 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 2242 | + <actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/> |
| 2243 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 2244 | + </before> |
| 2245 | + <after> |
| 2246 | + <actionGroup ref="logout" stepKey="logout"/> |
| 2247 | + </after> |
| 2248 | + <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle"> |
| 2249 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2250 | + </actionGroup> |
| 2251 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup"> |
| 2252 | + <argument name="group" value="PageBuilderBannerContentType"/> |
| 2253 | + </actionGroup> |
| 2254 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragBannerIntoStage"> |
| 2255 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2256 | + </actionGroup> |
| 2257 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage"> |
| 2258 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2259 | + </actionGroup> |
| 2260 | + <!-- Check Invalid Link Url and Message Text --> |
| 2261 | + <comment userInput="Check Invalid Link Url and Message Text" stepKey="commentCheckInvalidLinkUrlAndMessageText"/> |
| 2262 | + <actionGroup ref="fillSlideOutPanelLinkUrlField" stepKey="enterLink"> |
| 2263 | + <argument name="property" value="PageBuilderBannerLinkUrlProperty"/> |
| 2264 | + <argument name="selection" value="{{ExternalLink.url}}"/> |
| 2265 | + <argument name="newTab" value="PageBuilderBannerNewTabProperty"/> |
| 2266 | + </actionGroup> |
| 2267 | + <actionGroup ref="insertLinkInWYSIWYG" stepKey="insertLinkInWYSIWYG"> |
| 2268 | + <argument name="url" value="{{ExternalLink.googleUrl}}"/> |
| 2269 | + <argument name="textToDisplay" value="{{ExternalLink.googleUrl}}"/> |
| 2270 | + </actionGroup> |
| 2271 | + <actionGroup ref="saveEditPanelAndValidateFieldError" stepKey="validateInvalidLinkUrl"> |
| 2272 | + <argument name="property" value="PageBuilderBannerLinkUrlInvalidProperty"/> |
| 2273 | + </actionGroup> |
| 2274 | + <actionGroup ref="saveEditPanelAndValidateFieldError" stepKey="validateInvalidMessageWithUrl"> |
| 2275 | + <argument name="property" value="PageBuilderBannerMessageInvalidProperty"/> |
| 2276 | + </actionGroup> |
| 2277 | + <!-- Correcting invalid fields --> |
| 2278 | + <comment userInput="Correcting invalid fields" stepKey="commentCorrectingInvalidFields"/> |
| 2279 | + <actionGroup ref="replaceTextToTinyMCE" stepKey="replaceMessageText"> |
| 2280 | + <argument name="property" value="PageBuilderBannerMessageProperty"/> |
| 2281 | + <argument name="section" value="BannerOnConfigurationPanel"/> |
| 2282 | + </actionGroup> |
| 2283 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/> |
| 2284 | + <!-- Check inline editor will validate for not allowing TinyMCE Link and Link URL at the same time --> |
| 2285 | + <comment userInput="Check inline editor will validate for not allowing TinyMCE Link and Link URL at the same time" stepKey="commentCheckInlineEditorPreventAddingBothUrls"/> |
| 2286 | + <click selector="{{PageBuilderStage.inlineWYSIWYGEditor(PageBuilderBannerContentType.role, '1')}}" stepKey="focusOnEditorArea"/> |
| 2287 | + <waitForElementVisible selector="{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderBannerContentType.role, '1')}}" stepKey="waitForEditorPanel"/> |
| 2288 | + <actionGroup ref="insertLinkInWYSIWYG" stepKey="insertLinkInStageInlineEditor"> |
| 2289 | + <argument name="url" value="{{ExternalLink.googleUrl}}"/> |
| 2290 | + <argument name="textToDisplay" value="{{ExternalLink.googleUrl}}"/> |
| 2291 | + <argument name="wysiwygArea" value=""/> |
| 2292 | + </actionGroup> |
| 2293 | + <seeElement selector="{{PageBuilderStage.modal(PageBuilderBannerMessageInvalidProperty.stageErrorMessage)}}" stepKey="seeCorrectErrorModal"/> |
| 2294 | + <actionGroup ref="confirmRemovalModal" stepKey="confirmNestingLinkModal"/> |
| 2295 | + <!-- Checks for a tags within the tinyMCE with regex --> |
| 2296 | + <executeJS function="return (/<a[\s]+([^>]+)>|<a>|<\/a>/igm).test(tinymce.activeEditor.getContent());" stepKey="grabIfAnchorInWysiwygBoolean"/> |
| 2297 | + <assertFalse stepKey="assertMessageHasNoAnchorTags"> |
| 2298 | + <actualResult type="variable">grabIfAnchorInWysiwygBoolean</actualResult> |
| 2299 | + </assertFalse> |
| 2300 | + <!-- Check slide out editor will validate for not allowing TinyMCE Link and Link URL at the same time --> |
| 2301 | + <comment userInput="Check slide out editor will validate for not allowing TinyMCE Link and Link URL at the same time" stepKey="commentCheckSlideOutEditorPreventAddingBothUrls"/> |
| 2302 | + <click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusEditor"/> |
| 2303 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStageAfterInlineValidation"> |
| 2304 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2305 | + </actionGroup> |
| 2306 | + <!-- Checks for a tags within the tinyMCE with regex --> |
| 2307 | + <executeJS function="return (/<a[\s]+([^>]+)>|<a>|<\/a>/igm).test(tinymce.activeEditor.getContent());" stepKey="grabIfAnchorInSlideOutWysiwygBoolean"/> |
| 2308 | + <assertFalse stepKey="assertMessageHasNoAnchorTags2"> |
| 2309 | + <actualResult type="variable">grabIfAnchorInSlideOutWysiwygBoolean</actualResult> |
| 2310 | + </assertFalse> |
| 2311 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings2"/> |
| 2312 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/> |
| 2313 | + <!-- Storefront: Validate No Link in Banner Content --> |
| 2314 | + <comment userInput="Storefront: Validate No Link in Banner Content" stepKey="CommentValidateNoLinkInBannerContent"/> |
| 2315 | + <actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront"> |
| 2316 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2317 | + </actionGroup> |
| 2318 | + <!-- Checks for a tags within the message with regex --> |
| 2319 | + <executeJS function="return (/<a[\s]+([^>]+)>|<a>|<\/a>/igm).test({{BannerOnFrontend.contentJS('1')}}.innerHTML);" stepKey="grabIfFrontendAnchorInContentBoolean"/> |
| 2320 | + <assertFalse stepKey="assertFrontendMessageHasNoAnchorTags"> |
| 2321 | + <actualResult type="variable">grabIfFrontendAnchorInContentBoolean</actualResult> |
| 2322 | + </assertFalse> |
| 2323 | + </test> |
2227 | 2324 | </tests>
|
0 commit comments