diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-10-22 21:58:05 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@users.noreply.github.com> | 2021-10-23 11:20:22 +0200 |
commit | 23a3958b240ff4581629f94f13c48201652ecc46 (patch) | |
tree | 6a56e48bb6f2e22f5c339bddf57532051850a2cc /cypress_test/integration_tests/multiuser/impress | |
parent | fix undo_redo cypress test to reflect text edit undo changes (diff) | |
download | online-23a3958b240ff4581629f94f13c48201652ecc46.tar.gz online-23a3958b240ff4581629f94f13c48201652ecc46.zip |
fix repair_doc cypress test to reflect text edit undo changes
Undo/redo behavior changed in core so that text editing has its
own undo/redo stack and the change is applied to the document
stack when text edit mode ends. This test has been changed to
reflect the undo/redo behavior change in the core.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I6cf427a279aefb79f2f331357731a32c0296c0cd
Diffstat (limited to 'cypress_test/integration_tests/multiuser/impress')
-rw-r--r-- | cypress_test/integration_tests/multiuser/impress/repair_document_spec.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/cypress_test/integration_tests/multiuser/impress/repair_document_spec.js b/cypress_test/integration_tests/multiuser/impress/repair_document_spec.js index 6af539431e..f28169af9c 100644 --- a/cypress_test/integration_tests/multiuser/impress/repair_document_spec.js +++ b/cypress_test/integration_tests/multiuser/impress/repair_document_spec.js @@ -16,24 +16,27 @@ describe('Repair Document', function() { cy.wait(1000); cy.customGet('.leaflet-layer', frameId1).click('center', {force:true}); - cy.customGet('g.leaflet-control-buttons-disabled svg', frameId1).dblclick({force:true}); + helper.typeIntoDocument('Hello', frameId1); + helper.typeIntoDocument('{esc}', frameId1); + + cy.customGet('.leaflet-layer', frameId1).click('center', {force:true}); + cy.customGet('g.leaflet-control-buttons-disabled svg', frameId1).dblclick({force:true}); + helper.typeIntoDocument('{ctrl}{a}', frameId2); helper.typeIntoDocument('Hello World', frameId1); + //to exit from editing mode from frameId1 + helper.typeIntoDocument('{esc}', frameId1); + cy.customGet('#menu-editmenu', frameId2).click() .customGet('#menu-repair', frameId2).click(); - cy.customGet('.leaflet-popup-content table', frameId2).should('exist'); - cy.iframe(frameId2).contains('.leaflet-popup-content table tbody tr','Undo').eq(0) - .click(); + cy.iframe(frameId2).contains('.leaflet-popup-content table tbody tr','Undo').eq(0).click(); cy.customGet('.leaflet-popup-content > input', frameId2).click(); - //to exit from editing mode from frameId1 - helper.typeIntoDocument('{esc}', frameId1); - cy.customGet('.leaflet-layer', frameId2).click('center', {force:true}); cy.customGet('g.leaflet-control-buttons-disabled svg', frameId2).dblclick({force:true}); @@ -42,21 +45,20 @@ describe('Repair Document', function() { helper.typeIntoDocument('{ctrl}{a}', frameId2); - helper.expectTextForClipboard('Hello Worl', frameId2); + helper.expectTextForClipboard('Hello', frameId2); //assert for frameId1 //to exit from editing mode from frameId2 helper.typeIntoDocument('{esc}', frameId2); cy.customGet('.leaflet-layer', frameId1).click('center', {force:true}); - cy.customGet('g.leaflet-control-buttons-disabled svg', frameId1).dblclick({force:true}); cy.wait(1000); helper.selectAllText(frameId1); - helper.expectTextForClipboard('Hello Worl', frameId1); + helper.expectTextForClipboard('Hello', frameId1); } it('Repair by user-2', function() { |