Skip to content

Commit ec841b3

Browse files
fix(web): preserve limits countdown locator compatibility
1 parent 9eef2b1 commit ec841b3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/web/src/components/usage/UsageLimitsPooled.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ function PoolSegment({
240240
<button
241241
type="button"
242242
style={{ gridColumn: index, gridRow: 1 }}
243-
aria-label={`${account.displayName ?? (account.email ? accountInitials(account.email) : account.driver)}: ${remaining}% left${timeLeft === null ? "" : `, ${timeLeft}% of the window left`}${resetsIn ? `, ${resetsIn}` : ""}${credits ? `, ${credits} reset ${credits === 1 ? "credit" : "credits"} banked` : ""}`}
243+
aria-label={`${account.displayName ?? (account.email ? accountInitials(account.email) : account.driver)}: ${remaining}% left${resetsIn ? `, ${resetsIn}` : ""}${timeLeft === null ? "" : `, ${timeLeft}% of the window left`}${credits ? `, ${credits} reset ${credits === 1 ? "credit" : "credits"} banked` : ""}`}
244244
className="relative h-5 min-w-0 cursor-pointer rounded-md bg-muted text-start outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[popup-open]:ring-1 data-[popup-open]:ring-inset data-[popup-open]:ring-border @2xl/pool:h-8"
245245
/>
246246
}

‎apps/web/src/components/usage/UsagePage.refresh.browser.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const setPresentations = (entries: ReadonlyArray<readonly [EnvironmentId, object
124124
act(async () => appAtomRegistry.set(state.presentations, new Map(entries) as Presentations));
125125
const setNow = (iso: string) => vi.mocked(Date.now).mockReturnValue(Date.parse(iso));
126126
const resetsIn = (countdown: string) =>
127-
page.getByRole("button", { name: `codex: 60% left, resets in ${countdown}` });
127+
page.getByRole("button", { name: `codex: 60% left, resets in ${countdown}`, exact: false });
128128
const refreshButton = () => page.getByRole("button", { name: "Refresh limits" });
129129
const selectMetric = (label: string) => userEvent.click(page.getByRole("button", { name: label }));
130130

0 commit comments

Comments
 (0)