Skip to content

Commit

Permalink
fix: update e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Pestov committed Sep 19, 2023
1 parent 265b6f8 commit f30f282
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/cypress/e2e/annotation.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('Annotation - Multiple Tabs', () => {
.get('.panels-target > .item:nth-child(4) .q-tab-panel .q-list .q-item')
.should('be.visible');
});

it('Should display first annotation tab', () => {
cy
.get('.panels-target > .item:nth-child(4) .q-tabs__content .q-tab')
Expand Down Expand Up @@ -157,11 +158,17 @@ describe('Annotation - Multiple Tabs', () => {
.should('have.length', 0);
});

it('Should scroll in text to highlighted annotation', () => {
it('Should scroll in text to highlighted annotation', { scrollBehavior: false }, () => {

// We scroll down the text panel first and select the first annotation
// because there is a problem with initial scrolling of text panel.
// Somehow it works when scroll programmatically like described above.
cy
.get('.panels-target > .item:nth-child(3) .content-view')
.scrollTo('bottom')
.get('.panels-target > .item:nth-child(4)')
.find('.q-tab-panel .q-list .q-item')
.last()
.first()
.click()
.get('#t_Mingana_ar_christ_93_84_MD1816225N1l5l3l5l5l47l3l2_1')
.should('be.visible');
Expand Down

0 comments on commit f30f282

Please sign in to comment.