test(improve-setup): sharding configuration, allow accessing cornerstone methods and events in tests, and add types (#4255)

This commit is contained in:
Ibrahim authored and GitHub committed 2024-06-25 10:16:51 -04:00
1 parent 2bcdb52db9
commit c9cc372581
21 files changed
+113 -26

No files matched your search

+9
View File
@@ -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'));
}