chore(security and testing): patch sigstore and run Playwright CI on the nashua self-hosted runner for release/3.12 (#6123)

This commit is contained in:
Joe Boccanfuso authored and GitHub committed 2026-07-07 13:53:57 -04:00
1 parent 8460409a62
commit 646dd583a2
28 files changed
+382 -226

No files matched your search

+3 -3
View File
@@ -32,7 +32,7 @@ test('should display the arrow tool and allow free-form text to be entered', asy
await checkForScreenshot({
page,
maxDiffPixelRatio: 0.0075,
locator: page.getByTestId('viewport-grid'),
screenshotPath: screenShotPaths.arrowAnnotate.arrowAnnotateDisplayedCorrectly0,
});
@@ -46,7 +46,7 @@ test('should display the arrow tool and allow free-form text to be entered', asy
await checkForScreenshot({
page,
maxDiffPixelRatio: 0.0075,
locator: page.getByTestId('viewport-grid'),
screenshotPath: screenShotPaths.arrowAnnotate.arrowAnnotateDisplayedCorrectly1,
});
@@ -60,7 +60,7 @@ test('should display the arrow tool and allow free-form text to be entered', asy
await checkForScreenshot({
page,
maxDiffPixelRatio: 0.0075,
locator: page.getByTestId('viewport-grid'),
screenshotPath: screenShotPaths.arrowAnnotate.arrowAnnotateDisplayedCorrectly2,
});
});
+8 -8
View File
@@ -19,11 +19,11 @@ test('should launch MPR with unhydrated SEG chosen from the data overlay menu',
await page.waitForTimeout(5000);
await checkForScreenshot(
await checkForScreenshot({
page,
page,
screenShotPaths.mprThenSEGOverlayNoHydration.mprPreSEGOverlayNoHydration
);
locator: page.getByTestId('viewport-grid'),
screenshotPath: screenShotPaths.mprThenSEGOverlayNoHydration.mprPreSEGOverlayNoHydration,
});
// Hover over the middle/sagittal viewport so that the data overlay menu is available.
await viewportPageObject.getById('mpr-axial').pane.hover();
@@ -39,9 +39,9 @@ test('should launch MPR with unhydrated SEG chosen from the data overlay menu',
await page.waitForTimeout(5000);
await checkForScreenshot(
await checkForScreenshot({
page,
page,
screenShotPaths.mprThenSEGOverlayNoHydration.mprPostSEGOverlayNoHydration
);
locator: page.getByTestId('viewport-grid'),
screenshotPath: screenShotPaths.mprThenSEGOverlayNoHydration.mprPostSEGOverlayNoHydration,
});
});
+15 -3
View File
@@ -15,13 +15,25 @@ test('should hydrate RT reports correctly', async ({
await rightPanelPageObject.toggle();
await leftPanelPageObject.loadSeriesByModality('RTSTRUCT');
await page.waitForTimeout(5000);
await checkForScreenshot(page, page, screenShotPaths.rtHydration.rtPreHydration);
await checkForScreenshot({
page,
locator: page.getByTestId('viewport-grid'),
screenshotPath: screenShotPaths.rtHydration.rtPreHydration,
});
await DOMOverlayPageObject.viewport.segmentationHydration.yes.click();
await page.waitForTimeout(5000);
await checkForScreenshot(page, page, screenShotPaths.rtHydration.rtPostHydration);
await checkForScreenshot({
page,
locator: page.getByTestId('viewport-grid'),
screenshotPath: screenShotPaths.rtHydration.rtPostHydration,
});
await rightPanelPageObject.labelMapSegmentationPanel.panel.segmentByText('Small Sphere').click();
await page.waitForTimeout(5000);
await checkForScreenshot(page, page, screenShotPaths.rtHydration.rtJumpToStructure);
await checkForScreenshot({
page,
locator: page.getByTestId('viewport-grid'),
screenshotPath: screenShotPaths.rtHydration.rtJumpToStructure,
});
});
+10 -2
View File
@@ -15,7 +15,11 @@ test('should hydrate RT reports correctly', async ({
await rightPanelPageObject.toggle();
await leftPanelPageObject.loadSeriesByModality('RTSTRUCT');
await checkForScreenshot(page, page, screenShotPaths.rtHydration2.rtPreHydration);
await checkForScreenshot({
page,
locator: page.getByTestId('viewport-grid'),
screenshotPath: screenShotPaths.rtHydration2.rtPreHydration,
});
// wait for 3 seconds
await page.evaluate(() => {
// Access cornerstone directly from the window object
@@ -40,5 +44,9 @@ test('should hydrate RT reports correctly', async ({
// should preserve zoom and pan and scroll position after hydration
await DOMOverlayPageObject.viewport.segmentationHydration.yes.click();
await checkForScreenshot(page, page, screenShotPaths.rtHydration.rtPostHydration);
await checkForScreenshot({
page,
locator: page.getByTestId('viewport-grid'),
screenshotPath: screenShotPaths.rtHydration2.rtPostHydration,
});
});
+10 -8
View File
@@ -27,21 +27,23 @@ test('should launch MPR with unhydrated SEG chosen from the data overlay menu',
await page.waitForTimeout(5000);
await checkForScreenshot(
await checkForScreenshot({
page,
page,
screenShotPaths.segDataOverlayNoHydrationThenMPR.segDataOverlayNoHydrationPreMPR
);
locator: page.getByTestId('viewport-grid'),
screenshotPath:
screenShotPaths.segDataOverlayNoHydrationThenMPR.segDataOverlayNoHydrationPreMPR,
});
await mainToolbarPageObject.layoutSelection.MPR.click();
await page.waitForTimeout(5000);
await checkForScreenshot(
await checkForScreenshot({
page,
page,
screenShotPaths.segDataOverlayNoHydrationThenMPR.segDataOverlayNoHydrationPostMPR
);
locator: page.getByTestId('viewport-grid'),
screenshotPath:
screenShotPaths.segDataOverlayNoHydrationThenMPR.segDataOverlayNoHydrationPostMPR,
});
// Adding an overlay should not show the LOAD button.
assertNumberOfModalityLoadBadges({ page, expectedCount: 0 });
+3 -1
View File
@@ -35,10 +35,12 @@ test('should render scroll bars with the correct look-and-feel', async ({ page }
// Additional wait to ensure scrollbar rendering is stable
await page.waitForTimeout(1000);
expandedStudyRow.scrollIntoViewIfNeeded();
await checkForScreenshot({
page,
locator: expandedStudyRow,
normalizedClip: { x: 0.97, y: 0.35, width: 0.03, height: 0.65 },
normalizedClip: { x: 0.97, y: 0.35, width: 0.028, height: 0.65 },
screenshotPath: screenShotPaths.workList.scrollBarRenderedProperly,
});
});
+36
View File
@@ -0,0 +1,36 @@
/**
* Playwright global setup (wired via `globalSetup` in playwright.config.ts).
*
* Before the test suite runs, open the viewer once against a known study to
* "warm up" the dev server: trigger the first (slow) lazy webpack compilation,
* prime the browser/codec caches, and fetch the study metadata. Without this,
* the first real spec frequently times out waiting on a cold server compile.
* This run only loads the page and waits for a viewport pane to render; it makes
* no assertions.
*/
import { chromium, type FullConfig } from '@playwright/test';
const warmupStudyInstanceUID = '1.3.6.1.4.1.14519.5.2.1.1706.8374.643249677828306008300337414785';
const warmupTimeout = 180_000;
export default async function globalSetup(config: FullConfig) {
const baseURL = String(config.projects[0]?.use?.baseURL || 'http://localhost:3335');
const warmupURL = new URL(
`/viewer/ohif?StudyInstanceUIDs=${warmupStudyInstanceUID}`,
baseURL
).toString();
const browser = await chromium.launch();
const page = await browser.newPage();
try {
page.setDefaultTimeout(warmupTimeout);
await page.goto(warmupURL, { waitUntil: 'domcontentloaded', timeout: warmupTimeout });
await page.waitForLoadState('networkidle', { timeout: warmupTimeout }).catch(() => {});
await page
.locator('[data-cy="viewport-pane"]')
.first()
.waitFor({ state: 'visible', timeout: warmupTimeout });
} finally {
await browser.close();
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 KiB

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 KiB

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 KiB

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 KiB

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 KiB

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 687 B

After

Width:  |  Height:  |  Size: 646 B