Skip to content

Commit

Permalink
cool#8648 clipboard: fix desktop/calc/undo_redo_spec.js
Browse files Browse the repository at this point in the history
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: Idb62d8496f8ff9503654ecea1747f097463afb1b
  • Loading branch information
vmiklos authored and caolanm committed Apr 16, 2024
1 parent c10cc6d commit 7f9c809
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cypress_test/integration_tests/desktop/calc/undo_redo_spec.js
Expand Up @@ -21,21 +21,26 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing Operations', funct
helper.typeIntoDocument('Hello World');
helper.typeIntoDocument('{ctrl}z');
helper.selectAllText();
helper.copy();
cy.cGet('#copy-paste-container pre').should('not.have.text', 'Hello World');
}

it('Undo', function() {
helper.setDummyClipboardForCopy();
undo();
});

it('Redo', function() {
helper.setDummyClipboardForCopy();
undo();
helper.typeIntoDocument('{ctrl}y');
helper.selectAllText();
helper.copy();
helper.expectTextForClipboard('Hello World');
});

it('Repair Document', function() {
helper.setDummyClipboardForCopy();
helper.typeIntoDocument('Hello World');
helper.typeIntoDocument('{enter}');
calcHelper.dblClickOnFirstCell();
Expand All @@ -45,6 +50,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing Operations', funct
repairHelper.rollbackPastChange('Undo');
calcHelper.dblClickOnFirstCell();
helper.selectAllText();
helper.copy();
helper.expectTextForClipboard('Hello World');
});
});

0 comments on commit 7f9c809

Please sign in to comment.