fix(seg hydration): auto-hydrate RT struct on second load with disableConfirmationPrompts (#5875)
This commit is contained in:
1 parent
0f822aaf48
commit
6f773f9972
11 files changed
+166
-17
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { Page } from 'playwright-test-coverage';
|
||||
|
||||
export async function addOHIFConfiguration(page: Page, configToAdd: Record<string, unknown>) {
|
||||
await page.addInitScript(config => {
|
||||
let _config;
|
||||
Object.defineProperty(window, 'config', {
|
||||
get() {
|
||||
return _config;
|
||||
},
|
||||
set(value) {
|
||||
_config = {
|
||||
...value,
|
||||
...config,
|
||||
};
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
}, configToAdd);
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { visitStudy } from './visitStudy';
|
||||
import { addOHIFConfiguration } from './OHIFConfiguration';
|
||||
import { checkForScreenshot } from './checkForScreenshot';
|
||||
import { screenShotPaths } from './screenShotPaths';
|
||||
import {
|
||||
@@ -23,6 +24,7 @@ import { subscribeToMeasurementAdded } from './subscribeToMeasurement';
|
||||
|
||||
export {
|
||||
visitStudy,
|
||||
addOHIFConfiguration,
|
||||
checkForScreenshot,
|
||||
screenShotPaths,
|
||||
simulateClicksOnElement,
|
||||
|
||||
@@ -177,6 +177,12 @@ const screenShotPaths = {
|
||||
rtPostHydration: 'rtPostHydration.png',
|
||||
rtPreHydration: 'rtPreHydration.png',
|
||||
},
|
||||
rtHydrationDisableConfirmation: {
|
||||
firstLoadPostHydration: 'firstLoadPostHydration.png',
|
||||
viewportAfterFirstDelete: 'viewportAfterFirstDelete.png',
|
||||
secondLoadPostHydration: 'secondLoadPostHydration.png',
|
||||
viewportAfterSecondDelete: 'viewportAfterSecondDelete.png',
|
||||
},
|
||||
crosshairs: {
|
||||
crosshairsRendered: 'crosshairsRendered.png',
|
||||
crosshairsRotated: 'crosshairsRotated.png',
|
||||
|
||||
Reference in new issue
Block a user