fix/runner (#4965)
This commit is contained in:
parent
9535422361
commit
bd02205ef9
24
.github/workflows/build-docs.yml
vendored
24
.github/workflows/build-docs.yml
vendored
@ -80,31 +80,31 @@ jobs:
|
|||||||
echo "Artifact downloaded successfully."
|
echo "Artifact downloaded successfully."
|
||||||
|
|
||||||
- name: Install docs dependencies
|
- name: Install docs dependencies
|
||||||
run: cd packages/docs && bun install
|
run: cd platform/docs && bun install
|
||||||
|
|
||||||
- name: Copy coverage to docs static directory
|
- name: Copy coverage to docs static directory
|
||||||
run: |
|
run: |
|
||||||
# Copy files from the downloaded artifact directory
|
# Copy files from the downloaded artifact directory
|
||||||
mkdir -p packages/docs/static/coverage
|
mkdir -p platform/docs/static/coverage
|
||||||
cp -r ./coverage-artifact/* packages/docs/static/coverage/
|
cp -r ./coverage-artifact/* platform/docs/static/coverage/
|
||||||
# Copy specific asset files from the downloaded artifact root to static root
|
# Copy specific asset files from the downloaded artifact root to static root
|
||||||
cp ./coverage-artifact/base.css packages/docs/static/
|
cp ./coverage-artifact/base.css platform/docs/static/
|
||||||
cp ./coverage-artifact/block-navigation.js packages/docs/static/
|
cp ./coverage-artifact/block-navigation.js platform/docs/static/
|
||||||
cp ./coverage-artifact/prettify.css packages/docs/static/
|
cp ./coverage-artifact/prettify.css platform/docs/static/
|
||||||
cp ./coverage-artifact/prettify.js packages/docs/static/
|
cp ./coverage-artifact/prettify.js platform/docs/static/
|
||||||
cp ./coverage-artifact/favicon.png packages/docs/static/
|
cp ./coverage-artifact/favicon.png platform/docs/static/
|
||||||
cp ./coverage-artifact/sort-arrow-sprite.png packages/docs/static/
|
cp ./coverage-artifact/sort-arrow-sprite.png platform/docs/static/
|
||||||
cp ./coverage-artifact/sorter.js packages/docs/static/
|
cp ./coverage-artifact/sorter.js platform/docs/static/
|
||||||
|
|
||||||
- name: Build docs
|
- name: Build docs
|
||||||
run: cd packages/docs && bun run build:docs
|
run: cd platform/docs && bun run build:docs
|
||||||
|
|
||||||
- name: Install Netlify CLI
|
- name: Install Netlify CLI
|
||||||
run: bun add -g netlify-cli
|
run: bun add -g netlify-cli
|
||||||
|
|
||||||
- name: Deploy to Netlify
|
- name: Deploy to Netlify
|
||||||
run: |
|
run: |
|
||||||
cd packages/docs
|
cd platform/docs
|
||||||
netlify deploy --dir=build --prod
|
netlify deploy --dir=build --prod
|
||||||
env:
|
env:
|
||||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||||
|
|||||||
@ -1,102 +0,0 @@
|
|||||||
describe('OHIF MPR', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.checkStudyRouteInViewer('1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1');
|
|
||||||
cy.expectMinimumThumbnails(3);
|
|
||||||
cy.initCornerstoneToolsAliases();
|
|
||||||
cy.initCommonElementsAliases();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should not go MPR for non reconstructible displaySets', () => {
|
|
||||||
cy.get('[data-cy="MPR"]').should('have.class', 'cursor-not-allowed');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should go MPR for reconstructible displaySets and come back', () => {
|
|
||||||
cy.wait(250);
|
|
||||||
cy.get('[data-cy="study-browser-thumbnail"][data-series="4"]').dblclick();
|
|
||||||
cy.wait(250);
|
|
||||||
|
|
||||||
cy.get('[data-cy="MPR"]').click();
|
|
||||||
|
|
||||||
cy.get('.cornerstone-canvas').should('have.length', 3);
|
|
||||||
|
|
||||||
cy.get('[data-cy="MPR"]').click();
|
|
||||||
|
|
||||||
cy.get('.cornerstone-canvas').should('have.length', 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render correctly the MPR', () => {
|
|
||||||
cy.wait(250);
|
|
||||||
|
|
||||||
cy.get('[data-cy="study-browser-thumbnail"][data-series="4"]').dblclick();
|
|
||||||
cy.wait(250);
|
|
||||||
cy.get('[data-cy="MPR"]').click();
|
|
||||||
|
|
||||||
cy.get('.cornerstone-canvas').should('have.length', 3);
|
|
||||||
|
|
||||||
// check cornerstone to see if each has images
|
|
||||||
// we can later do visual testing to match the images with a baseline
|
|
||||||
cy.window()
|
|
||||||
.its('cornerstone')
|
|
||||||
.then(cornerstone => {
|
|
||||||
const viewports = cornerstone.getRenderingEngines()[0].getViewports();
|
|
||||||
// The stack viewport still exists after the changes to viewportId and inde
|
|
||||||
const imageData1 = viewports[0].getImageData();
|
|
||||||
const imageData2 = viewports[1].getImageData();
|
|
||||||
const imageData3 = viewports[2].getImageData();
|
|
||||||
|
|
||||||
// for some reason map doesn't work here
|
|
||||||
cy.wrap(imageData1).should('not.be', undefined);
|
|
||||||
cy.wrap(imageData2).should('not.be', undefined);
|
|
||||||
cy.wrap(imageData3).should('not.be', undefined);
|
|
||||||
|
|
||||||
cy.wrap(imageData1.dimensions).should('deep.equal', imageData2.dimensions);
|
|
||||||
|
|
||||||
cy.wrap(imageData1.origin).should('deep.equal', imageData2.origin);
|
|
||||||
});
|
|
||||||
|
|
||||||
cy.get('[data-cy="MPR"]').click();
|
|
||||||
|
|
||||||
cy.get('.cornerstone-canvas').should('have.length', 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should correctly render Crosshairs for MPR', () => {
|
|
||||||
cy.get('[data-cy="study-browser-thumbnail"][data-series="4"]').dblclick();
|
|
||||||
cy.get('[data-cy="MPR"]').click();
|
|
||||||
cy.get('[data-cy="Crosshairs"]').click();
|
|
||||||
|
|
||||||
cy.wait(250);
|
|
||||||
|
|
||||||
// check cornerstone to see if each has crosshairs
|
|
||||||
// we can later do visual testing to match the images with a baseline
|
|
||||||
cy.window()
|
|
||||||
.its('cornerstoneTools')
|
|
||||||
.then(cornerstoneTools => {
|
|
||||||
const state = cornerstoneTools.annotation.state.getAnnotationManager();
|
|
||||||
|
|
||||||
const fORMap = state.annotations;
|
|
||||||
const fOR = Object.keys(fORMap)[0];
|
|
||||||
const fORAnnotation = fORMap[fOR];
|
|
||||||
|
|
||||||
// it should have crosshairs as the only key (references lines make this 2)
|
|
||||||
expect(Object.keys(fORAnnotation)).to.have.length(2);
|
|
||||||
|
|
||||||
const crosshairs = fORAnnotation.Crosshairs;
|
|
||||||
|
|
||||||
// it should have three
|
|
||||||
expect(crosshairs).to.have.length(3);
|
|
||||||
|
|
||||||
expect(crosshairs[0].data.handles.toolCenter).to.deep.equal(
|
|
||||||
crosshairs[1].data.handles.toolCenter
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should activate window level when the active Crosshairs tool for MPR is clicked', () => {
|
|
||||||
cy.get('[data-cy="study-browser-thumbnail"][data-series="4"]').dblclick();
|
|
||||||
cy.get('[data-cy="MPR"]').click();
|
|
||||||
cy.get('[data-cy="Crosshairs"]').click();
|
|
||||||
|
|
||||||
// Click the crosshairs button to deactivate it.
|
|
||||||
cy.get('[data-cy="Crosshairs"]').click();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Loading…
Reference in New Issue
Block a user