This commit is contained in:
@@ -90,12 +90,14 @@ function renderPage({
|
||||
canManageSecrets = true,
|
||||
onNavigationStateChange,
|
||||
presentation = "legacy",
|
||||
initialWorkspaceId,
|
||||
}: {
|
||||
rows?: CatalogDatabase[] | (() => CatalogDatabase[]);
|
||||
canManage?: boolean;
|
||||
canManageSecrets?: boolean;
|
||||
onNavigationStateChange?: (state: { dirty: boolean; busy: boolean }) => void;
|
||||
presentation?: "legacy" | "fleet";
|
||||
initialWorkspaceId?: string;
|
||||
} = {}) {
|
||||
server.use(http.get("/api/catalog/databases", () => HttpResponse.json(
|
||||
typeof rows === "function" ? rows() : rows,
|
||||
@@ -104,6 +106,7 @@ function renderPage({
|
||||
const view = render(
|
||||
<QueryClientProvider client={client}>
|
||||
<DatabaseManagementPage
|
||||
initialWorkspaceId={initialWorkspaceId}
|
||||
canManage={canManage}
|
||||
canManageSecrets={canManageSecrets}
|
||||
onNavigationStateChange={onNavigationStateChange}
|
||||
@@ -115,6 +118,15 @@ function renderPage({
|
||||
return { ...view, client };
|
||||
}
|
||||
|
||||
test("fleet entry opens the database list without workspace preparation or an automatic editor", async () => {
|
||||
renderPage({ presentation: "fleet", initialWorkspaceId: "psd-clinical" });
|
||||
expect(await screen.findByRole("button", { name: "View tables for Policlinico San Donato" })).toBeVisible();
|
||||
expect(screen.getByText("Research laboratory")).toBeVisible();
|
||||
expect(screen.queryByRole("button", { name: "Back to list" })).not.toBeInTheDocument();
|
||||
expect(screen.queryByText(/Workspace preparation/)).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole("link", { name: "Open workspace preprocessing" })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
function makeSyncRun(
|
||||
scope: CatalogSyncRun["scope"],
|
||||
tableIds: string[] = [],
|
||||
|
||||
Reference in New Issue
Block a user