fix(test): update internal user test to match new create flow

Internal users can now see the create modal (with a team selection
prompt). Updated the test from asserting the modal is hidden to
asserting the team selection prompt is shown.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
yuneng-jiang 2026-03-21 14:14:34 -07:00
parent 1a63a7bab8
commit dae638b2f0

View file

@ -110,10 +110,12 @@ describe("CreateMCPServer", () => {
expect(screen.getByText("Add New MCP Server")).toBeInTheDocument();
});
it("should not render when user is not an admin", () => {
it("should render for internal users with team selection prompt", () => {
render(<CreateMCPServer {...defaultProps} userRole="Internal User" />);
expect(screen.queryByText("Add New MCP Server")).not.toBeInTheDocument();
expect(screen.getByText("Add New MCP Server")).toBeInTheDocument();
// Internal users without a selected team see a prompt
expect(screen.getByText("Select a team to create an MCP server for your team.")).toBeInTheDocument();
});
it("should show transport type options", async () => {