fix(microscopy): rename measurement in microscopy mode (#5866)
This commit is contained in:
1 parent
df22109013
commit
2358a73c3c
5 files changed
+86
-8
No files matched your search
@@ -194,7 +194,6 @@ export class MainToolbarPageObject {
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
get freehandROI() {
|
||||
const button = page.getByTestId('PlanarFreehandROI');
|
||||
return {
|
||||
@@ -205,6 +204,21 @@ export class MainToolbarPageObject {
|
||||
},
|
||||
};
|
||||
},
|
||||
/* microscopy specific tools */
|
||||
// `.last()` targets the menu item inside the dropdown, not the active-tool
|
||||
// indicator inside the split-button primary
|
||||
// because both share the same data-cy value (e.g. "line")
|
||||
// Other microscopy tools might follow the same pattern
|
||||
get line() {
|
||||
const button = page.getByTestId('line').last();
|
||||
return {
|
||||
button,
|
||||
async click() {
|
||||
await measurementTools.click();
|
||||
await button.click();
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ export class RightPanelPageObject {
|
||||
get actions() {
|
||||
return getActionsMenu(row);
|
||||
},
|
||||
get title() {
|
||||
return row.getByTestId('data-row-title');
|
||||
},
|
||||
click: async () => {
|
||||
await row.click();
|
||||
},
|
||||
@@ -323,4 +326,23 @@ export class RightPanelPageObject {
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
get microscopyPanel() {
|
||||
const page = this.page;
|
||||
const getMeasurementByIdx = (index: number) => this.getPanelRowByIdx(index);
|
||||
const getMeasurementByText = (text: string) => this.getPanelRowByText(text);
|
||||
|
||||
return {
|
||||
locator: page.getByTestId('measurements-panel'),
|
||||
getMeasurementCount: async () => {
|
||||
return await page.getByTestId('data-row').count();
|
||||
},
|
||||
nthMeasurement(index: number) {
|
||||
return getMeasurementByIdx(index);
|
||||
},
|
||||
measurementByText(text: string) {
|
||||
return getMeasurementByText(text);
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user