diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor3_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor3_spec.ts index b99358500d53..c88557a2c550 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor3_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor3_spec.ts @@ -49,7 +49,7 @@ describe( }); it("3. Verify applying style in one line should be observed in next line", function () { - agHelper.GetNClick(locators._richText_Text_Color); + agHelper.GetNClick(locators._richText_Text_Color("Black")); agHelper.GetNClick(locators._richText_color("Red")); agHelper .GetElement( diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_2_spec.js index 3b9042c8baf6..b6291d69cc0d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_2_spec.js @@ -137,18 +137,18 @@ describe( cy.get('[aria-label="Underline"]').should("exist"); //Check if button for Background Color is rendered only once within the Toolbar of RTE widget - cy.get('[data-mce-name="backcolor"]').should("have.length", 1); + cy.get('[aria-label="Background color Black"]').should("have.length", 1); //Check if button for Text Color is rendered only once within the Toolbar of RTE widget - cy.get('[data-mce-name="forecolor"]').should("have.length", 1); + cy.get('[aria-label="Text color Black"]').should("have.length", 1); }); it("6. Check if able to add an emoji through toolbar", () => { - cy.get('[data-mce-name="overflow-button"]').click({ force: true }); - cy.wait(500); - cy.get('[data-mce-name="emoticons"]').click({ force: true }); - cy.wait(500); - cy.get('[data-mce-tooltip="grinning"]').click({ force: true }); + cy.get('[aria-label="Reveal or hide additional toolbar items"]').click({ + force: true, + }); + cy.get('[aria-label="Emojis"]').click({ force: true }); + cy.get('[aria-label="grinning"]').click({ force: true }); const getEditorContent = (win) => { const tinyMceId = "rte-component-vw4zehojqt"; const editor = win.tinymce.EditorManager.get(tinyMceId); diff --git a/app/client/cypress/support/Objects/CommonLocators.ts b/app/client/cypress/support/Objects/CommonLocators.ts index a8f5d9041488..600009c550bb 100644 --- a/app/client/cypress/support/Objects/CommonLocators.ts +++ b/app/client/cypress/support/Objects/CommonLocators.ts @@ -316,12 +316,12 @@ export class CommonLocators { `.uppy-Informer p:contains('${msg}')`; _fileUploadAddMore = ".uppy-DashboardContent-addMore"; _buttonText = ".bp3-button-text"; - _richText_TitleBlock = "[data-mce-name='blocks']"; - _richText_Heading = "[aria-label='Heading 1']"; + _richText_TitleBlock = "[aria-label='Block Paragraph']"; + _richText_Heading = "[title='Heading 1']"; _richText_Label_Text = ".tox-tbtn__select-label"; - _richText_Text_Color = - '[data-mce-name="forecolor"] .tox-split-button__chevron'; - _richText_color = (value: string) => `[data-mce-name="${value}"]`; + _richText_Text_Color = (color: string) => + `[aria-label="Text color ${color}"] .tox-split-button__chevron`; + _richText_color = (value: string) => `[title="${value}"]`; _richText_line = "#tinymce p span"; _treeSelectedContent = ".rc-tree-select-selection-item-content"; _switcherIcon = ".switcher-icon"; diff --git a/app/client/package.json b/app/client/package.json index 017efdbdcae7..3b205ee5ea81 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -222,7 +222,7 @@ "tailwindcss": "^3.3.3", "tern": "^0.21.0", "tinycolor2": "^1.4.2", - "tinymce": "^7.3.0", + "tinymce": "6.8.3", "toposort": "^2.0.2", "tslib": "^2.3.1", "typescript": "^5.5.4", diff --git a/app/client/yarn.lock b/app/client/yarn.lock index 03c986230834..5f8a7a105b65 100644 --- a/app/client/yarn.lock +++ b/app/client/yarn.lock @@ -12995,7 +12995,7 @@ __metadata: tailwindcss: ^3.3.3 tern: ^0.21.0 tinycolor2: ^1.4.2 - tinymce: ^7.3.0 + tinymce: 6.8.3 toposort: ^2.0.2 ts-jest: 29.1.0 ts-jest-mock-import-meta: ^0.12.0 @@ -32225,7 +32225,14 @@ __metadata: languageName: node linkType: hard -"tinymce@npm:^7.0.0 || ^6.0.0 || ^5.5.1, tinymce@npm:^7.3.0": +"tinymce@npm:6.8.3": + version: 6.8.3 + resolution: "tinymce@npm:6.8.3" + checksum: 2ce922ceb60636778afb21a493e99d561e73f82c5fb331a4f666d973129ca27277bc1b6332d6932ab8fe0a379b1f201285f143a2d72646a813fda88a0dec5312 + languageName: node + linkType: hard + +"tinymce@npm:^7.0.0 || ^6.0.0 || ^5.5.1": version: 7.3.0 resolution: "tinymce@npm:7.3.0" checksum: 8c2205e8f316ae86c713ba09d8072921050011fbb6a28060c02c53d79d34d470995f286b478966e42c767d5905fd9d89a808338d63ac63a0ea0f96a017b020e2