chore(prettier): full repo linting and code reformatting once and for all (#3627)
This commit is contained in:
1 parent
01500a2d4c
commit
9045ddaedc
656 files changed
+21737
-20628
No files matched your search
+6
-12
@@ -1,8 +1,6 @@
|
||||
describe('OHIF Context Menu', function() {
|
||||
beforeEach(function() {
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
||||
);
|
||||
describe('OHIF Context Menu', function () {
|
||||
beforeEach(function () {
|
||||
cy.checkStudyRouteInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
|
||||
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.initCommonElementsAliases();
|
||||
@@ -10,7 +8,7 @@ describe('OHIF Context Menu', function() {
|
||||
cy.resetViewport().wait(50);
|
||||
});
|
||||
|
||||
it('checks context menu customization', function() {
|
||||
it('checks context menu customization', function () {
|
||||
// Add length measurement
|
||||
cy.addLengthMeasurement();
|
||||
cy.get('[data-cy="prompt-begin-tracking-yes-btn"]').click();
|
||||
@@ -29,14 +27,10 @@ describe('OHIF Context Menu', function() {
|
||||
cy.get('[data-cy="context-menu"]').should('be.visible');
|
||||
|
||||
// Click "Finding" subMenu
|
||||
cy.get('[data-cy="context-menu-item"]')
|
||||
.contains('Finding')
|
||||
.click();
|
||||
cy.get('[data-cy="context-menu-item"]').contains('Finding').click();
|
||||
|
||||
// Click "Finding" subMenu
|
||||
cy.get('[data-cy="context-menu-item"]')
|
||||
.contains('Aortic insufficiency')
|
||||
.click();
|
||||
cy.get('[data-cy="context-menu-item"]').contains('Aortic insufficiency').click();
|
||||
cy.get('[data-cy="measurement-item"]').contains('Aortic insufficiency');
|
||||
});
|
||||
});
|
||||
+2
-6
@@ -1,17 +1,13 @@
|
||||
describe('OHIF Cornerstone Hotkeys', () => {
|
||||
beforeEach(() => {
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
||||
);
|
||||
cy.checkStudyRouteInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
|
||||
|
||||
cy.window()
|
||||
.its('cornerstone')
|
||||
.then(cornerstone => {
|
||||
// For debugging issues where tests pass locally but fail on CI
|
||||
// - Sometimes Cypress orb seems to use CPU rendering pathway
|
||||
cy.log(
|
||||
`Cornerstone using CPU Rendering?: ${cornerstone.getShouldUseCPURendering()}`
|
||||
);
|
||||
cy.log(`Cornerstone using CPU Rendering?: ${cornerstone.getShouldUseCPURendering()}`);
|
||||
});
|
||||
|
||||
cy.expectMinimumThumbnails(3);
|
||||
|
||||
+4
-12
@@ -1,15 +1,11 @@
|
||||
describe('OHIF Cornerstone Toolbar', () => {
|
||||
beforeEach(() => {
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
||||
);
|
||||
cy.checkStudyRouteInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.initCornerstoneToolsAliases();
|
||||
cy.initCommonElementsAliases();
|
||||
|
||||
cy.get('[data-cy="study-browser-thumbnail"]')
|
||||
.eq(1)
|
||||
.click();
|
||||
cy.get('[data-cy="study-browser-thumbnail"]').eq(1).click();
|
||||
|
||||
//const expectedText = 'Ser: 1';
|
||||
//cy.get('@viewportInfoBottomLeft').should('contains.text', expectedText);
|
||||
@@ -89,9 +85,7 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
// The exact text is slightly dependent on the viewport resolution, so leave a range
|
||||
cy.get('@viewportInfoTopLeft').should($txt => {
|
||||
const text = $txt.text();
|
||||
expect(text)
|
||||
.to.include('W:193')
|
||||
.include('L:479');
|
||||
expect(text).to.include('W:193').include('L:479');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -119,9 +113,7 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
//Verify the measurement exists in the table
|
||||
cy.get('@measurementsPanel').should('be.visible');
|
||||
|
||||
cy.get('[data-cy="measurement-item"]')
|
||||
.its('length')
|
||||
.should('be.at.least', 1);
|
||||
cy.get('[data-cy="measurement-item"]').its('length').should('be.at.least', 1);
|
||||
});
|
||||
|
||||
/*it('checks if angle annotation can be added on viewport without causing any errors', () => {
|
||||
|
||||
+4
-10
@@ -1,13 +1,11 @@
|
||||
describe('OHIF Download Snapshot File', () => {
|
||||
beforeEach(() => {
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
||||
);
|
||||
cy.checkStudyRouteInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.openDownloadImageModal();
|
||||
});
|
||||
|
||||
it('checks displayed information for Desktop experience', function() {
|
||||
it('checks displayed information for Desktop experience', function () {
|
||||
// Set Desktop resolution
|
||||
// cy.viewport(1750, 720);
|
||||
// Visual comparison
|
||||
@@ -36,12 +34,8 @@ describe('OHIF Download Snapshot File', () => {
|
||||
// .and('include', 'data:image');
|
||||
|
||||
// Check buttons
|
||||
cy.get('[data-cy="cancel-btn"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible');
|
||||
cy.get('[data-cy="download-btn"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible');
|
||||
cy.get('[data-cy="cancel-btn"]').scrollIntoView().should('be.visible');
|
||||
cy.get('[data-cy="download-btn"]').scrollIntoView().should('be.visible');
|
||||
});
|
||||
|
||||
/*it('cancel changes on download modal', function() {
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
describe('OHIF Study Viewer Page', function() {
|
||||
beforeEach(function() {
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
||||
);
|
||||
describe('OHIF Study Viewer Page', function () {
|
||||
beforeEach(function () {
|
||||
cy.checkStudyRouteInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
|
||||
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.initCommonElementsAliases();
|
||||
cy.initCornerstoneToolsAliases();
|
||||
});
|
||||
|
||||
it('scrolls series stack using scrollbar', function() {
|
||||
it('scrolls series stack using scrollbar', function () {
|
||||
cy.scrollToIndex(13);
|
||||
|
||||
cy.get('@viewportInfoTopRight').should('contains.text', '14');
|
||||
});
|
||||
|
||||
it('performs right click to zoom', function() {
|
||||
it('performs right click to zoom', function () {
|
||||
// This is not used to activate the tool, it is used to ensure the
|
||||
// top left viewport info shows the zoom values (it only shows up
|
||||
// when the zoom tool is active)
|
||||
@@ -25,11 +23,9 @@ describe('OHIF Study Viewer Page', function() {
|
||||
cy.wrap($zoomBtn).should('have.class', 'active');
|
||||
});
|
||||
|
||||
const zoomLevelInitial = cy
|
||||
.get('@viewportInfoTopLeft')
|
||||
.then($viewportInfo => {
|
||||
return $viewportInfo.text().substring(6, 9);
|
||||
});
|
||||
const zoomLevelInitial = cy.get('@viewportInfoTopLeft').then($viewportInfo => {
|
||||
return $viewportInfo.text().substring(6, 9);
|
||||
});
|
||||
|
||||
//Right click on viewport
|
||||
cy.get('@viewport')
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
describe('OHIF Measurement Panel', function() {
|
||||
beforeEach(function() {
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
||||
);
|
||||
describe('OHIF Measurement Panel', function () {
|
||||
beforeEach(function () {
|
||||
cy.checkStudyRouteInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
|
||||
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.initCommonElementsAliases();
|
||||
@@ -11,7 +9,7 @@ describe('OHIF Measurement Panel', function() {
|
||||
cy.waitDicomImage();
|
||||
});
|
||||
|
||||
it('checks if Measurements right panel can be hidden/displayed', function() {
|
||||
it('checks if Measurements right panel can be hidden/displayed', function () {
|
||||
cy.get('@measurementsPanel').should('exist');
|
||||
cy.get('@measurementsPanel').should('be.visible');
|
||||
|
||||
@@ -23,7 +21,7 @@ describe('OHIF Measurement Panel', function() {
|
||||
cy.get('@measurementsPanel').should('be.visible');
|
||||
});
|
||||
|
||||
it('checks if measurement item can be Relabeled under Measurements panel', function() {
|
||||
it('checks if measurement item can be Relabeled under Measurements panel', function () {
|
||||
// Add length measurement
|
||||
cy.addLengthMeasurement();
|
||||
cy.get('[data-cy="viewport-notification"]').should('exist');
|
||||
@@ -31,9 +29,7 @@ describe('OHIF Measurement Panel', function() {
|
||||
cy.get('[data-cy="prompt-begin-tracking-yes-btn"]').click();
|
||||
cy.get('[data-cy="measurement-item"]').click();
|
||||
|
||||
cy.get('[data-cy="measurement-item"]')
|
||||
.find('svg')
|
||||
.click();
|
||||
cy.get('[data-cy="measurement-item"]').find('svg').click();
|
||||
|
||||
// enter Bone label
|
||||
cy.get('[data-cy="input-annotation"]').should('exist');
|
||||
@@ -44,7 +40,7 @@ describe('OHIF Measurement Panel', function() {
|
||||
cy.get('[data-cy="measurement-item"]').should('contain.text', 'Bone');
|
||||
});
|
||||
|
||||
it('checks if image would jump when clicked on a measurement item', function() {
|
||||
it('checks if image would jump when clicked on a measurement item', function () {
|
||||
// Add length measurement
|
||||
cy.addLengthMeasurement();
|
||||
cy.get('[data-cy="prompt-begin-tracking-yes-btn"]').click();
|
||||
@@ -56,9 +52,7 @@ describe('OHIF Measurement Panel', function() {
|
||||
cy.get('@viewportInfoTopRight').should('contains.text', '(14/');
|
||||
|
||||
// Click on first measurement item
|
||||
cy.get('[data-cy="measurement-item"]')
|
||||
.eq(0)
|
||||
.click();
|
||||
cy.get('[data-cy="measurement-item"]').eq(0).click();
|
||||
|
||||
cy.get('@viewportInfoTopRight').should('contains.text', '(1/');
|
||||
cy.get('@viewportInfoTopRight').should('not.contains.text', '(14/');
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
describe('OHIF Study Viewer Page', function() {
|
||||
beforeEach(function() {
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
||||
);
|
||||
describe('OHIF Study Viewer Page', function () {
|
||||
beforeEach(function () {
|
||||
cy.checkStudyRouteInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
|
||||
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.initCommonElementsAliases();
|
||||
@@ -10,13 +8,11 @@ describe('OHIF Study Viewer Page', function() {
|
||||
cy.resetViewport().wait(50);
|
||||
});
|
||||
|
||||
it('checks if series thumbnails are being displayed', function() {
|
||||
cy.get('[data-cy="study-browser-thumbnail"]')
|
||||
.its('length')
|
||||
.should('be.gt', 1);
|
||||
it('checks if series thumbnails are being displayed', function () {
|
||||
cy.get('[data-cy="study-browser-thumbnail"]').its('length').should('be.gt', 1);
|
||||
});
|
||||
|
||||
it('drags and drop a series thumbnail into viewport', function() {
|
||||
it('drags and drop a series thumbnail into viewport', function () {
|
||||
// Can't use the native drag version as the element should be rerendered
|
||||
// cy.get('[data-cy="study-browser-thumbnail"]:nth-child(2)') //element to be dragged
|
||||
// .drag('.cornerstone-canvas'); //dropzone element
|
||||
@@ -38,7 +34,7 @@ describe('OHIF Study Viewer Page', function() {
|
||||
//cy.get('@viewportInfoBottomLeft').should('contain.text', expectedText);
|
||||
});
|
||||
|
||||
it('checks if Series left panel can be hidden/displayed', function() {
|
||||
it('checks if Series left panel can be hidden/displayed', function () {
|
||||
cy.get('@seriesPanel').should('exist');
|
||||
cy.get('@seriesPanel').should('be.visible');
|
||||
|
||||
|
||||
Reference in new issue
Block a user