ohif-viewer/platform/viewer/cypress/integration/pwa/OHIFLoadLocalPDFFile.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

30 lines
776 B
JavaScript

describe('OHIF Load Local PDF File', () => {
beforeEach(() => {
cy.visit('/local');
});
it('loads a PDF DICOM file and visualize it', () => {
const fileName = 'PDFDICOMfile.pdf';
cy.fixture(fileName).then(fileContent => {
cy.get('input[type=file]')
.first()
.upload({
fileContent,
fileName,
mimeType: 'application/pdf',
});
});
//Verify if 1 thumbnail is visible
cy.expectMinimumThumbnails(1);
//Verify if DOC thumnails is displayed and load it on viewport
cy.get('[data-cy="thumbnail-list"]')
.contains('DOC')
.click({ force: true });
//Verify if PDF document is displayed on the viewport
cy.get('#pdf-canvas-container').should('be.visible');
});
});