mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-04 02:03:14 +00:00
fix(work-orders): restore type filter e2e menu test id
Put wo-type-filter-menu back on the MUI Menu list so the union journey can find type rows.
This commit is contained in:
parent
efefcf9270
commit
80fd30fff9
2 changed files with 7 additions and 3 deletions
|
|
@ -13,6 +13,11 @@ type WoTypeFilterProps = {
|
|||
disabled?: boolean;
|
||||
};
|
||||
|
||||
const TYPE_FILTER_MENU_LIST_PROPS = {
|
||||
"aria-label": "Work order types",
|
||||
"data-testid": "wo-type-filter-menu",
|
||||
};
|
||||
|
||||
function typeFilterLabel(selected: Set<WOType>): string {
|
||||
if (selected.size === 0) return "All types";
|
||||
if (selected.size === 1) {
|
||||
|
|
@ -97,9 +102,7 @@ export function WoTypeFilter({ selected, onChange, disabled = false }: WoTypeFil
|
|||
paper: {
|
||||
className: "mt-1 w-[180px] rounded-lg border border-border p-1.5 shadow-md",
|
||||
},
|
||||
list: {
|
||||
"aria-label": "Work order types",
|
||||
},
|
||||
list: TYPE_FILTER_MENU_LIST_PROPS,
|
||||
}}
|
||||
>
|
||||
<TypeFilterMenuItem
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ describe("WoTypeFilter", () => {
|
|||
expect(screen.getByRole("button", { name: /all types/i })).toBeEnabled();
|
||||
const menu = await openTypeMenu(user, /all types/i);
|
||||
|
||||
expect(menu).toHaveAttribute("data-testid", "wo-type-filter-menu");
|
||||
expect(within(menu).getByRole("menuitemcheckbox", { name: "PM" })).toBeInTheDocument();
|
||||
expect(within(menu).getByRole("menuitemcheckbox", { name: "Reactive" })).toBeInTheDocument();
|
||||
expect(within(menu).getByRole("menuitemcheckbox", { name: "Emergency" })).toBeInTheDocument();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue