From ad22a9f017b15658d90a50c011e5bcf8c2c64b87 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 19 Apr 2024 14:35:23 +0200 Subject: [PATCH] cool#8648 clipboard: fix mobile/writer/insert_formatting_mark_spec.js To work even if we don't automatically fetch HTML when a text selection is created. Signed-off-by: Miklos Vajna Change-Id: I302edb920801895f1a728313b5e9a9405ec7d396 --- .../mobile/writer/insert_formatting_mark_spec.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js b/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js index 5553f4e81..27303f261 100644 --- a/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js +++ b/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js @@ -23,45 +23,59 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Insert formatting mark via }); it('Insert non-breaking space.', function() { + helper.setDummyClipboardForCopy(); cy.cGet('body').contains('.menu-entry-with-icon', 'Insert non-breaking space').click(); writerHelper.selectAllTextOfDoc(); + helper.copy(); cy.cGet('#copy-paste-container p').should('contain.text', '\u00a0'); }); it('Insert non-breaking hyphen.', function() { + helper.setDummyClipboardForCopy(); cy.cGet('body').contains('.menu-entry-with-icon', 'Insert non-breaking hyphen').click(); writerHelper.selectAllTextOfDoc(); + helper.copy(); cy.cGet('#copy-paste-container p').should('contain.text', '\u2011'); }); it('Insert soft hyphen.', function() { + helper.setDummyClipboardForCopy(); cy.cGet('body').contains('.menu-entry-with-icon', 'Insert soft Hyphen').click(); writerHelper.selectAllTextOfDoc(); + helper.copy(); cy.cGet('#copy-paste-container p').should('contain.text', '\u00ad'); }); it('Insert no-width optional break.', function() { + helper.setDummyClipboardForCopy(); cy.cGet('body').contains('.menu-entry-with-icon', 'No-width Optional Break').click(); writerHelper.selectAllTextOfDoc(); + helper.copy(); cy.cGet('#copy-paste-container p').should('contain.text', '\u200b'); }); it('Insert word joiner.', function() { + helper.setDummyClipboardForCopy(); cy.cGet('body').contains('.menu-entry-with-icon', 'Word Joiner').click(); writerHelper.selectAllTextOfDoc(); + helper.copy(); cy.cGet('#copy-paste-container p').should('exist'); cy.cGet('#copy-paste-container p').should('contain.text', '\u2060'); }); it('Insert left-to-right mark.', function() { + helper.setDummyClipboardForCopy(); cy.cGet('body').contains('.menu-entry-with-icon', 'Left-to-right Mark').click(); writerHelper.selectAllTextOfDoc(); + helper.copy(); cy.cGet('#copy-paste-container p').should('contain.text', '\u200e'); }); it('Insert right-to-left mark.', function() { + helper.setDummyClipboardForCopy(); cy.cGet('body').contains('.menu-entry-with-icon', 'Right-to-left Mark').click(); writerHelper.selectAllTextOfDoc(); + helper.copy(); cy.cGet('#copy-paste-container p').should('contain.text', '\u200f'); }); });