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 <vmiklos@collabora.com>
Change-Id: Ib53e71546cc1965f4a1073d507b07caef086c628
This commit is contained in:
Miklos Vajna 2024-04-16 08:16:38 +02:00 committed by Caolán McNamara
parent 5bf298243f
commit a8d4a3e859
2 changed files with 6 additions and 2 deletions

View file

@ -208,10 +208,13 @@ function ensureViewContainsCellCursor() {
cy.log('<< ensureViewContainsCellCursor - end'); cy.log('<< ensureViewContainsCellCursor - end');
} }
function assertSheetContents(expectedData) { function assertSheetContents(expectedData, copy) {
cy.log('>> assertSheetContents - start'); cy.log('>> assertSheetContents - start');
selectEntireSheet(); selectEntireSheet();
if (copy === true) {
helper.copy();
}
assertDataClipboardTable(expectedData); assertDataClipboardTable(expectedData);
cy.log('<< assertSheetContents - end'); cy.log('<< assertSheetContents - end');

View file

@ -9,7 +9,8 @@ describe(['tagdesktop'], 'Row Column Operation', function() {
beforeEach(function() { beforeEach(function() {
helper.beforeAll(testFileName, 'calc'); helper.beforeAll(testFileName, 'calc');
desktopHelper.switchUIToNotebookbar(); desktopHelper.switchUIToNotebookbar();
calcHelper.assertSheetContents(['Hello','Hi','World','Bye']); helper.setDummyClipboardForCopy();
calcHelper.assertSheetContents(['Hello','Hi','World','Bye'], true);
calcHelper.clickOnFirstCell(true,false); calcHelper.clickOnFirstCell(true,false);
cy.cGet('#toolbar-up .w2ui-scroll-right').click(); cy.cGet('#toolbar-up .w2ui-scroll-right').click();
}); });