Skip to content

Commit

Permalink
cool#8648 clipboard: fix mobile/calc/insertion_wizard_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: I6d8f5429fafa77cc4e3019878c0791555225abd0
  • Loading branch information
vmiklos authored and caolanm committed Apr 18, 2024
1 parent a12bcd3 commit 3a1dd02
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -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();

Expand All @@ -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');
Expand Down Expand Up @@ -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')
Expand All @@ -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')
Expand Down

0 comments on commit 3a1dd02

Please sign in to comment.