diff options
author | Gökay Şatır <gokaysatir@gmail.com> | 2023-05-11 14:16:48 +0300 |
---|---|---|
committer | Gökay ŞATIR <gokaysatir@gmail.com> | 2023-05-11 19:09:03 +0300 |
commit | a2838cca3a9246e068ed3875576f7c9ec7edccb2 (patch) | |
tree | c763fb554ba36c1a7decbdb30602f55a8e922620 /cypress_test/integration_tests/desktop | |
parent | jsdialog: show expander content (diff) | |
download | online-a2838cca3a9246e068ed3875576f7c9ec7edccb2.tar.gz online-a2838cca3a9246e068ed3875576f7c9ec7edccb2.zip |
Enable desktop writer annotation tests.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I5ee91f32da271b5fdb209262f52a6828aa248500
Diffstat (limited to 'cypress_test/integration_tests/desktop')
-rw-r--r-- | cypress_test/integration_tests/desktop/writer/annotation_spec.js | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/cypress_test/integration_tests/desktop/writer/annotation_spec.js b/cypress_test/integration_tests/desktop/writer/annotation_spec.js index db2a7c79e9..db76d8fb9e 100644 --- a/cypress_test/integration_tests/desktop/writer/annotation_spec.js +++ b/cypress_test/integration_tests/desktop/writer/annotation_spec.js @@ -1,23 +1,18 @@ -/* global describe it Cypress cy require afterEach beforeEach */ +/* global describe it cy require afterEach beforeEach */ var helper = require('../../common/helper'); -var { insertMultipleComment, hideSidebar, selectZoomLevel } = require('../../common/desktop_helper'); +var { insertMultipleComment, selectZoomLevel } = require('../../common/desktop_helper'); +var desktopHelper = require('../../common/desktop_helper'); -describe.skip(['tagnotebookbar'], 'Annotation Tests', function() { +describe(['tagdesktop'], 'Annotation Tests', function() { var origTestFileName = 'annotation.odt'; var testFileName; beforeEach(function() { cy.viewport(1400, 600); testFileName = helper.beforeAll(origTestFileName, 'writer'); - var mode = Cypress.env('USER_INTERFACE'); - if (mode === 'notebookbar') { - cy.cGet('.unospan-optionstoolboxdown.unoSidebar').should('have.class', 'selected'); - cy.cGet('.unospan-optionstoolboxdown.unoSidebar').click(); - cy.cGet('.unospan-optionstoolboxdown.unoSidebar').should('not.have.class', 'selected'); - } else { - hideSidebar(); - } + desktopHelper.switchUIToNotebookbar(); + cy.cGet('[id="SidebarDeck.PropertyDeck"]').click(); // Hide sidebar. selectZoomLevel('50'); }); @@ -25,15 +20,15 @@ describe.skip(['tagnotebookbar'], 'Annotation Tests', function() { helper.afterAll(testFileName, this.currentTest.state); }); - it('Insert',function() { - insertMultipleComment('writer'); + it('Insert', function() { + insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]'); cy.cGet('.cool-annotation-content-wrapper').should('exist'); cy.cGet('#annotation-content-area-1').should('contain','some text0'); }); - it('Modify',function() { - insertMultipleComment('writer'); + it('Modify', function() { + insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]'); cy.cGet('.cool-annotation-content-wrapper').should('exist'); cy.cGet('#annotation-content-area-1').should('contain','some text0'); @@ -45,8 +40,8 @@ describe.skip(['tagnotebookbar'], 'Annotation Tests', function() { cy.cGet('#annotation-content-area-1').should('contain','some other text, some text0'); }); - it('Reply',function() { - insertMultipleComment('writer'); + it('Reply', function() { + insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]'); cy.cGet('.cool-annotation-content-wrapper').should('exist'); cy.cGet('#annotation-content-area-1').should('contain','some text'); @@ -57,8 +52,8 @@ describe.skip(['tagnotebookbar'], 'Annotation Tests', function() { cy.cGet('#annotation-content-area-2').should('contain','some reply text'); }); - it('Remove',function() { - insertMultipleComment('writer'); + it('Remove', function() { + insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]'); cy.cGet('.cool-annotation-content-wrapper').should('exist'); cy.cGet('.cool-annotation-content > div').should('contain','some text'); @@ -69,26 +64,28 @@ describe.skip(['tagnotebookbar'], 'Annotation Tests', function() { }); -describe.skip(['tagnotebookbar'], 'Collapsed Annotation Tests', function() { +describe(['tagdesktop'], 'Collapsed Annotation Tests', function() { var testFileName = 'annotation.odt'; beforeEach(function() { helper.beforeAll(testFileName, 'writer'); + desktopHelper.switchUIToNotebookbar(); + cy.cGet('[id="SidebarDeck.PropertyDeck"]').click(); // Hide sidebar. }); afterEach(function() { helper.afterAll(testFileName, this.currentTest.state); }); - it('Insert',function() { - insertMultipleComment('writer', 1, false); + it('Insert', function() { + insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]'); cy.cGet('.cool-annotation-content-wrapper').should('exist'); cy.cGet('#annotation-content-area-1').should('contain','some text0'); }); - it('Modify',function() { - insertMultipleComment('writer', 1, false); + it('Modify', function() { + insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]'); cy.cGet('.cool-annotation-content-wrapper').should('exist'); cy.cGet('#annotation-content-area-1').should('contain','some text0'); @@ -101,8 +98,8 @@ describe.skip(['tagnotebookbar'], 'Collapsed Annotation Tests', function() { cy.cGet('#annotation-content-area-1').should('contain','some other text, some text0'); }); - it('Reply',function() { - insertMultipleComment('writer', 1, false); + it('Reply', function() { + insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]'); cy.cGet('.cool-annotation-content-wrapper').should('exist'); cy.cGet('#annotation-content-area-1').should('contain','some text'); @@ -114,8 +111,8 @@ describe.skip(['tagnotebookbar'], 'Collapsed Annotation Tests', function() { cy.cGet('#annotation-content-area-2').should('contain','some reply text'); }); - it('Remove',function() { - insertMultipleComment('writer', 1, false); + it('Remove', function() { + insertMultipleComment('writer', 1, false, '[id=InsertAnnotation1]'); cy.cGet('.cool-annotation-content-wrapper').should('exist'); cy.cGet('.cool-annotation-content > div').should('contain','some text'); |