diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2024-04-15 16:27:23 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@gmail.com> | 2024-04-16 13:47:11 +0100 |
commit | 5bf298243f5c1b6621cbb237d40358d5c411ec67 (patch) | |
tree | ca90c060bdc008f99355b86ca859937cee2e02ce | |
parent | cool#8648 clipboard: fix desktop/calc/top_toolbar_spec.js (diff) | |
download | online-5bf298243f5c1b6621cbb237d40358d5c411ec67.tar.gz online-5bf298243f5c1b6621cbb237d40358d5c411ec67.zip |
cool#8648 clipboard: fix desktop/calc/searchbar_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: I6148fdbdff6390c20e454ed9f26c6e55e774cc69
-rw-r--r-- | cypress_test/integration_tests/desktop/calc/searchbar_spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cypress_test/integration_tests/desktop/calc/searchbar_spec.js b/cypress_test/integration_tests/desktop/calc/searchbar_spec.js index 947c387edf..64fa9b7d1e 100644 --- a/cypress_test/integration_tests/desktop/calc/searchbar_spec.js +++ b/cypress_test/integration_tests/desktop/calc/searchbar_spec.js @@ -16,12 +16,14 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Searching via search bar.' }); it('Search existing word.', function() { + helper.setDummyClipboardForCopy(); searchHelper.typeIntoSearchField('a'); searchHelper.searchNext(); // First cell should be selected cy.cGet('input#addressInput').should('have.prop', 'value', 'A1'); + helper.copy(); cy.cGet('#copy-paste-container table td').should('have.text', 'a'); }); @@ -35,52 +37,62 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Searching via search bar.' }); it('Search next / prev instance.', function() { + helper.setDummyClipboardForCopy(); searchHelper.typeIntoSearchField('a'); searchHelper.searchNext(); cy.cGet('input#addressInput').should('have.prop', 'value', 'A1'); + helper.copy(); cy.cGet('#copy-paste-container table td').should('have.text', 'a'); // Search next instance searchHelper.searchNext(); cy.cGet('input#addressInput').should('have.prop', 'value', 'B1'); + helper.copy(); cy.cGet('#copy-paste-container table td').should('have.text', 'a'); // Search prev instance searchHelper.searchPrev(); cy.cGet('input#addressInput').should('have.prop', 'value', 'A1'); + helper.copy(); cy.cGet('#copy-paste-container table td').should('have.text', 'a'); }); it('Search wrap at document end', function() { + helper.setDummyClipboardForCopy(); searchHelper.typeIntoSearchField('a'); searchHelper.searchNext(); cy.cGet('input#addressInput').should('have.prop', 'value', 'A1'); + helper.copy(); cy.cGet('#copy-paste-container table td').should('have.text', 'a'); // Search next instance searchHelper.searchNext(); cy.cGet('input#addressInput').should('have.prop', 'value', 'B1'); + helper.copy(); cy.cGet('#copy-paste-container table td').should('have.text', 'a'); // Search next instance, which is in the beginning of the document. searchHelper.searchNext(); cy.cGet('input#addressInput').should('have.prop', 'value', 'A1'); + helper.copy(); cy.cGet('#copy-paste-container table td').should('have.text', 'a'); }); it('Cancel search.', function() { + helper.setDummyClipboardForCopy(); searchHelper.typeIntoSearchField('a'); searchHelper.searchNext(); cy.cGet('input#addressInput').should('have.prop', 'value', 'A1'); + helper.copy(); cy.cGet('#copy-paste-container table td').should('have.text', 'a'); // Cancel search -> selection removed |