ohif-viewer/platform/viewer/cypress/integration/common/OHIFLoadLocalFile.spec.js
Mirna Silva 80f5b23622 test: 1316 - E2E tests for /local (#1379)
* 1316 - E2E tests for /local

* fix test title

* update yarn.lock

* Increased timeout for thumbnails

* Removing PDF file test from script-tag server

Co-authored-by: Danny Brown <danny.ri.brown@gmail.com>
2020-01-28 16:29:17 -05:00

32 lines
831 B
JavaScript

describe('OHIF Load Local File', () => {
beforeEach(() => {
cy.visit('/local');
});
it('checks if user can navigate to /local', () => {
cy.get('.drag-drop-contents').should(
'contain',
'Drag and Drop DICOM files here to load them in the Viewer'
);
});
it('loads an invalid file and verify if viewer is empty', () => {
const fileName = 'example.json';
cy.fixture(fileName).then(fileContent => {
cy.get('input[type=file]')
.first()
.upload({
fileContent,
fileName,
mimeType: 'application/json',
});
});
//Verify if there is no thumbnail visible
cy.expectMinimumThumbnails(0);
//Verify if DOC thumnails is displayed and load it on viewport
cy.get('[data-cy="thumbnail-list"]').should('not.exist');
});
});