From 9d390f1ab36d5bee8b726d1ae2514c5b3ae797da Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Fri, 11 Aug 2023 09:50:18 +0100 Subject: [PATCH] Updated pasted HTML tests (#14277) GitOrigin-RevId: 2a3001a23c2cf3cd82d3d2b464b5feb858cd5885 --- .../codemirror-editor-visual-paste-html.spec.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual-paste-html.spec.tsx b/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual-paste-html.spec.tsx index 33effeee24..4646104862 100644 --- a/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual-paste-html.spec.tsx +++ b/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual-paste-html.spec.tsx @@ -142,7 +142,7 @@ describe(' paste HTML in Visual mode', function () { cy.spy(clipboardData, 'getData').as('get-data') cy.get('@content').trigger('paste', { clipboardData }) - cy.get('@content').should('have.text', '\\href{https://example.com/}{foo}') + cy.get('@content').should('have.text', '{foo}') cy.get('.ol-cm-command-href').should('have.length', 1) }) @@ -183,19 +183,18 @@ describe(' paste HTML in Visual mode', function () { it('handles pasted text with formatting', function () { mountEditor() - const data = 'footh bar2' + const data = 'footh bar2 baz' const clipboardData = new DataTransfer() clipboardData.setData('text/html', data) cy.spy(clipboardData, 'getData').as('get-data') cy.get('@content').trigger('paste', { clipboardData }) - cy.get('@content').should( - 'have.text', - 'foo\\textsuperscript{th} bar\\textsubscript{2}' - ) + cy.get('@content').should('have.text', 'footh bar2 baz') cy.get('.ol-cm-command-textbf').should('have.length', 1) cy.get('.ol-cm-command-textit').should('have.length', 1) + cy.get('.ol-cm-command-textsuperscript').should('have.length', 1) + cy.get('.ol-cm-command-textsubscript').should('have.length', 1) }) it('protects special characters', function () {