|
2228 | 2228 | <!-- Validate Image Editor On Storefront -->
|
2229 | 2229 | <seeElement selector="{{BannerOnFrontend.messageContentTextAreaImage('1', PageBuilderBackgroundImage_JPG.value)}}" stepKey="validateImageFrontEnd"/>
|
2230 | 2230 | </test>
|
2231 |
| - |
2232 |
| - <test name="BannerCannotHaveTinyMCELinkAndLinkUrl"> |
2233 |
| - <annotations> |
2234 |
| - <features value="PageBuilder"/> |
2235 |
| - <stories value="Banner"/> |
2236 |
| - <title value="Can Not Add Both Banner TinyMCE Link and Link URL"/> |
2237 |
| - <description value="Banner edit form validate banner TinyMCE Link and Link URL could not be added at the same time."/> |
2238 |
| - <severity value="MAJOR"/> |
2239 |
| - <useCaseId value="MAGETWO-81599"/> |
2240 |
| - <testCaseId value="MC-2823"/> |
2241 |
| - <group value="pagebuilder"/> |
2242 |
| - <group value="pagebuilder-banner"/> |
2243 |
| - <group value="pagebuilder-bannerCommon"/> |
2244 |
| - </annotations> |
2245 |
| - <before> |
2246 |
| - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
2247 |
| - <actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/> |
2248 |
| - <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
2249 |
| - </before> |
2250 |
| - <after> |
2251 |
| - <actionGroup ref="logout" stepKey="logout"/> |
2252 |
| - </after> |
2253 |
| - <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle"> |
2254 |
| - <argument name="contentType" value="PageBuilderBannerContentType"/> |
2255 |
| - </actionGroup> |
2256 |
| - <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup"> |
2257 |
| - <argument name="group" value="PageBuilderBannerContentType"/> |
2258 |
| - </actionGroup> |
2259 |
| - <actionGroup ref="dragContentTypeToStage" stepKey="dragBannerIntoStage"> |
2260 |
| - <argument name="contentType" value="PageBuilderBannerContentType"/> |
2261 |
| - </actionGroup> |
2262 |
| - <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage"> |
2263 |
| - <argument name="contentType" value="PageBuilderBannerContentType"/> |
2264 |
| - </actionGroup> |
2265 |
| - <actionGroup ref="selectSlideOutPanelField" stepKey="enterBannerShowOverlayAlways"> |
2266 |
| - <argument name="property" value="PageBuilderBannerShowContentOverlayAlwaysProperty"/> |
2267 |
| - </actionGroup> |
2268 |
| - <!-- Check Invalid Min --> |
2269 |
| - <comment userInput="Check Invalid Min" stepKey="commentCheckInvalidMin"/> |
2270 |
| - <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBannerOverlayTransparencyInvalidMin"> |
2271 |
| - <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidMinProperty"/> |
2272 |
| - </actionGroup> |
2273 |
| - <actionGroup ref="saveEditPanelAndValidateFieldError" stepKey="validateInvalidMin"> |
2274 |
| - <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidMinProperty"/> |
2275 |
| - </actionGroup> |
2276 |
| - <!-- Check Invalid Max --> |
2277 |
| - <comment userInput="Check Invalid Max" stepKey="commentCheckInvalidMax"/> |
2278 |
| - <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBannerOverlayTransparencyInvalidMax"> |
2279 |
| - <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidMaxProperty"/> |
2280 |
| - </actionGroup> |
2281 |
| - <actionGroup ref="saveEditPanelAndValidateFieldError" stepKey="validateInvalidMax"> |
2282 |
| - <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidMaxProperty"/> |
2283 |
| - </actionGroup> |
2284 |
| - <!-- Check Invalid Type --> |
2285 |
| - <comment userInput="Check Invalid Type" stepKey="commentCheckInvalidType"/> |
2286 |
| - <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBannerOverlayTransparencyInvalidType"> |
2287 |
| - <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidTypeProperty"/> |
2288 |
| - </actionGroup> |
2289 |
| - <actionGroup ref="saveEditPanelAndValidateFieldError" stepKey="validateInvalidType"> |
2290 |
| - <argument name="property" value="PageBuilderBannerOverlayTransparencyInvalidTypeProperty"/> |
2291 |
| - </actionGroup> |
2292 |
| - <!-- Check Valid --> |
2293 |
| - <comment userInput="Check Valid" stepKey="commentCheckValid"/> |
2294 |
| - <actionGroup ref="fillSlideOutPanelField" stepKey="enterBannerOverlayTransparencyValid"> |
2295 |
| - <argument name="property" value="PageBuilderBannerOverlayTransparencyDefaultProperty"/> |
2296 |
| - </actionGroup> |
2297 |
| - <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/> |
2298 |
| - </test> |
2299 | 2231 | <test name="BannerCannotHaveInlineWysiwygLinkAndLinkUrl">
|
2300 | 2232 | <annotations>
|
2301 | 2233 | <features value="PageBuilder"/>
|
2302 | 2234 | <stories value="Banner"/>
|
2303 |
| - <title value="Banner inline WYSIWYG editor will notify user of not adding "/> |
| 2235 | + <title value="Banner inline WYSIWYG editor will notify user of could not add TinyMCE Link and Link URL at the same time"/> |
2304 | 2236 | <description value="Banner edit form and inline editor validate banner TinyMCE Link and Link URL could not be added at the same time."/>
|
2305 | 2237 | <severity value="MAJOR"/>
|
2306 | 2238 | <useCaseId value="MC-5386"/>
|
|
2330 | 2262 | <argument name="contentType" value="PageBuilderBannerContentType"/>
|
2331 | 2263 | </actionGroup>
|
2332 | 2264 | <!-- Check Invalid Link Url and Message Text -->
|
2333 |
| - <comment userInput="- Check Invalid Link Url and Message Text" stepKey="commentCheckInvalidLinkUrlAndMessageText"/> |
| 2265 | + <comment userInput="Check Invalid Link Url and Message Text" stepKey="commentCheckInvalidLinkUrlAndMessageText"/> |
2334 | 2266 | <actionGroup ref="fillSlideOutPanelLinkUrlField" stepKey="enterLink">
|
2335 | 2267 | <argument name="property" value="PageBuilderBannerLinkUrlProperty"/>
|
2336 | 2268 | <argument name="selection" value="{{ExternalLink.url}}"/>
|
|
2340 | 2272 | <argument name="url" value="{{ExternalLink.googleUrl}}"/>
|
2341 | 2273 | <argument name="textToDisplay" value="{{ExternalLink.googleUrl}}"/>
|
2342 | 2274 | </actionGroup>
|
2343 |
| - <actionGroup ref="saveEditPanelAndValidateFieldErrorUrlInput" stepKey="validateInvalidLinkUrl"> |
| 2275 | + <actionGroup ref="saveEditPanelAndValidateFieldError" stepKey="validateInvalidLinkUrl"> |
2344 | 2276 | <argument name="property" value="PageBuilderBannerLinkUrlInvalidProperty"/>
|
2345 | 2277 | </actionGroup>
|
2346 |
| - <actionGroup ref="saveEditPanelAndValidateFieldErrorWysiwyg" stepKey="validateInvalidMessageWithUrl"> |
| 2278 | + <actionGroup ref="saveEditPanelAndValidateFieldError" stepKey="validateInvalidMessageWithUrl"> |
2347 | 2279 | <argument name="property" value="PageBuilderBannerMessageInvalidProperty"/>
|
2348 | 2280 | </actionGroup>
|
2349 |
| - <!-- Reset and Fill Url --> |
2350 |
| - <comment userInput="Reset and Fill Url" stepKey="commentResetAndFillUrl"/> |
2351 |
| - <actionGroup ref="closeEditPanelSettings" stepKey="closeEditPanelSettings"/> |
2352 |
| - <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStageAfterInitialValidation"> |
2353 |
| - <argument name="contentType" value="PageBuilderBannerContentType"/> |
2354 |
| - </actionGroup> |
2355 |
| - <actionGroup ref="fillSlideOutPanelLinkUrlField" stepKey="enterLinkAfterInitialValidation"> |
2356 |
| - <argument name="property" value="PageBuilderBannerLinkUrlProperty"/> |
2357 |
| - <argument name="selection" value="{{ExternalLink.url}}"/> |
2358 |
| - <argument name="newTab" value="PageBuilderBannerNewTabProperty"/> |
2359 |
| - </actionGroup> |
2360 |
| - <actionGroup ref="addTextToTinyMCE" stepKey="enterMessageText"> |
| 2281 | + <!-- Correcting invalid fields --> |
| 2282 | + <comment userInput="Correcting invalid fields" stepKey="commentCorrectingInvalidFields"/> |
| 2283 | + <actionGroup ref="replaceTextToTinyMCE" stepKey="replaceMessageText"> |
2361 | 2284 | <argument name="property" value="PageBuilderBannerMessageProperty"/>
|
2362 | 2285 | <argument name="section" value="BannerOnConfigurationPanel"/>
|
2363 | 2286 | </actionGroup>
|
2364 | 2287 | <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
|
2365 |
| - <!-- Validate Inline Editor --> |
2366 |
| - <comment userInput="Validate Inline Editor" stepKey="commentValidateInlineEditor"/> |
| 2288 | + <!-- Check inline editor will validate for not allowing TinyMCE Link and Link URL at the same time --> |
| 2289 | + <comment userInput="Check inline editor will validate for not allowing TinyMCE Link and Link URL at the same time" stepKey="commentCheckInlineEditorPreventAddingBothUrls"/> |
2367 | 2290 | <click selector="{{PageBuilderStage.inlineWYSIWYGEditor(PageBuilderBannerContentType.role, '1')}}" stepKey="focusOnEditorArea"/>
|
2368 | 2291 | <waitForElementVisible selector="{{PageBuilderStage.inlineWYSIWYGEditorPanel(PageBuilderBannerContentType.role, '1')}}" stepKey="waitForEditorPanel"/>
|
2369 | 2292 | <actionGroup ref="addPageLinkToTinyMCEInline" stepKey="insertLinkInStageInlineEditor">
|
2370 | 2293 | <argument name="url" value="{{ExternalLink.googleUrl}}"/>
|
2371 | 2294 | <argument name="textToDisplay" value="{{ExternalLink.googleUrl}}"/>
|
2372 | 2295 | </actionGroup>
|
| 2296 | + <seeElement selector="{{PageBuilderStage.modal(PageBuilderStageBannerMessageInvalidProperty.errorMessage)}}" stepKey="seeCorrectErrorModal"/> |
2373 | 2297 | <actionGroup ref="confirmRemovalModal" stepKey="confirmNestingLinkModal"/>
|
2374 | 2298 | <executeJS function="return (/<a[\s]+([^>]+)>|<a>|<\/a>/igm).test(tinymce.activeEditor.getContent());" stepKey="grabIfAnchorInWysiwygBoolean"/>
|
2375 | 2299 | <assertFalse stepKey="assertMessageHasNoAnchorTags">
|
2376 | 2300 | <actualResult type="variable">grabIfAnchorInWysiwygBoolean</actualResult>
|
2377 | 2301 | </assertFalse>
|
2378 |
| - <!-- Validate Slide Out Editor --> |
2379 |
| - <comment userInput="Validate Slide Out Editor" stepKey="commentValidateSlideOutEditor"/> |
| 2302 | + <!-- Check slide out editor will validate for not allowing TinyMCE Link and Link URL at the same time --> |
| 2303 | + <comment userInput="Check slide out editor will validate for not allowing TinyMCE Link and Link URL at the same time" stepKey="commentCheckSlideOutEditorPreventAddingBothUrls"/> |
2380 | 2304 | <click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusEditor"/>
|
2381 | 2305 | <actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStageAfterInlineValidation">
|
2382 | 2306 | <argument name="contentType" value="PageBuilderBannerContentType"/>
|
|
2385 | 2309 | <assertFalse stepKey="assertMessageHasNoAnchorTags2">
|
2386 | 2310 | <actualResult type="variable">grabIfAnchorInSlideOutWysiwygBoolean</actualResult>
|
2387 | 2311 | </assertFalse>
|
| 2312 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings2"/> |
| 2313 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/> |
| 2314 | + <!-- Storefront: Validate No Link in Banner Content --> |
| 2315 | + <comment userInput="Storefront: Validate No Link in Banner Content" stepKey="CommentValidateNoLinkInBannerContent"/> |
| 2316 | + <actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront"> |
| 2317 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 2318 | + </actionGroup> |
| 2319 | + <!-- Checks for a tags within the message with regex --> |
| 2320 | + <executeJS function="return (/<a[\s]+([^>]+)>|<a>|<\/a>/igm).test({{BannerOnFrontend.contentJS('1')}}.innerHTML);" stepKey="grabIfFrontendAnchorInContentBoolean"/> |
| 2321 | + <assertFalse stepKey="assertFrontendMessageHasNoAnchorTags"> |
| 2322 | + <actualResult type="variable">grabIfFrontendAnchorInContentBoolean</actualResult> |
| 2323 | + </assertFalse> |
2388 | 2324 | </test>
|
2389 | 2325 | </tests>
|
0 commit comments