diff options
author | Rash419 <rashesh.padia@collabora.com> | 2021-11-10 12:41:35 +0530 |
---|---|---|
committer | Rashesh Padia <rasheshpadia419@gmail.com> | 2021-11-27 15:57:40 +0530 |
commit | 3caec5a43e8a410b8d2523122a71652d36d63d9d (patch) | |
tree | 841ae98dd9856523942fe33b22c6dde19302ef5e /cypress_test/integration_tests | |
parent | Use `cp -a` instead of `cp -ar`. (diff) | |
download | online-3caec5a43e8a410b8d2523122a71652d36d63d9d.tar.gz online-3caec5a43e8a410b8d2523122a71652d36d63d9d.zip |
cypress: enabled and updated all undo-redo and repair document changes for writer according to core changes
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: If9de2d0ffb6194a983981a31eac5421a80ff3e57
Diffstat (limited to 'cypress_test/integration_tests')
4 files changed, 20 insertions, 84 deletions
diff --git a/cypress_test/integration_tests/desktop/writer/undo_redo_spec.js b/cypress_test/integration_tests/desktop/writer/undo_redo_spec.js index 73ae32324b..75037b5529 100644 --- a/cypress_test/integration_tests/desktop/writer/undo_redo_spec.js +++ b/cypress_test/integration_tests/desktop/writer/undo_redo_spec.js @@ -2,7 +2,7 @@ var helper = require('../../common/helper'); -describe.skip('Editing Operations', function() { +describe('Editing Operations', function() { var testFileName = 'undo_redo.odt'; beforeEach(function() { @@ -20,7 +20,7 @@ describe.skip('Editing Operations', function() { helper.selectAllText(); - helper.expectTextForClipboard('\nHello Worl'); + helper.expectTextForClipboard('\nHello \n'); } it('Undo', function() { @@ -38,16 +38,16 @@ describe.skip('Editing Operations', function() { }); it('Repair Document', function() { - helper.typeIntoDocument('Hello'); + helper.typeIntoDocument('Hello World'); cy.get('#menu-editmenu').click() .get('#menu-repair').click(); cy.get('.leaflet-popup-content table').should('exist'); - cy.contains('.leaflet-popup-content table tbody tr','Typing: “e”') + cy.contains('.leaflet-popup-content table tbody tr','Typing: “World”') .dblclick(); - helper.expectTextForClipboard('\nH'); + helper.expectTextForClipboard('\nHello'); }); }); diff --git a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js index e21bc32fc6..45bcbe74c6 100644 --- a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js +++ b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js @@ -164,76 +164,6 @@ describe('Trigger hamburger menu options.', function() { .should('contain.text', 'q'); }); - it.skip('Repair.', function() { - // First change - helper.typeIntoDocument('q'); - - // Second change - helper.typeIntoDocument('w'); - - writerHelper.selectAllTextOfDoc(); - - cy.get('#copy-paste-container p') - .should('contain.text', 'qw'); - - // Undo - mobileHelper.selectHamburgerMenuItem(['Edit', 'Undo']); - - writerHelper.selectAllTextOfDoc(); - - cy.get('#copy-paste-container p') - .should('not.contain.text', 'w'); - - // Revert one undo step via Repair - mobileHelper.selectHamburgerMenuItem(['Edit', 'Repair']); - - cy.get('.leaflet-popup-content') - .should('be.visible'); - - cy.get('.leaflet-popup-content table tr:nth-of-type(2)') - .should('contain.text', 'Redo'); - - cy.get('.leaflet-popup-content table tr:nth-of-type(3)') - .should('contain.text', 'Undo'); - - cy.get('.leaflet-popup-content table tr:nth-of-type(2)') - .click(); - - cy.get('.leaflet-popup-content input[value=\'Jump to state\']') - .click(); - - writerHelper.selectAllTextOfDoc(); - - cy.get('#copy-paste-container p') - .should('contain.text', 'qw'); - - // Revert to the initial state via Repair - mobileHelper.selectHamburgerMenuItem(['Edit', 'Repair']); - - cy.get('.leaflet-popup-content') - .should('be.visible'); - - cy.get('.leaflet-popup-content table tr:nth-of-type(2)') - .should('contain.text', 'Undo'); - - cy.get('.leaflet-popup-content table tr:nth-of-type(3)') - .should('contain.text', 'Undo'); - - cy.get('.leaflet-popup-content table tr:nth-of-type(3)') - .click(); - - cy.get('.leaflet-popup-content input[value=\'Jump to state\']') - .click(); - - writerHelper.selectAllTextOfDoc(); - - cy.get('#copy-paste-container p') - .should('not.contain.text', 'q'); - - cy.get('#copy-paste-container p') - .should('not.contain.text', 'w'); - }); - it('Cut.', function() { writerHelper.selectAllTextOfDoc(); diff --git a/cypress_test/integration_tests/mobile/writer/undo_redo_spec.js b/cypress_test/integration_tests/mobile/writer/undo_redo_spec.js index 0fd3de2ed3..d83beab5c6 100644 --- a/cypress_test/integration_tests/mobile/writer/undo_redo_spec.js +++ b/cypress_test/integration_tests/mobile/writer/undo_redo_spec.js @@ -3,7 +3,7 @@ var helper = require('../../common/helper'); var mobileHelper = require('../../common/mobile_helper'); -describe.skip('Editing Operations', function() { +describe('Editing Operations', function() { var testFileName = 'undo_redo.odt'; beforeEach(function() { @@ -27,7 +27,7 @@ describe.skip('Editing Operations', function() { helper.selectAllText(); - helper.expectTextForClipboard('\nHello Worl'); + helper.expectTextForClipboard('\nHello \n'); } it('Undo', function() { @@ -56,13 +56,13 @@ describe.skip('Editing Operations', function() { cy.get('.leaflet-popup-content table').should('exist'); - cy.contains('.leaflet-popup-content table tbody tr','Typing: “d”') + cy.contains('.leaflet-popup-content table tbody tr','Typing: “World”') .click(); cy.get('.leaflet-popup-content > input').click(); helper.selectAllText(); - helper.expectTextForClipboard('\nHello Worl'); + helper.expectTextForClipboard('\nHello \n'); }); }); diff --git a/cypress_test/integration_tests/multiuser/writer/repair_document_spec.js b/cypress_test/integration_tests/multiuser/writer/repair_document_spec.js index 8821220616..a050d5445d 100644 --- a/cypress_test/integration_tests/multiuser/writer/repair_document_spec.js +++ b/cypress_test/integration_tests/multiuser/writer/repair_document_spec.js @@ -2,7 +2,7 @@ var helper = require('../../common/helper'); -describe.skip('Repair Document', function() { +describe('Repair Document', function() { var testFileName = 'repair_doc.odt'; beforeEach(function() { @@ -17,23 +17,29 @@ describe.skip('Repair Document', function() { cy.customGet('.leaflet-layer', frameId1).click(); - helper.typeIntoDocument('Hello', frameId1); + 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','Typing: “e”') + cy.iframe(frameId2).contains('.leaflet-popup-content table tbody tr','Typing: “World”') .dblclick(); - helper.expectTextForClipboard('\nH', frameId2); + cy.customGet('.leaflet-layer', frameId2).click(); + + cy.wait(500); + + helper.selectAllText(frameId2); + + helper.expectTextForClipboard('\nHello \n', frameId2); cy.customGet('.leaflet-layer', frameId1).click(); helper.selectAllText(frameId1); - helper.expectTextForClipboard('\nH', frameId1); + helper.expectTextForClipboard('\nHello \n', frameId1); } it('Repair by user-2', function() { |