-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #560 from PaulHax/layer-fix
Fix adding DICOM dataset as layer
- Loading branch information
Showing
10 changed files
with
134 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { volViewPage } from '../pageobjects/volview.page'; | ||
import { openUrls } from './utils'; | ||
|
||
describe('Add Layer button', () => { | ||
it('should create overlay with 2 DICOM images', async () => { | ||
await openUrls([ | ||
{ | ||
url: 'https://data.kitware.com/api/v1/item/63527c7311dab8142820a338/download', | ||
name: 'prostate.zip', | ||
}, | ||
{ | ||
url: 'https://data.kitware.com/api/v1/item/6352a2b311dab8142820a33b/download', | ||
name: 'MRA-Head_and_Neck.zip', | ||
}, | ||
]); | ||
|
||
// Wait for both volumes to appear in list | ||
await browser.waitUntil( | ||
async () => { | ||
const menus = await volViewPage.datasetMenuButtons; | ||
return menus.length >= 2; | ||
}, | ||
{ | ||
timeout: 30000, | ||
timeoutMsg: `Expected 2 volumes to appear in list`, | ||
} | ||
); | ||
|
||
const menus = await volViewPage.datasetMenuButtons; | ||
await menus[0].click(); | ||
await browser.waitUntil( | ||
async () => { | ||
const addLayerButton = await $( | ||
'div[data-testid="dataset-menu-layer-item"]' | ||
); | ||
return addLayerButton.isClickable(); | ||
}, | ||
{ timeoutMsg: 'Expected clickable Add Layer button' } | ||
); | ||
|
||
const addLayerButton = await $( | ||
'div[data-testid="dataset-menu-layer-item"]' | ||
); | ||
await addLayerButton.click(); | ||
|
||
const renderTab = await volViewPage.renderingModuleTab; | ||
await renderTab.click(); | ||
|
||
// need to wait a little for layer section to render | ||
await browser.waitUntil( | ||
async function slidersExist() { | ||
const layerOpacitySliders = await volViewPage.layerOpacitySliders; | ||
return layerOpacitySliders.length > 0; | ||
}, | ||
{ | ||
timeoutMsg: `Expected at least one layer opacity slider`, | ||
} | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters