From a8d4a3e8592d3fcdd8a9007b49613a3fa5f58bf3 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 16 Apr 2024 08:16:38 +0200 Subject: [PATCH] cool#8648 clipboard: fix desktop/calc/searchbar_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: Ib53e71546cc1965f4a1073d507b07caef086c628 --- cypress_test/integration_tests/common/calc_helper.js | 5 ++++- .../desktop/calc/row_column_operation_spec.js | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cypress_test/integration_tests/common/calc_helper.js b/cypress_test/integration_tests/common/calc_helper.js index 54680b2be..7659f1411 100644 --- a/cypress_test/integration_tests/common/calc_helper.js +++ b/cypress_test/integration_tests/common/calc_helper.js @@ -208,10 +208,13 @@ function ensureViewContainsCellCursor() { cy.log('<< ensureViewContainsCellCursor - end'); } -function assertSheetContents(expectedData) { +function assertSheetContents(expectedData, copy) { cy.log('>> assertSheetContents - start'); selectEntireSheet(); + if (copy === true) { + helper.copy(); + } assertDataClipboardTable(expectedData); cy.log('<< assertSheetContents - end'); diff --git a/cypress_test/integration_tests/desktop/calc/row_column_operation_spec.js b/cypress_test/integration_tests/desktop/calc/row_column_operation_spec.js index be8a05de3..a2fb94158 100644 --- a/cypress_test/integration_tests/desktop/calc/row_column_operation_spec.js +++ b/cypress_test/integration_tests/desktop/calc/row_column_operation_spec.js @@ -9,7 +9,8 @@ describe(['tagdesktop'], 'Row Column Operation', function() { beforeEach(function() { helper.beforeAll(testFileName, 'calc'); desktopHelper.switchUIToNotebookbar(); - calcHelper.assertSheetContents(['Hello','Hi','World','Bye']); + helper.setDummyClipboardForCopy(); + calcHelper.assertSheetContents(['Hello','Hi','World','Bye'], true); calcHelper.clickOnFirstCell(true,false); cy.cGet('#toolbar-up .w2ui-scroll-right').click(); });