fix(seg hydration): auto-hydrate RT struct on second load with disableConfirmationPrompts (#5875)

This commit is contained in:
Ghadeer Albattarni authored and GitHub committed 2026-03-09 09:08:21 -04:00
1 parent 0f822aaf48
commit 6f773f9972
11 files changed
+166 -17

No files matched your search

+30 -4
View File
@@ -11,6 +11,30 @@ export class RightPanelPageObject {
this.DOMOverlayPageObject = new DOMOverlayPageObject(page);
}
private getCollapsedMoreMenu(typeSuffix?: string) {
const page = this.page;
const testId = typeSuffix
? `segmentation-collapsed-more-btn-${typeSuffix}`
: 'segmentation-collapsed-more-btn';
const button = page.getByTestId(testId);
return {
button,
click: async () => {
await button.click();
},
delete: async () => {
await button.click();
await page.getByRole('menuitem', { name: 'Delete' }).click();
},
rename: async (text: string) => {
await button.click();
await page.getByRole('menuitem', { name: 'Rename' }).click();
await this.DOMOverlayPageObject.dialog.input.fillAndSave(text);
},
};
}
private getActionsMenu(row: Locator) {
const actionsButton = row.getByTestId('actionsMenuTrigger');
@@ -112,12 +136,14 @@ export class RightPanelPageObject {
};
}
private get segmentationPanel() {
private getSegmentationPanel(typeSuffix?: string) {
const page = this.page;
const getSegmentByIdx = (index: number) => this.getPanelRowByIdx(index);
const getSegmentByText = (text: string) => this.getPanelRowByText(text);
const moreMenu = this.getCollapsedMoreMenu(typeSuffix);
return {
moreMenu,
getSegmentCount: async () => {
return await page.getByTestId('data-row').count();
},
@@ -135,7 +161,7 @@ export class RightPanelPageObject {
get contourSegmentationPanel() {
const page = this.page;
const addSegmentationButton = this.addSegmentationButton;
const panel = this.segmentationPanel;
const panel = this.getSegmentationPanel('Contour');
const menuButton = page.getByTestId('panelSegmentationWithToolsContour-btn');
return {
@@ -150,7 +176,7 @@ export class RightPanelPageObject {
get labelMapSegmentationPanel() {
const page = this.page;
const addSegmentationButton = this.addSegmentationButton;
const panel = this.segmentationPanel;
const panel = this.getSegmentationPanel('Labelmap');
const menuButton = page.getByTestId('panelSegmentationWithToolsLabelMap-btn');
return {
@@ -264,7 +290,7 @@ export class RightPanelPageObject {
get noToolsSegmentationPanel() {
const page = this.page;
const panel = this.segmentationPanel;
const panel = this.getSegmentationPanel();
const menuButton = page.getByTestId(/^panelSegmentation.*-btn$/).first();
return {