|
2310 | 2310 | <!-- Validate Image Editor On Storefront -->
|
2311 | 2311 | <seeElement selector="{{BannerOnFrontend.messageContentTextAreaImage('1', PageBuilderBackgroundImage_JPG.value)}}" stepKey="validateImageFrontEnd"/>
|
2312 | 2312 | </test>
|
| 2313 | + |
| 2314 | + <test name="BannerCannotHaveTinyMCELinkAndLinkUrl"> |
| 2315 | + <annotations> |
| 2316 | + <features value="PageBuilder"/> |
| 2317 | + <stories value="Banner"/> |
| 2318 | + <title value="Can Not Add Both Banner TinyMCE Link and Link URL"/> |
| 2319 | + <description value="Banner edit form validate banner TinyMCE Link and Link URL could not be added at the same time."/> |
| 2320 | + <severity value="MAJOR"/> |
| 2321 | + <useCaseId value="MAGETWO-81599"/> |
| 2322 | + <testCaseId value="MC-2823"/> |
| 2323 | + <group value="pagebuilder"/> |
| 2324 | + <group value="pagebuilder-banner"/> |
| 2325 | + <group value="pagebuilder-bannerCommon"/> |
| 2326 | + </annotations> |
| 2327 | + <before> |
| 2328 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 2329 | + <actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/> |
| 2330 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 2331 | + </before> |
| 2332 | + <after> |
| 2333 | + <actionGroup ref="logout" stepKey="logout"/> |
| 2334 | + </after> |
| 2335 | + <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle"> |
| 2336 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2337 | + </actionGroup> |
| 2338 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup"> |
| 2339 | + <argument name="group" value="PageBuilderBannerContentType"/> |
| 2340 | + </actionGroup> |
| 2341 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragBannerIntoStage"> |
| 2342 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2343 | + </actionGroup> |
| 2344 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage"> |
| 2345 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2346 | + </actionGroup> |
| 2347 | + <actionGroup ref="selectSlideOutPanelField" stepKey="enterBannerShowOverlayAlways"> |
| 2348 | + <argument name="property" value="PageBuilderBannerShowContentOverlayAlwaysProperty"/> |
| 2349 | + </actionGroup> |
| 2350 | + <!-- Check Invalid Min --> |
| 2351 | + <comment userInput="Check Invalid Min" stepKey="commentCheckInvalidMin"/> |
| 2352 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBannerOverlayTransparencyInvalidMin"> |
| 2353 | + <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidMinProperty"/> |
| 2354 | + </actionGroup> |
| 2355 | + <actionGroup ref="saveEditPanelAndValidateFieldError" stepKey="validateInvalidMin"> |
| 2356 | + <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidMinProperty"/> |
| 2357 | + </actionGroup> |
| 2358 | + <!-- Check Invalid Max --> |
| 2359 | + <comment userInput="Check Invalid Max" stepKey="commentCheckInvalidMax"/> |
| 2360 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBannerOverlayTransparencyInvalidMax"> |
| 2361 | + <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidMaxProperty"/> |
| 2362 | + </actionGroup> |
| 2363 | + <actionGroup ref="saveEditPanelAndValidateFieldError" stepKey="validateInvalidMax"> |
| 2364 | + <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidMaxProperty"/> |
| 2365 | + </actionGroup> |
| 2366 | + <!-- Check Invalid Type --> |
| 2367 | + <comment userInput="Check Invalid Type" stepKey="commentCheckInvalidType"/> |
| 2368 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBannerOverlayTransparencyInvalidType"> |
| 2369 | + <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidTypeProperty"/> |
| 2370 | + </actionGroup> |
| 2371 | + <actionGroup ref="saveEditPanelAndValidateFieldError" stepKey="validateInvalidType"> |
| 2372 | + <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidTypeProperty"/> |
| 2373 | + </actionGroup> |
| 2374 | + <!-- Check Valid --> |
| 2375 | + <comment userInput="Check Valid" stepKey="commentCheckValid"/> |
| 2376 | + <actionGroup ref="fillSlideOutPanelField" stepKey="enterBannerOverlayTransparencyValid"> |
| 2377 | + <argument name="property" value="PageBuilderBannerOverlayTransparencyDefaultProperty"/> |
| 2378 | + </actionGroup> |
| 2379 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/> |
| 2380 | + </test> |
| 2381 | + <test name="BannerCannotHaveInlineWysiwygLinkAndLinkUrl"> |
| 2382 | + <annotations> |
| 2383 | + <features value="PageBuilder"/> |
| 2384 | + <stories value="Banner"/> |
| 2385 | + <title value="Banner inline WYSIWYG editor will notify user of not adding "/> |
| 2386 | + <description value="Banner edit form and inline editor validate banner TinyMCE Link and Link URL could not be added at the same time."/> |
| 2387 | + <severity value="MAJOR"/> |
| 2388 | + <useCaseId value="MC-5386"/> |
| 2389 | + <testCaseId value="MC-6052"/> |
| 2390 | + <group value="pagebuilder"/> |
| 2391 | + <group value="pagebuilder-banner"/> |
| 2392 | + <group value="pagebuilder-bannerCommon"/> |
| 2393 | + </annotations> |
| 2394 | + <before> |
| 2395 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 2396 | + <actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/> |
| 2397 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 2398 | + </before> |
| 2399 | + <after> |
| 2400 | + <actionGroup ref="logout" stepKey="logout"/> |
| 2401 | + </after> |
| 2402 | + <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle"> |
| 2403 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2404 | + </actionGroup> |
| 2405 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup"> |
| 2406 | + <argument name="group" value="PageBuilderBannerContentType"/> |
| 2407 | + </actionGroup> |
| 2408 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragBannerIntoStage"> |
| 2409 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2410 | + </actionGroup> |
| 2411 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage"> |
| 2412 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2413 | + </actionGroup> |
| 2414 | + <!-- Check Invalid Link Url and Message Text --> |
| 2415 | + <comment userInput="- Check Invalid Link Url and Message Text" stepKey="commentCheckInvalidLinkUrlAndMessageText"/> |
| 2416 | + <actionGroup ref="fillSlideOutPanelLinkUrlField" stepKey="enterLink"> |
| 2417 | + <argument name="property" value="PageBuilderBannerLinkUrlProperty"/> |
| 2418 | + <argument name="selection" value="{{ExternalLink.url}}"/> |
| 2419 | + <argument name="newTab" value="PageBuilderBannerNewTabProperty"/> |
| 2420 | + </actionGroup> |
| 2421 | + <actionGroup ref="insertLinkInWYSIWYG" stepKey="insertLinkInWYSIWYG"> |
| 2422 | + <argument name="url" value="{{ExternalLink.googleUrl}}"/> |
| 2423 | + <argument name="textToDisplay" value="{{ExternalLink.googleUrl}}"/> |
| 2424 | + </actionGroup> |
| 2425 | + <actionGroup ref="saveEditPanelAndValidateFieldErrorUrlInput" stepKey="validateInvalidLinkUrl"> |
| 2426 | + <argument name="property" value="PageBuilderBannerLinkUrlInvalidProperty"/> |
| 2427 | + </actionGroup> |
| 2428 | + <actionGroup ref="saveEditPanelAndValidateFieldErrorWysiwyg" stepKey="validateInvalidMessageWithUrl"> |
| 2429 | + <argument name="property" value="PageBuilderBannerMessageInvalidProperty"/> |
| 2430 | + </actionGroup> |
| 2431 | + <!-- Reset and Fill Url --> |
| 2432 | + <comment userInput="Reset and Fill Url" stepKey="commentResetAndFillUrl"/> |
| 2433 | + <actionGroup ref="closeEditPanelSettings" stepKey="closeEditPanelSettings"/> |
| 2434 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStageAfterInitialValidation"> |
| 2435 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2436 | + </actionGroup> |
| 2437 | + <actionGroup ref="fillSlideOutPanelLinkUrlField" stepKey="enterLinkAfterInitialValidation"> |
| 2438 | + <argument name="property" value="PageBuilderBannerLinkUrlProperty"/> |
| 2439 | + <argument name="selection" value="{{ExternalLink.url}}"/> |
| 2440 | + <argument name="newTab" value="PageBuilderBannerNewTabProperty"/> |
| 2441 | + </actionGroup> |
| 2442 | + <actionGroup ref="addTextToTinyMCE" stepKey="enterMessageText"> |
| 2443 | + <argument name="property" value="PageBuilderBannerMessageProperty"/> |
| 2444 | + <argument name="section" value="BannerOnConfigurationPanel"/> |
| 2445 | + </actionGroup> |
| 2446 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/> |
| 2447 | + <!-- Validate Inline Editor --> |
| 2448 | + <comment userInput="Validate Inline Editor" stepKey="commentValidateInlineEditor"/> |
| 2449 | + <click selector="{{PageBuilderStage.inlineWYSIWYGEditor(PageBuilderBannerContentType.role, '1')}}" stepKey="focusOnEditorArea"/> |
| 2450 | + <waitForElementVisible selector="{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderBannerContentType.role, '1')}}" stepKey="waitForEditorPanel"/> |
| 2451 | + <actionGroup ref="addPageLinkToTinyMCEInline" stepKey="insertLinkInStageInlineEditor"> |
| 2452 | + <argument name="url" value="{{ExternalLink.googleUrl}}"/> |
| 2453 | + <argument name="textToDisplay" value="{{ExternalLink.googleUrl}}"/> |
| 2454 | + </actionGroup> |
| 2455 | + <actionGroup ref="confirmRemovalModal" stepKey="confirmNestingLinkModal"/> |
| 2456 | + <executeJS function="return (/<a[\s]+([^>]+)>|<a>|<\/a>/igm).test(tinymce.activeEditor.getContent());" stepKey="grabIfAnchorInWysiwygBoolean"/> |
| 2457 | + <assertFalse stepKey="assertMessageHasNoAnchorTags"> |
| 2458 | + <actualResult type="variable">grabIfAnchorInWysiwygBoolean</actualResult> |
| 2459 | + </assertFalse> |
| 2460 | + <!-- Validate Slide Out Editor --> |
| 2461 | + <comment userInput="Validate Slide Out Editor" stepKey="commentValidateSlideOutEditor"/> |
| 2462 | + <click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusEditor"/> |
| 2463 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStageAfterInlineValidation"> |
| 2464 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2465 | + </actionGroup> |
| 2466 | + <executeJS function="return (/<a[\s]+([^>]+)>|<a>|<\/a>/igm).test(tinymce.activeEditor.getContent());" stepKey="grabIfAnchorInSlideOutWysiwygBoolean"/> |
| 2467 | + <assertFalse stepKey="assertMessageHasNoAnchorTags2"> |
| 2468 | + <actualResult type="variable">grabIfAnchorInSlideOutWysiwygBoolean</actualResult> |
| 2469 | + </assertFalse> |
| 2470 | + </test> |
2313 | 2471 | </tests>
|
0 commit comments