|
27 | 27 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
28 | 28 | </before> |
29 | 29 | <after> |
| 30 | + <!-- Remove Image root folder--> |
30 | 31 | <actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery"/> |
31 | 32 | <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder"> |
32 | 33 | <argument name="FolderName" value="Storage Root"/> |
|
42 | 43 | <waitForPageLoad stepKey="waitForGridReload"/> |
43 | 44 | <deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock"/> |
44 | 45 | <deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage"/> |
| 46 | + <!-- Set default option to WYSIWYG Editor Configuration--> |
45 | 47 | <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> |
46 | 48 | <actionGroup ref="CliMediaGalleryEnhancedEnableActionGroup" stepKey="disableOldMediaGallery"> |
47 | 49 | <argument name="enabled" value="1"/> |
48 | 50 | </actionGroup> |
49 | 51 | <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 52 | + <!-- Logout from admin--> |
50 | 53 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
51 | 54 | </after> |
| 55 | + <!-- Set WYSIWYG Editor to disabled By Default --> |
52 | 56 | <actionGroup ref="NavigateToAdminContentManagementPageActionGroup" stepKey="navigateToCmsConfigPage"/> |
53 | 57 | <conditionalClick selector="{{ContentManagementSection.WYSIWYGOptions}}" dependentSelector="{{ContentManagementSection.EnableWYSIWYG}}" visible="false" stepKey="expandWYSIWYGOptionsTab"/> |
54 | 58 | <waitForElementVisible selector="{{ContentManagementSection.EnableWYSIWYG}}" stepKey="waitTabToExpand"/> |
55 | 59 | <uncheckOption selector="{{ContentManagementSection.EnableSystemValue}}" stepKey="enableEnableSystemValue"/> |
56 | 60 | <selectOption selector="{{ContentManagementSection.EnableWYSIWYG}}" userInput="Disabled by Default" stepKey="disableWYSIWYG"/> |
57 | 61 | <click selector="{{ContentManagementSection.WYSIWYGOptions}}" stepKey="collapseWYSIWYGOptionsTab"/> |
58 | | - |
59 | 62 | <click selector="{{ContentManagementSection.Save}}" stepKey="clickSaveConfig"/> |
60 | 63 | <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder"/> |
61 | 64 | <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> |
|
66 | 69 | <actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/> |
67 | 70 | <click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="selectCreatedCategory"/> |
68 | 71 | <waitForPageLoad stepKey="waitForPageToLoaded2"/> |
| 72 | + <!-- Navigate to Content & Click On Show hide button and then Asset WYSIWYG editor for Category--> |
69 | 73 | <click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTab"/> |
70 | 74 | <conditionalClick selector="{{TinyMCESection.ShowHideBtn}}" dependentSelector="{{TinyMCESection.TinyMCE}}" visible="false" stepKey="toggleShowHiddenForCategory"/> |
71 | 75 | <waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCECategory"/> |
72 | 76 | <click selector="{{TinyMCESection.ShowHideBtn}}" stepKey="toggleShowHiddenForCategory1"/> |
73 | 77 | <waitForElementNotVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCECategory1"/> |
74 | 78 | <click selector="{{TinyMCESection.ShowHideBtn}}" stepKey="toggleShowHiddenForCategory2"/> |
75 | 79 | <waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCECategory2"/> |
| 80 | + <!-- Verify Content Description By Adding Text into It --> |
76 | 81 | <executeJS function="tinyMCE.get('category_form_description').setContent('%Hello Category World!');" stepKey="executeJSFillContent"/> |
77 | 82 | <click selector="{{TinyMCESection.ShowHideBtn}}" stepKey="clickOnShowHideEditorBtn"/> |
| 83 | + <!-- Verify Content Description By inserting Image --> |
78 | 84 | <actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/> |
79 | 85 | <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilter"/> |
80 | 86 | <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder"> |
|
97 | 103 | </actionGroup> |
98 | 104 | <waitForPageLoad stepKey="waitForCategoryPageLoad"/> |
99 | 105 | <waitForElementVisible selector="{{TinyMCESection.imageSource(ImageUpload3.fileName)}}" stepKey="assertMediaSourceCategoryDescription"/> |
| 106 | + <!-- Assert Content Description In Storefront (Image and Text) --> |
100 | 107 | <waitForText userInput="%Hello Category World!" selector="{{StorefrontCategoryMainSection.CatalogDescription}}" stepKey="assertCatalogDescription"/> |
101 | 108 | <actionGroup ref="NavigateToMediaGalleryActionGroup" stepKey="navigateToMediaGallery2"/> |
102 | 109 | <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandWysiwygFolder2"> |
|
113 | 120 | <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openSimpleProduct"> |
114 | 121 | <argument name="product" value="$$createSimpleProduct$$"/> |
115 | 122 | </actionGroup> |
| 123 | + <!-- Navigate to Content & Click On Show hide button and then Asset WYSIWYG editor for Product--> |
116 | 124 | <waitForElementClickable selector="{{AdminProductFormSection.contentTab}}" stepKey="waitToClickContentTab"/> |
117 | 125 | <click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTabForProduct"/> |
118 | 126 | <waitForPageLoad stepKey="waitForGridLoad2"/> |
|
123 | 131 | <click selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.ShowHideBtn}}" stepKey="clickAgainShowHideBtn2"/> |
124 | 132 | <click selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.EditArea}}" stepKey="focusProductShortDescriptionWysiwyg2"/> |
125 | 133 | <waitForElementVisible selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.TinyMCE}}" stepKey="waitForShortDescription2"/> |
| 134 | + <!-- Verify Product Content ShortDescription By Adding Text into It --> |
126 | 135 | <executeJS function="tinyMCE.get('product_form_short_description').setContent('%Hello World! Short Content');" stepKey="executeJSFillContent2"/> |
127 | 136 | <scrollTo selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.ShowHideBtn}}" stepKey="scrollToDesShowHideBtn1"/> |
128 | 137 | <conditionalClick selector="{{TinyMCESection.ShowHideBtn}}" dependentSelector="{{TinyMCESection.TinyMCE}}" visible="false" stepKey="clickShowHideEditorBtn1"/> |
129 | 138 | <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="saveProductAgain"/> |
130 | 139 | <conditionalClick selector="{{CmsNewPagePageContentSection.header}}" dependentSelector="{{CmsNewPagePageContentSection.contentHeading}}" visible="false" stepKey="clickExpandContent1"/> |
131 | 140 | <waitForElementVisible selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.InsertImageBtn}}" stepKey="waitForInsertImageButton1"/> |
132 | 141 | <click selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.InsertImageBtn}}" stepKey="clickInsertImage1"/> |
133 | | - <!-- wait for initial media gallery load, where the gallery chrome loads (and triggers loading modal) --> |
| 142 | + <!--Verify Product Content Short Description By inserting Image --> |
134 | 143 | <waitForPageLoad stepKey="waitForMediaGalleryInitialLoad1"/> |
135 | 144 | <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView1"/> |
136 | 145 | <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder1"> |
|
154 | 163 | <actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache1"> |
155 | 164 | <argument name="tags" value=""/> |
156 | 165 | </actionGroup> |
| 166 | + <!-- Verify the Text and Image in Product short description --> |
157 | 167 | <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="goBackToProductPage"> |
158 | 168 | <argument name="productUrlKey" value="$$createSimpleProduct.custom_attributes[url_key]$$"/> |
159 | 169 | </actionGroup> |
|
174 | 184 | <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct"> |
175 | 185 | <argument name="product" value="$$createSimpleProduct$$"/> |
176 | 186 | </actionGroup> |
| 187 | + <!-- Navigate to Content & Click On Show hide button and then Asset WYSIWYG editor for Product--> |
177 | 188 | <waitForElementClickable selector="{{AdminProductFormSection.contentTab}}" stepKey="waitToClickContentTab1"/> |
178 | 189 | <click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTabForProduct1"/> |
179 | 190 | <waitForElementNotVisible selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.TinyMCE}}" stepKey="waitForDescription1"/> |
|
184 | 195 | <waitForElementNotVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="assertWYSIWYGEditorNotToBeVisible1"/> |
185 | 196 | <conditionalClick selector="{{TinyMCESection.ShowHideBtn}}" dependentSelector="{{TinyMCESection.TinyMCE}}" visible="false" stepKey="clickAgainShowHideBtn1"/> |
186 | 197 | <waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="assertAgainWYSIWYGEditorToBeVisible1"/> |
187 | | - <!-- Add content into description --> |
| 198 | + <!-- Adding Text for content into Product description --> |
188 | 199 | <actionGroup ref="AdminOpenContentSectionOnProductPageActionGroup" stepKey="openDescriptionDropDown1"/> |
189 | 200 | <actionGroup ref="AdminFillInProductDescriptionActionGroup" stepKey="fillLongDescription"> |
190 | 201 | <argument name="description" value="%Hello Test World!"/> |
|
193 | 204 | <conditionalClick selector="{{CmsNewPagePageContentSection.header}}" dependentSelector="{{CmsNewPagePageContentSection.contentHeading}}" visible="false" stepKey="clickExpandContent2"/> |
194 | 205 | <waitForElementVisible selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.InsertImageBtn}}" stepKey="waitForInsertImageButton2"/> |
195 | 206 | <click selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.InsertImageBtn}}" stepKey="clickInsertImage2"/> |
196 | | - <!-- wait for initial media gallery load, where the gallery chrome loads (and triggers loading modal) --> |
| 207 | + <!-- Inserting Image into Product Description --> |
197 | 208 | <waitForPageLoad stepKey="waitForMediaGalleryLoad"/> |
198 | 209 | <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetToDefaultView2"/> |
199 | 210 | <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectWysiwygFolder2"> |
|
217 | 228 | <actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache2"> |
218 | 229 | <argument name="tags" value=""/> |
219 | 230 | </actionGroup> |
| 231 | + <!-- Verify the Text and Image in Product description --> |
220 | 232 | <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="goToProductPage"> |
221 | 233 | <argument name="productUrlKey" value="$$createSimpleProduct.custom_attributes[url_key]$$"/> |
222 | 234 | </actionGroup> |
|
241 | 253 | <fillField selector="{{BasicFieldNewsletterSection.templateSubject}}" userInput="{{_defaultNewsletter.subject}}" stepKey="fillTemplateSubject"/> |
242 | 254 | <fillField selector="{{BasicFieldNewsletterSection.senderName}}" userInput="{{_defaultNewsletter.senderName}}" stepKey="fillSenderName"/> |
243 | 255 | <fillField selector="{{BasicFieldNewsletterSection.senderEmail}}" userInput="{{_defaultNewsletter.senderEmail}}" stepKey="fillSenderEmail"/> |
| 256 | + <!-- Navigate to Template & Click On Show hide button and then Asset WYSIWYG editor for Newsletter--> |
244 | 257 | <conditionalClick selector="{{TinyMCESection.ShowHideBtn}}" dependentSelector="{{TinyMCESection.TinyMCE}}" visible="false" stepKey="toggleEditorIfHidden"/> |
245 | 258 | <waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCEToBeDisplayed"/> |
246 | 259 | <conditionalClick selector="{{TinyMCESection.ShowHideBtn}}" dependentSelector="{{TinyMCESection.TinyMCE}}" visible="false" stepKey="toggleEditorIfNotHidden"/> |
247 | 260 | <waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCENotToBeDisplayed"/> |
248 | 261 | <conditionalClick selector="{{TinyMCESection.ShowHideBtn}}" dependentSelector="{{TinyMCESection.TinyMCE}}" visible="false" stepKey="toggleEditorAgainIfHidden"/> |
249 | 262 | <waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCEAgainDisplayed"/> |
| 263 | + <!-- Adding Text for content into Newsletter description --> |
250 | 264 | <executeJS function="tinyMCE.get('text').setContent('%Hello World From Newsletter Template');" stepKey="executeJSFillContentForNewsletter"/> |
| 265 | + <!-- Inserting Image for content into Newsletter description --> |
251 | 266 | <click selector="{{TinyMCESection.InsertImageIcon}}" stepKey="clickInsertImageIcon"/> |
252 | 267 | <waitForPageLoad stepKey="waitForPageLoad"/> |
253 | 268 | <actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="clickBrowserBtn"/> |
|
275 | 290 | <click selector="{{AdminNewsletterGridMainActionsSection.Preview(_defaultNewsletter.name)}}" stepKey="clickPreview"/> |
276 | 291 | <switchToWindow stepKey="switchToWindow" userInput="action_window"/> |
277 | 292 | <actionGroup ref="SwitchToPreviewIframeActionGroup" stepKey="switchToIframe"/> |
278 | | - <!--Verify that the text and image are present--> |
| 293 | + <!--Verify that the text and image are present For NewsLetter--> |
279 | 294 | <waitForText userInput="%Hello World From Newsletter Template" stepKey="waitForPageLoad3"/> |
280 | 295 | <waitForElementVisible selector="{{StorefrontNewsletterSection.imageSource(ImageUpload3.fileName)}}" stepKey="assertMediaSource"/> |
281 | 296 | <closeTab stepKey="closeTab"/> |
|
293 | 308 | <actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage1"> |
294 | 309 | <argument name="CMSPage" value="$$createCMSPage$$"/> |
295 | 310 | </actionGroup> |
| 311 | + <!-- Navigate to Content & Click On Show hide button and then Asset WYSIWYG editor for CMS Page--> |
296 | 312 | <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickOnExpandContent"/> |
297 | 313 | <conditionalClick selector="{{TinyMCESection.ShowHideBtn}}" dependentSelector="{{TinyMCESection.TinyMCE}}" visible="false" stepKey="clickShowHiddenForCMSPage"/> |
298 | 314 | <waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCE1"/> |
299 | 315 | <click selector="{{TinyMCESection.ShowHideBtn}}" stepKey="toggleShowHiddenForCMSPage"/> |
300 | 316 | <waitForElementNotVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCENotDisplayedInCMSPage"/> |
301 | 317 | <conditionalClick selector="{{TinyMCESection.ShowHideBtn}}" dependentSelector="{{TinyMCESection.TinyMCE}}" visible="false" stepKey="toggleShowHiddenForCMSPageAgain"/> |
302 | 318 | <waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCEDisplayInCMSPage"/> |
| 319 | + <!-- Adding Text for content into CMS Page description --> |
303 | 320 | <executeJS function="tinyMCE.get('cms_page_form_content').setContent('%Hello CMS World!');" stepKey="executeJSFillCmsContent"/> |
304 | 321 | <click selector="{{TinyMCESection.ShowHideBtn}}" stepKey="clickShowHideBtn"/> |
305 | 322 | <actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage"> |
|
312 | 329 | <waitForPageLoad stepKey="waitForCMSPageLoad"/> |
313 | 330 | <actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="clickOnBrowserBtn"/> |
314 | 331 | <actionGroup ref="VerifyMediaGalleryStorageActionsActionGroup" stepKey="assertMediaGalleryStorageBtn"/> |
315 | | - <comment userInput="BIC workaround" stepKey="navigateToFolder"/> |
316 | 332 | <actionGroup ref="AdminExpandMediaGalleryFolderActionGroup" stepKey="expandStorageRootFolder3"> |
317 | 333 | <argument name="FolderName" value="Storage Root"/> |
318 | 334 | </actionGroup> |
| 335 | + <!-- Inserting Image for content into CMS Page description --> |
319 | 336 | <actionGroup ref="NavigateToMediaFolderActionGroup" stepKey="navigateToWysiwygFolder2"> |
320 | 337 | <argument name="FolderName" value="wysiwyg"/> |
321 | 338 | </actionGroup> |
|
336 | 353 | <actionGroup ref="SaveCmsPageActionGroup" stepKey="clickSavePage"/> |
337 | 354 | <amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/> |
338 | 355 | <waitForPageLoad stepKey="wait4"/> |
| 356 | + <!--Verify that the text and image are present For CMS Page--> |
339 | 357 | <waitForText userInput="%Hello CMS World" stepKey="seeCmsContent"/> |
340 | 358 | <waitForElementVisible selector="{{StorefrontCMSPageSection.imageSource(ImageUpload3.fileName)}}" stepKey="assertMediaSource2"/> |
341 | 359 | <!--Code Section To Delete ImageFolder--> |
|
363 | 381 | <argument name="CMSBlockPage" value="$$createPreReqBlock$$"/> |
364 | 382 | </actionGroup> |
365 | 383 | <selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="All Store View" stepKey="selectAllStoreView"/> |
| 384 | + <!-- Navigate to Content & Click On Show hide button and then Asset WYSIWYG editor for Block--> |
366 | 385 | <conditionalClick selector="{{TinyMCESection.ShowHideBtn}}" dependentSelector="{{TinyMCESection.TinyMCE}}" visible="false" stepKey="clickShowEditorBtn3"/> |
367 | 386 | <waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCEToBeAppear"/> |
368 | 387 | <conditionalClick selector="{{TinyMCESection.ShowHideBtn}}" dependentSelector="{{TinyMCESection.TinyMCE}}" visible="true" stepKey="clickShowEditorBtn4"/> |
369 | 388 | <waitForElementNotVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCENotToBeAppear"/> |
370 | 389 | <conditionalClick selector="{{TinyMCESection.ShowHideBtn}}" dependentSelector="{{TinyMCESection.TinyMCE}}" visible="false" stepKey="clickShowEditorBtn5"/> |
371 | 390 | <waitForElementVisible selector="{{TinyMCESection.TinyMCE}}" stepKey="waitForTinyMCE5"/> |
| 391 | + <!-- Adding Text for content into CMS Block description --> |
372 | 392 | <executeJS function="tinyMCE.get('cms_block_form_content').setContent('%Hello CMS Block Page');" stepKey="executeJSFillContentForBlock"/> |
| 393 | + <!-- Inserting Image for content into CMS Block description --> |
373 | 394 | <click selector="{{TinyMCESection.InsertImageIcon}}" stepKey="clickInsertImageIcon1"/> |
374 | 395 | <waitForPageLoad stepKey="waitForPageLoad4"/> |
375 | 396 | <actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="clickBrowserBtn1"/> |
|
395 | 416 | <click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="clickSaveBlock"/> |
396 | 417 | <amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnCMSTestPage"/> |
397 | 418 | <waitForPageLoad stepKey="waitForPageBlockLoad"/> |
398 | | - <!--see image on Storefront--> |
| 419 | + <!--Verify Text & Image on Storefront--> |
399 | 420 | <waitForText userInput="%Hello CMS Block Page" stepKey="seeContentForCMSBlock"/> |
400 | 421 | <waitForElementVisible selector="{{StorefrontCMSPageSection.imageSource(ImageUpload3.fileName)}}" stepKey="assertMediaSource1"/> |
401 | 422 | </test> |
|
0 commit comments