* TEST E2E: Drag and drop thumbnail into viewport * TEST E2E: Drag and drop thumbnail into viewport * fix: add pollyfill to script-tag template * Add wait's to command * Try to store artifacts * ci: updated artifact location * Changing Patient to MisterMR * Refactors based on PR comments * Adding new sub-folders to separate the testing scripts according to context/features * Adding test cases for Side Panels Measurements and Series * Removing duplicated file OHIFStudyViewer.spec.js
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
import { DragSimulator } from "../helpers/DragSimulator.js";
|
|
|
|
// ***********************************************
|
|
// This example commands.js shows you how to
|
|
// create various custom commands and overwrite
|
|
// existing commands.
|
|
//
|
|
// For more comprehensive examples of custom
|
|
// commands please read more here:
|
|
// https://on.cypress.io/custom-commands
|
|
// ***********************************************
|
|
//
|
|
//
|
|
// -- This is a parent command --
|
|
// Cypress.Commands.add("login", (email, password) => { ... })
|
|
//
|
|
//
|
|
// -- This is a child command --
|
|
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
|
//
|
|
//
|
|
// -- This is a dual command --
|
|
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
//
|
|
//
|
|
// -- This is will overwrite an existing command --
|
|
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
|
|
|
Cypress.Commands.add('openStudy', (patientName) => {
|
|
cy.visit('/');
|
|
cy.get('#patientName')
|
|
.type(patientName);
|
|
cy.get('.studylistStudy > .patientName')
|
|
.contains(patientName)
|
|
.click();
|
|
}
|
|
);
|
|
|
|
Cypress.Commands.add('drag', {prevSubject: 'element',},
|
|
(...args) => DragSimulator.simulate(...args)
|
|
);
|