ohif-viewer/cypress/integration/ViewerRouting.spec.js
João Felipe de Medeiros Moreira 612832069d ci: add e2e tests with cypress
* Creates E2E tests using Cypress and includes two tests

* Improves yarn.lock file

* Includes documentation

* Cypress project id

* test e2e w/ ci and video

* run unit command before e2e

* Also cache cypress

* Persist cypress to next build step

* Try a different path

* Try without working dir

* Persist less data, but restore yarn/cypress cache in next step

* Install cypress to invalidate cache

* Add e2e as a blocker for merged publishing
2019-06-22 10:02:07 -04:00

23 lines
709 B
JavaScript

describe('ViewerRouting', () => {
beforeEach(() => {
cy.visit('/');
cy.contains('Study List');
cy.get('#studyListData > :nth-child(1) > .patientId').click();
});
it('thumbnails list has more than 2 items', () => {
cy.get('.scrollable-study-thumbnails div.ThumbnailEntryContainer')
.its('length')
.should('be.gte', 2);
});
it('loads route with at least 2 thumbnails', () => {
cy.get(
':nth-child(1) > .ThumbnailEntry > .p-x-1 > .ImageThumbnail > .image-thumbnail-canvas > canvas'
).should('be.visible');
cy.get(
':nth-child(2) > .ThumbnailEntry > .p-x-1 > .ImageThumbnail > .image-thumbnail-canvas > canvas'
).should('be.visible');
});
});