test: E2E Intermittent Failures (#1071)

This commit is contained in:
Rodrigo Antinarelli 2019-10-22 22:04:07 -03:00 committed by Danny Brown
parent cefa480979
commit 5cc78c867f
2 changed files with 12 additions and 12 deletions

View File

@ -57,12 +57,11 @@ describe('OHIF Cornerstone Toolbar', () => {
//drags the mouse inside the viewport to be able to interact with series
cy.get('@viewport')
.trigger('mousedown', 'top', { which: 1 })
.trigger('mousemove', 'center', { which: 1 })
.trigger('mousedown', 'center', { which: 1 })
.trigger('mousemove', 'top', { which: 1 })
.trigger('mouseup');
const expectedText =
'Ser: 1Img: 14 14/26256 x 256Loc: 0.00 mm Thick: 5.00 mm';
'Ser: 1Img: 1 1/26256 x 256Loc: -30.00 mm Thick: 5.00 mm';
cy.get('@viewportInfoBottomLeft').should('have.text', expectedText);
});
@ -76,11 +75,11 @@ describe('OHIF Cornerstone Toolbar', () => {
//drags the mouse inside the viewport to be able to interact with series
cy.get('@viewport')
.trigger('mousedown', 'top', { which: 1 })
.trigger('mousemove', 'center', { which: 1 })
.trigger('mousedown', 'center', { which: 1 })
.trigger('mousemove', 'top', { which: 1 })
.trigger('mouseup');
const expectedText = 'Zoom: 884%W: 820 L: 410Lossless / Uncompressed';
const expectedText = 'Zoom: 50%W: 958 L: 479Lossless / Uncompressed';
cy.get('@viewportInfoBottomRight').should('have.text', expectedText);
});
@ -94,14 +93,14 @@ describe('OHIF Cornerstone Toolbar', () => {
//drags the mouse inside the viewport to be able to interact with series
cy.get('@viewport')
.trigger('mousedown', 'top', { which: 1 })
.trigger('mousemove', 'center', { which: 1 })
.trigger('mousedown', 'center', { which: 1 })
.trigger('mousemove', 'top', { which: 1 })
.trigger('mouseup')
.trigger('mousedown', 'center', { which: 1 })
.trigger('mousemove', 'left', { which: 1 })
.trigger('mouseup');
const expectedText = 'Zoom: 211%W: 544 L: 626Lossless / Uncompressed';
const expectedText = 'Zoom: 211%W: 635 L: 226Lossless / Uncompressed';
cy.get('@viewportInfoBottomRight').should('have.text', expectedText);
});
@ -197,7 +196,7 @@ describe('OHIF Cornerstone Toolbar', () => {
//Click on reset button
cy.get('@resetBtn').click();
const expectedText = 'Zoom: 211%W: 820 L: 410Lossless / Uncompressed';
const expectedText = 'Zoom: 211%W: 958 L: 479Lossless / Uncompressed';
cy.get('@viewportInfoBottomRight').should('have.text', expectedText);
});

View File

@ -44,7 +44,8 @@ Cypress.Commands.add('openStudy', patientName => {
cy.wait('@getStudies');
cy.get('#studyListData .studylistStudy', { timeout: 5000 })
.contains(patientName)
.first().click();
.first()
.click({ force: true });
});
/**