fix(ui): unify Session navigation and restore uniform tab borders
This commit is contained in:
@@ -66,7 +66,7 @@ test("full controls change locale/theme and follow fullscreen entry, exit, Esc,
|
||||
expect(within(header).getByRole("button", { name: "Analyst" })).toBeInTheDocument();
|
||||
expect(within(header).queryByRole("button", { name: /admin|settings/i })).not.toBeInTheDocument();
|
||||
await userEvent.selectOptions(within(header).getByRole("combobox", { name: "Interface language" }), "it");
|
||||
expect(await screen.findByRole("button", { name: "Nuova sessione" })).toBeInTheDocument();
|
||||
expect(await screen.findByRole("button", { name: "Sessione" })).toBeInTheDocument();
|
||||
await userEvent.selectOptions(within(header).getByRole("combobox", { name: "Lingua dell’interfaccia" }), "en");
|
||||
await userEvent.click(within(header).getByRole("button", { name: "Use dark theme" }));
|
||||
expect(document.documentElement).toHaveAttribute("data-bs-theme", "dark");
|
||||
@@ -130,7 +130,7 @@ test("legacy embedded consumes the portal state and supplies no duplicate contro
|
||||
select.dataset.lang = "it";
|
||||
document.body.append(select);
|
||||
render(<App />);
|
||||
expect(await screen.findByRole("button", { name: "Nuova sessione" })).toBeInTheDocument();
|
||||
expect(await screen.findByRole("button", { name: "Sessione" })).toBeInTheDocument();
|
||||
expect(screen.queryByRole("banner", { name: /application|intestazione/i })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: /fullscreen|tema|Log out/i })).not.toBeInTheDocument();
|
||||
act(() => { document.documentElement.setAttribute("data-bs-theme", "light"); });
|
||||
@@ -160,8 +160,8 @@ test("reload restores only an authorized session document panel without resuming
|
||||
expect(resume).not.toHaveBeenCalled();
|
||||
expect(FakeEventSource.instances).toHaveLength(0);
|
||||
expect(readRememberedSession(user)).toBe("saved");
|
||||
await waitFor(() => expect(screen.getByRole("button", { name: "New session" })).toBeEnabled());
|
||||
await userEvent.click(screen.getByRole("button", { name: "New session" }));
|
||||
await waitFor(() => expect(screen.getByRole("button", { name: "Session" })).toBeEnabled());
|
||||
await userEvent.click(screen.getByRole("button", { name: "Session" }));
|
||||
expect(readRememberedSession(user)).toBeNull();
|
||||
});
|
||||
|
||||
@@ -172,7 +172,7 @@ test("reload ignores a session absent from the authorized list and isolates prin
|
||||
expect(readRememberedSession(user)).toBeNull();
|
||||
window.history.replaceState(null, "", "/");
|
||||
render(<App />);
|
||||
await screen.findByRole("button", { name: "New session" });
|
||||
await screen.findByRole("button", { name: "Session" });
|
||||
await waitFor(() => expect(readRememberedSession(user)).toBeNull());
|
||||
expect(screen.queryByRole("button", { name: "Resume" })).not.toBeInTheDocument();
|
||||
expect(FakeEventSource.instances).toHaveLength(0);
|
||||
|
||||
Reference in New Issue
Block a user