fix(work-orders): avoid Array.at in advanced search wiring test

Keep the public-interface assertion compatible with the project's TypeScript lib target.
This commit is contained in:
Arthur Bassi 2026-08-11 15:59:33 -03:00
parent ea747af854
commit ba4f3ca96d

View file

@ -177,7 +177,8 @@ describe("WorkOrders Advanced Search page wiring (SH-121)", () => {
fireEvent.click(within(sheet).getByRole("button", { name: /apply filters/i }));
expect(applyAdvancedFilters).toHaveBeenCalled();
const applied = applyAdvancedFilters.mock.calls.at(-1)?.[0] as typeof EMPTY_ADVANCED_FILTERS;
const appliedCalls = applyAdvancedFilters.mock.calls;
const applied = appliedCalls[appliedCalls.length - 1]?.[0] as typeof EMPTY_ADVANCED_FILTERS;
expect(applied.severities.has(1)).toBe(true);
expect(applied.hasUplift).toBe(true);
expect(applied.upliftStatuses.has("pending")).toBe(true);