Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: workspace switch (#21623)
ecmadao84915ad4f5ef
diff --git a/frontend/src/components/header/HeaderBreadcrumb.test.tsx b/frontend/src/components/header/HeaderBreadcrumb.test.tsxindex 5b863621cf..1acdc2c304 100644--- a/frontend/src/components/header/HeaderBreadcrumb.test.tsx+++ b/frontend/src/components/header/HeaderBreadcrumb.test.tsx@@ -351,6 +351,39 @@ describe("HeaderBreadcrumb", () => {unmount();});+ test("renders inactive workspace options as secondary actions", () => {+ mocks.workspaceList = [+ {+ name: "workspaces/default",+ title: "Default Workspace",+ },+ {+ name: "workspaces/other",+ title: "Other Workspace",+ },+ ];+ const { container, render, unmount } = renderIntoContainer(+ <HeaderBreadcrumb />+ );++ render();++ const workspaceSwitchButton = container.querySelector<HTMLButtonElement>(+ "button"+ );+ act(() => {+ workspaceSwitchButton?.click();+ });++ const otherWorkspaceButton = Array.from(+ container.querySelectorAll("button")+ ).find((button) => button.textContent?.includes("Other Workspace"));+ expect(otherWorkspaceButton?.className).not.toContain("bg-accent");+ expect(otherWorkspaceButton?.className).toContain("text-control");++ unmount();+ });+test("checks before switching workspace", () => {mocks.workspaceList = [{diff --git a/frontend/src/components/header/HeaderBreadcrumb.tsx b/frontend/src/components/header/HeaderBreadcrumb.tsxindex 27bb952697..684d9acd25 100644--- a/frontend/src/components/header/HeaderBreadcrumb.tsx+++ b/frontend/src/components/header/HeaderBreadcrumb.tsx@@ -193,6 +193,7 @@ export function WorkspaceSegment({<Buttonkey={ws.name}type="button"+ appearance="secondary"className={cn("h-auto w-full flex items-center justify-between rounded-xs px-3 py-1.5 text-sm gap-x-2",ws.name === currentWorkspaceName