Skip to content

Commit

Permalink
cypress: added test for tab navigation for comment button
Browse files Browse the repository at this point in the history
Signed-off-by: Pranam Lashkari <[email protected]>
Change-Id: If756aa4b8fa369b13b32aad67b56faee86424ffe
  • Loading branch information
lpranam authored and eszkadev committed Jan 27, 2025
1 parent 3e83753 commit 8141832
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ test/samples/writer-edit.fodt
test/samples/impress-edit.fodp
test/samples/draw-edit.odg
test/samples/calc-edit.ods
cypress_test/test/data/presets/user/browsersetting.json
test/fakesockettest
test/unithttplib
test/*.csv
Expand Down
16 changes: 16 additions & 0 deletions cypress_test/integration_tests/desktop/calc/annotation_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,22 @@ describe(['tagdesktop'], 'Annotation Tests', function() {
calcHelper.assertNumberofSheets(2);
cy.cGet('#comment-container-1').should('not.exist');
});

it('Tab Nevigation', function() {
desktopHelper.insertComment(undefined, false);

cy.cGet('.cool-annotation-autosavelabel').should('be.not.visible');
cy.realPress('Tab');
cy.cGet('.cool-annotation-autosavelabel').should('be.not.visible');
cy.cGet('#annotation-cancel-new:focus-visible');

cy.realPress('Tab');
cy.cGet('#annotation-save-new:focus-visible');
cy.cGet('.cool-annotation-autosavelabel').should('be.not.visible');

cy.realPress('Tab');
cy.cGet('.cool-annotation-autosavelabel').should('be.visible');
});
});

describe(['tagdesktop'], 'Annotation Autosave Tests', function() {
Expand Down
16 changes: 16 additions & 0 deletions cypress_test/integration_tests/desktop/impress/annotation_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ describe(['tagdesktop'], 'Annotation Tests', function() {
cy.cGet('#annotation-reply-1').click();
cy.cGet('.cool-annotation-content > div').should('include.text','some reply text');
});

it('Tab Nevigation', function() {
desktopHelper.insertComment(undefined, false);

cy.cGet('.cool-annotation-autosavelabel').should('be.not.visible');
cy.realPress('Tab');
cy.cGet('.cool-annotation-autosavelabel').should('be.not.visible');
cy.cGet('#annotation-cancel-new:focus-visible');

cy.realPress('Tab');
cy.cGet('#annotation-save-new:focus-visible');
cy.cGet('.cool-annotation-autosavelabel').should('be.not.visible');

cy.realPress('Tab');
cy.cGet('.cool-annotation-autosavelabel').should('be.visible');
});
});

describe(['tagdesktop'], 'Collapsed Annotation Tests', function() {
Expand Down
16 changes: 16 additions & 0 deletions cypress_test/integration_tests/desktop/writer/annotation_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ describe(['tagdesktop'], 'Annotation Tests', function() {
cy.cGet('.cool-annotation-content-wrapper').should('not.exist');
});

it('Tab Nevigation', function() {
desktopHelper.insertComment(undefined, false);

cy.cGet('.cool-annotation-autosavelabel').should('be.not.visible');
cy.realPress('Tab');
cy.cGet('.cool-annotation-autosavelabel').should('be.not.visible');
cy.cGet('#annotation-cancel-new:focus-visible');

cy.realPress('Tab');
cy.cGet('#annotation-save-new:focus-visible');
cy.cGet('.cool-annotation-autosavelabel').should('be.not.visible');

cy.realPress('Tab');
cy.cGet('.cool-annotation-autosavelabel').should('be.visible');
});

});

describe(['tagdesktop'], 'Collapsed Annotation Tests', function() {
Expand Down

0 comments on commit 8141832

Please sign in to comment.