diff options
author | Rash419 <rashesh.padia@collabora.com> | 2021-08-17 17:44:18 +0530 |
---|---|---|
committer | Pranam Lashkari <plashkari628@gmail.com> | 2021-08-21 19:53:36 +0530 |
commit | 843d8aedb413e43a0a4436f3d97c10299dd87598 (patch) | |
tree | 0b95a15fe653b033aa87f3f228356172810e1b4b /cypress_test/integration_tests/multiuser/impress | |
parent | fix: loleaflet: cursor behaviour when mouseleaves from verticalScrollbar (diff) | |
download | online-843d8aedb413e43a0a4436f3d97c10299dd87598.tar.gz online-843d8aedb413e43a0a4436f3d97c10299dd87598.zip |
cypress: undo,redo,repair tests for single and multiuser
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I802d9e29a72ea71a88c1d4d736b743866a227c19
Diffstat (limited to 'cypress_test/integration_tests/multiuser/impress')
-rw-r--r-- | cypress_test/integration_tests/multiuser/impress/repair_document_spec.js | 69 |
1 files changed, 69 insertions, 0 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 new file mode 100644 index 0000000000..6af539431e --- /dev/null +++ b/cypress_test/integration_tests/multiuser/impress/repair_document_spec.js @@ -0,0 +1,69 @@ +/* global describe it cy beforeEach require afterEach */ + +var helper = require('../../common/helper'); +describe('Repair Document', function() { + var testFileName = 'repair_doc.odp'; + + beforeEach(function() { + helper.beforeAll(testFileName, 'impress', undefined, true); + }); + + afterEach(function() { + helper.afterAll(testFileName, this.currentTest.state); + }); + + function repairDoc(frameId1, frameId2) { + 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 World', 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.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}); + + cy.wait(1000); + + helper.typeIntoDocument('{ctrl}{a}', frameId2); + + helper.expectTextForClipboard('Hello Worl', 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); + } + + it('Repair by user-2', function() { + repairDoc('#iframe1', '#iframe2'); + }); + + it('Repair by user-1', function() { + repairDoc('#iframe2', '#iframe1'); + }); +}); |