cool#8648 clipboard: fix mobile/calc/insertion_wizard_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: I6d8f5429fafa77cc4e3019878c0791555225abd0
This commit is contained in:
Miklos Vajna 2024-04-18 08:26:33 +02:00 committed by Caolán McNamara
parent a12bcd3fb0
commit 3a1dd02dd1

View file

@ -58,6 +58,7 @@ describe(['tagmobile', 'tagnextcloud'], 'Calc insertion wizard.', function() {
});
it('Insert hyperlink.', function() {
helper.setDummyClipboardForCopy();
cy.cGet('body').contains('.menu-entry-with-icon', 'Hyperlink...')
.click();
@ -80,6 +81,7 @@ describe(['tagmobile', 'tagnextcloud'], 'Calc insertion wizard.', function() {
.should('be.visible');
calcHelper.selectEntireSheet();
helper.copy();
cy.cGet('#copy-paste-container table td a')
.should('have.text', 'some text');
@ -108,11 +110,13 @@ describe(['tagmobile', 'tagnextcloud'], 'Calc insertion wizard.', function() {
});
it('Insert date.', function() {
helper.setDummyClipboardForCopy();
// Do insertion
cy.cGet('body').contains('.menu-entry-with-icon', 'Date')
.click();
calcHelper.selectEntireSheet();
helper.copy();
var regex = new RegExp(';MM/DD/YY$');
cy.cGet('#copy-paste-container table td')
@ -121,11 +125,13 @@ describe(['tagmobile', 'tagnextcloud'], 'Calc insertion wizard.', function() {
});
it('Insert time.', function() {
helper.setDummyClipboardForCopy();
// Do insertion
cy.cGet('body').contains('.menu-entry-with-icon', 'Time')
.click();
calcHelper.selectEntireSheet();
helper.copy();
var regex = new RegExp(';HH:MM:SS AM/PM$');
cy.cGet('#copy-paste-container table td')