cool#8648 clipboard: fix desktop/writer/editable_area_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: I60028b22e570d2566a4d64b0cd70150530830852
This commit is contained in:
Miklos Vajna 2024-04-12 16:27:29 +02:00 committed by Caolán McNamara
parent 406dad2128
commit 359e7eca67

View file

@ -1265,6 +1265,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing - Basic typing', f
function selectAndCheckText(upTo, expectedText) {
var backTo = upTo === 'home' ? 'end' : 'home';
ceHelper.moveCaret(upTo, 'shift');
helper.copy();
cy.wait(500);
helper.expectTextForClipboard(expectedText);
ceHelper.moveCaret(backTo);
@ -1272,6 +1273,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing - Basic typing', f
}
it('Typing', function () {
helper.setDummyClipboardForCopy();
// typing paragraph 1
ceHelper.type('Hello World');
selectAndCheckText('home', 'Hello World');
@ -1290,6 +1292,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing - Basic typing', f
});
it('Typing <delete> at paragraph beginning', function () {
helper.setDummyClipboardForCopy();
ceHelper.type('Hello World');
ceHelper.moveCaret('home');
ceHelper.type('{del}');
@ -1297,6 +1300,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing - Basic typing', f
});
it('Typing <enter>', function () {
helper.setDummyClipboardForCopy();
// typing 4 paragraphs
ceHelper.type('Hello World');
ceHelper.type('{enter}');
@ -1316,6 +1320,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing - Basic typing', f
});
it('Typing <backspace>', function () {
helper.setDummyClipboardForCopy();
ceHelper.type('Hello World');
ceHelper.moveCaret('left','',5);
ceHelper.type('{backspace}');
@ -1348,6 +1353,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing - Basic typing', f
});
it('Typing <delete>', function () {
helper.setDummyClipboardForCopy();
ceHelper.type('Hello World');
ceHelper.moveCaret('left','',6);
ceHelper.type('{del}');