test: Visual testing for Cornerstone and VTK (#1169)

* Visual testing for Cornerstone and VTK

* Fix for CI

* Review fix: Removed cornerstone function and added snapshot description

* Added snapshot description

* Fix for CI
This commit is contained in:
Mirna Silva authored and Danny Brown committed 2019-11-13 21:36:19 -05:00
1 parent d8055e458f
commit 79c10bb424
8 files changed
+207 -70

No files matched your search

@@ -90,6 +90,18 @@ Cypress.Commands.add('waitStudyList', () => {
});
});
Cypress.Commands.add('waitVTKReformatting', () => {
// Wait for start reformatting
cy.get('[data-cy="viewprt-grid"]', { timeout: 10000 }).should($grid => {
expect($grid).to.contain.text('Reform');
});
// Wait for finish reformatting
cy.get('[data-cy="viewprt-grid"]', { timeout: 30000 }).should($grid => {
expect($grid).not.to.contain.text('Reform');
});
});
/**
* Command to perform a drag and drop action. Before using this command, we must get the element that should be dragged first.
* Example of usage: cy.get(element-to-be-dragged).drag(dropzone-element)