test(improve-setup): sharding configuration, allow accessing cornerstone methods and events in tests, and add types (#4255)
This commit is contained in:
1 parent
2bcdb52db9
commit
c9cc372581
21 files changed
+113
-26
No files matched your search
@@ -2,5 +2,7 @@ import { visitStudy } from './visitStudy';
|
||||
import { checkForScreenshot } from './checkForScreenshot';
|
||||
import { screenShotPaths } from './screenShotPaths';
|
||||
import { simulateClicksOnElement } from './simulateClicksOnElement';
|
||||
import { reduce3DViewportSize } from './reduce3DviewportSize';
|
||||
|
||||
export { visitStudy, checkForScreenshot, screenShotPaths, simulateClicksOnElement };
|
||||
|
||||
export { visitStudy, checkForScreenshot, screenShotPaths, simulateClicksOnElement, reduce3DViewportSize };
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
export const reduce3DViewportSize = async (page: any) => {
|
||||
await page.evaluate(({ cornerstone }: AppTypes.Test) => {
|
||||
const enabledElement = cornerstone.getEnabledElements().filter(element => element.viewport.type === 'volume3d')[0]
|
||||
const { viewport } = enabledElement;
|
||||
viewport.setZoom(0.5);
|
||||
viewport.render()
|
||||
}, await page.evaluateHandle('window'));
|
||||
}
|
||||
Reference in new issue
Block a user