-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪟 Hide organization info if workspace is not in Cloud for Teams (#12118)
- Loading branch information
1 parent
8388d2f
commit 68d5fd0
Showing
6 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ import { useListPermissions } from "core/api"; | |
import { useListCloudWorkspacesInfinite } from "core/api/cloud"; | ||
import { OrganizationRead } from "core/api/types/AirbyteClient"; | ||
|
||
import { CloudWorkspacesPage } from "./CloudWorkspacesPage"; | ||
import { CloudWorkspacesPageInner } from "./CloudWorkspacesPage"; | ||
|
||
jest.mock("core/services/auth", () => ({ | ||
useAuthService: () => ({}), | ||
|
@@ -47,7 +47,7 @@ describe("CloudWorkspacesPage", () => { | |
{ permissionType: "organization_member", userId: "123", permissionId: "123", organizationId: "321" }, | ||
], | ||
}); | ||
const wrapper = await render(<CloudWorkspacesPage />); | ||
const wrapper = await render(<CloudWorkspacesPageInner />); | ||
expect(wrapper.queryByTestId("noWorkspacePermissionsBanner")).toBeInTheDocument(); | ||
expect(wrapper.getByTestId("noWorkspacePermissionsBanner")).toHaveTextContent("[email protected]"); | ||
}); | ||
|
@@ -58,7 +58,7 @@ describe("CloudWorkspacesPage", () => { | |
{ permissionType: "organization_member", userId: "123", permissionId: "123", organizationId: "456" }, | ||
], | ||
}); | ||
const wrapper = await render(<CloudWorkspacesPage />); | ||
const wrapper = await render(<CloudWorkspacesPageInner />); | ||
expect(wrapper.queryByTestId("noWorkspacePermissionsBanner")).toBeInTheDocument(); | ||
expect(wrapper.getByTestId("noWorkspacePermissionsBanner")).toHaveTextContent("[email protected]"); | ||
}); | ||
|
@@ -76,7 +76,7 @@ describe("CloudWorkspacesPage", () => { | |
{ permissionType: "instance_admin", userId: "123", permissionId: "2" }, | ||
], | ||
}); | ||
const wrapper = await render(<CloudWorkspacesPage />); | ||
const wrapper = await render(<CloudWorkspacesPageInner />); | ||
expect(wrapper.queryByTestId("noWorkspacePermissionsBanner")).not.toBeInTheDocument(); | ||
}); | ||
it("should not show if you see any workspaces (e.g. as an instance admin)", async () => { | ||
|
@@ -92,7 +92,7 @@ describe("CloudWorkspacesPage", () => { | |
{ permissionType: "organization_member", userId: "123", permissionId: "123", organizationId: "321" }, | ||
], | ||
}); | ||
const wrapper = await render(<CloudWorkspacesPage />); | ||
const wrapper = await render(<CloudWorkspacesPageInner />); | ||
expect(wrapper.queryByTestId("noWorkspacePermissionsBanner")).not.toBeInTheDocument(); | ||
}); | ||
|
||
|
@@ -103,7 +103,7 @@ describe("CloudWorkspacesPage", () => { | |
{ permissionType: "organization_editor", userId: "123", permissionId: "2", organizationId: "456" }, | ||
], | ||
}); | ||
const wrapper = await render(<CloudWorkspacesPage />); | ||
const wrapper = await render(<CloudWorkspacesPageInner />); | ||
expect(wrapper.queryByTestId("noWorkspacePermissionsBanner")).not.toBeInTheDocument(); | ||
}); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters