fix(ui): reconcile shared accessibility and read recovery
This commit is contained in:
@@ -44,7 +44,8 @@ test("notification bell exposes its unread count and keyboard-accessible action"
|
||||
expect(open.mock.calls[0][0]).toBeInstanceOf(HTMLElement);
|
||||
});
|
||||
|
||||
test("shows build metadata only when the caller supplies the admin-only badge", () => {
|
||||
test.each([["en", "Application version 2.4.1, commit abc1234"], ["nb", "Applikasjonsversjon 2.4.1, revisjon abc1234"]])("shows localized %s build metadata only when the caller supplies the admin-only badge", (language, label) => {
|
||||
localStorage.setItem("uiLanguage", language);
|
||||
const commonProps = {
|
||||
pageTitle: "Dashboard",
|
||||
breadcrumbs: ["Home"],
|
||||
@@ -67,7 +68,8 @@ test("shows build metadata only when the caller supplies the admin-only badge",
|
||||
);
|
||||
|
||||
expect(screen.getByTestId("admin-version-badge")).toHaveTextContent("v2.4.1");
|
||||
expect(screen.getByLabelText("Application version 2.4.1, commit abc1234")).toBeInTheDocument();
|
||||
expect(screen.getByLabelText(label)).toBeInTheDocument();
|
||||
expect(screen.getByRole("img", { name: label })).toBe(screen.getByTestId("admin-version-badge"));
|
||||
|
||||
rerender(
|
||||
<CssVarsProvider theme={getTheme("light") as any} defaultMode="light">
|
||||
|
||||
Reference in New Issue
Block a user