Skip to content

Commit 0046885

Browse files
test: add test for selected comment on scroll
When scrolling, the selected comment should get unselected. Signed-off-by: Sahil Gautam <sahil.gautam@collabora.com> Change-Id: Id2c290fc67856c80cc5d9c359885ead3090fee6c
1 parent 925b9dd commit 0046885

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

cypress_test/integration_tests/desktop/writer/annotation_spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,4 +818,14 @@ describe(['tagdesktop'], 'Annotation with @mention', function() {
818818
cy.cGet('#mentionPopup').should('not.exist');
819819
cy.cGet('#annotation-modify-textarea-new').should('have.focus');
820820
});
821+
822+
it('Unselect comment on scroll', function() {
823+
desktopHelper.insertComment('test comment');
824+
cy.cGet('#comment-container-1').should('exist');
825+
cy.cGet('#comment-container-1').should('exist').should('not.have.class', 'annotation-active');
826+
cy.cGet('#comment-container-1').click();
827+
cy.cGet('#comment-container-1').should('exist').should('have.class', 'annotation-active');
828+
cy.getFrameWindow().then(function(win) { win.app.sectionContainer.getSectionWithName('scroll').scrollVerticalWithOffset(10); });
829+
cy.cGet('#comment-container-1').should('exist').should('not.have.class', 'annotation-active');
830+
})
821831
});

0 commit comments

Comments
 (0)