test: Refactoring toolbar data-cy selectors (#1323)
This commit is contained in:
1 parent
e1142910e4
commit
d6d92afbda
6 files changed
+44
-55
No files matched your search
@@ -209,7 +209,7 @@ Cypress.Commands.add('waitDicomImage', (timeout = 20000) => {
|
||||
//Command to reset and clear all the changes made to the viewport
|
||||
Cypress.Commands.add('resetViewport', () => {
|
||||
//Click on More button
|
||||
cy.get('.expandableToolMenu')
|
||||
cy.get('[data-cy="more"]')
|
||||
.as('moreBtn')
|
||||
.click();
|
||||
//Verify if overlay is displayed
|
||||
@@ -219,11 +219,11 @@ Cypress.Commands.add('resetViewport', () => {
|
||||
}
|
||||
});
|
||||
//Click on Clear button
|
||||
cy.get('.tooltip-inner > :nth-child(10)')
|
||||
cy.get('[data-cy="clear"]')
|
||||
.as('clearBtn')
|
||||
.click();
|
||||
//Click on Reset button
|
||||
cy.get('.ToolbarRow > :nth-child(9)')
|
||||
cy.get('[data-cy="reset"]')
|
||||
.as('resetBtn')
|
||||
.click();
|
||||
});
|
||||
@@ -284,9 +284,8 @@ Cypress.Commands.add('initStudyListAliasesOnTablet', () => {
|
||||
Cypress.Commands.add(
|
||||
'addLengthMeasurement',
|
||||
(firstClick = [150, 100], secondClick = [130, 170]) => {
|
||||
cy.initCornerstoneToolsAliases();
|
||||
cy.get('@lengthBtn').click();
|
||||
cy.addLine('@viewport', firstClick, secondClick);
|
||||
cy.get('[data-cy="length"]').click();
|
||||
cy.addLine('.viewport-element', firstClick, secondClick);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -294,9 +293,8 @@ Cypress.Commands.add(
|
||||
Cypress.Commands.add(
|
||||
'addAngleMeasurement',
|
||||
(initPos = [180, 390], midPos = [300, 410], finalPos = [180, 450]) => {
|
||||
cy.initCornerstoneToolsAliases();
|
||||
cy.get('@angleBtn').click();
|
||||
cy.addAngle('@viewport', initPos, midPos, finalPos);
|
||||
cy.get('[data-cy="angle"]').click();
|
||||
cy.addAngle('.viewport-element', initPos, midPos, finalPos);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -369,7 +367,7 @@ Cypress.Commands.add('percyCanvasSnapshot', (name, options = {}) => {
|
||||
});
|
||||
|
||||
Cypress.Commands.add('setLayout', (columns = 1, rows = 1) => {
|
||||
cy.get('.btn-group > .toolbar-button').click();
|
||||
cy.get('[data-cy="layout"]').click();
|
||||
|
||||
cy.get('.layoutChooser')
|
||||
.find('tr')
|
||||
@@ -471,12 +469,12 @@ Cypress.Commands.add(
|
||||
|
||||
Cypress.Commands.add('openDownloadImageModal', () => {
|
||||
// Click on More button
|
||||
cy.get('.expandableToolMenu')
|
||||
cy.get('[data-cy="more"]')
|
||||
.as('moreBtn')
|
||||
.click();
|
||||
|
||||
// Click on Download button
|
||||
cy.get('.tooltip-inner > :nth-child(13)')
|
||||
cy.get('[data-cy="download"]')
|
||||
.as('downloadBtn')
|
||||
.click();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user