test(e2e): replace waitForVolumeLoad with viewport render waits (#6000)

This commit is contained in:
Ghadeer Albattarni authored and GitHub committed 2026-05-07 15:42:12 -04:00
1 parent fbea158473
commit 9cf3149d2a
12 files changed
+98 -55

No files matched your search

+12 -3
View File
@@ -1,4 +1,11 @@
import { checkForScreenshot, screenShotPaths, test, visitStudy } from './utils';
import {
checkForScreenshot,
screenShotPaths,
test,
visitStudy,
waitForViewportRenderCycle,
waitForViewportsRendered,
} from './utils';
import { assertNumberOfModalityLoadBadges } from './utils/assertions';
test.beforeEach(async ({ page }) => {
@@ -14,7 +21,7 @@ test('should launch MPR with unhydrated RTSTRUCT chosen from the data overlay me
}) => {
await mainToolbarPageObject.layoutSelection.MPR.click();
await mainToolbarPageObject.waitForVolumeLoad();
await waitForViewportsRendered(page);
await checkForScreenshot(
page,
@@ -27,6 +34,8 @@ test('should launch MPR with unhydrated RTSTRUCT chosen from the data overlay me
await sagittalViewport.pane.hover();
const dataOverlayPageObject = sagittalViewport.overlayMenu.dataOverlay;
await dataOverlayPageObject.toggle();
const viewportRenderCycle = waitForViewportRenderCycle(page);
await dataOverlayPageObject.addSegmentation('ARIA RadOnc Structure Sets');
// Hide the overlay menu.
@@ -35,7 +44,7 @@ test('should launch MPR with unhydrated RTSTRUCT chosen from the data overlay me
// Adding an overlay should not show the LOAD button.
await assertNumberOfModalityLoadBadges({ page, expectedCount: 0 });
await mainToolbarPageObject.waitForVolumeLoad();
await viewportRenderCycle;
await checkForScreenshot({
page,