This commit is contained in:
@@ -107,7 +107,7 @@ test("starts on the core activity after a hard refresh even if metadata manageme
|
||||
const sessionNavigation = screen.getByRole("complementary", { name: "Session navigation" });
|
||||
expect(within(sessionNavigation).getByRole("button", { name: "New session" }))
|
||||
.toHaveAttribute("aria-current", "page");
|
||||
expect(within(sessionNavigation).getByRole("button", { name: "Database management" }))
|
||||
expect(within(sessionNavigation).getByRole("button", { name: "Database" }))
|
||||
.not.toHaveAttribute("aria-current");
|
||||
expect(screen.queryByRole("main", { name: "Database management" })).not.toBeInTheDocument();
|
||||
});
|
||||
@@ -119,7 +119,7 @@ test("replaces the core conversation while keeping the session navigation", asyn
|
||||
const conversationColumn = screen.getByTestId("conversation-column");
|
||||
const sessionNavigation = screen.getByRole("complementary", { name: "Session navigation" });
|
||||
const newSession = within(sessionNavigation).getByRole("button", { name: "New session" });
|
||||
const databaseManagement = within(sessionNavigation).getByRole("button", { name: "Database management" });
|
||||
const databaseManagement = within(sessionNavigation).getByRole("button", { name: "Database" });
|
||||
|
||||
expect(newSession).toHaveAttribute("aria-current", "page");
|
||||
expect(newSession).toHaveAttribute("data-navigation-state", "current");
|
||||
@@ -178,7 +178,7 @@ test("keeps a live core session connected while returning from database manageme
|
||||
await waitFor(() => expect(FakeEventSource.instances).toHaveLength(1));
|
||||
const source = FakeEventSource.instances[0];
|
||||
|
||||
await userEvent.click(screen.getByRole("button", { name: "Database management" }));
|
||||
await userEvent.click(screen.getByRole("button", { name: "Database" }));
|
||||
|
||||
expect(screen.getByRole("main", { name: "Database management" })).toBeVisible();
|
||||
expect(source.closed).toBe(false);
|
||||
@@ -210,9 +210,9 @@ test("hides the complete administrative navigation from a regular user", () => {
|
||||
|
||||
expect(screen.getByRole("button", { name: "New session" })).toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Administration" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Workspace management" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Database management" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Pi management" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Workspace" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Database" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("button", { name: "Pi configuration" })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
test("requires saving or cancelling a dirty database form before leaving", async () => {
|
||||
@@ -250,7 +250,8 @@ test("requires saving or cancelling a dirty database form before leaving", async
|
||||
renderShell();
|
||||
await expandAdministration();
|
||||
|
||||
await userEvent.click(screen.getByRole("button", { name: "Database management" }));
|
||||
await userEvent.click(screen.getByRole("button", { name: "Database" }));
|
||||
await userEvent.click(await screen.findByRole("button", { name: "Edit Policlinico San Donato" }));
|
||||
const schema = await screen.findByLabelText("Schema");
|
||||
await userEvent.clear(schema);
|
||||
await userEvent.type(schema, "reporting");
|
||||
|
||||
Reference in New Issue
Block a user