Skip to content

Commit

Permalink
cool#8648 clipboard: fix desktop/impress/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: Iff00cdd8e1a8863c09362cefa3a2bfdf6275f837
  • Loading branch information
vmiklos authored and caolanm committed Apr 15, 2024
1 parent 359e7ec commit 770feeb
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -25,21 +25,26 @@ describe(['tagdesktop'], 'Editing Operations', function() {
impressHelper.selectTextOfShape();
helper.typeIntoDocument('{ctrl}z');
impressHelper.selectTextOfShape();
helper.copy();
helper.clipboardTextShouldBeDifferentThan('Hello World');
}

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

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

it('Repair Document', function() {
helper.setDummyClipboardForCopy();
helper.typeIntoDocument('Hello World');
impressHelper.triggerNewSVGForShapeInTheCenter();
impressHelper.selectTextOfShape();
Expand All @@ -48,6 +53,7 @@ describe(['tagdesktop'], 'Editing Operations', function() {
repairHelper.rollbackPastChange('Undo');
impressHelper.triggerNewSVGForShapeInTheCenter();
impressHelper.selectTextOfShape();
helper.copy();
helper.expectTextForClipboard('Hello World');
});
});

0 comments on commit 770feeb

Please sign in to comment.