feat(frontend): display Bitbucket signup disabled message on login page (#13100)

This commit is contained in:
Hiep Le
2026-02-28 19:26:16 +07:00
committed by GitHub
parent 1f82ff04d9
commit c511a89426
4 changed files with 59 additions and 1 deletions

View File

@@ -235,6 +235,38 @@ describe("LoginContent", () => {
).not.toBeInTheDocument();
});
it("should display Bitbucket signup disabled message when Bitbucket is configured", () => {
render(
<MemoryRouter>
<LoginContent
githubAuthUrl="https://github.com/oauth/authorize"
appMode="saas"
providersConfigured={["github", "bitbucket"]}
/>
</MemoryRouter>,
);
expect(
screen.getByText("AUTH$BITBUCKET_SIGNUP_DISABLED"),
).toBeInTheDocument();
});
it("should not display Bitbucket signup disabled message when Bitbucket is not configured", () => {
render(
<MemoryRouter>
<LoginContent
githubAuthUrl="https://github.com/oauth/authorize"
appMode="saas"
providersConfigured={["github"]}
/>
</MemoryRouter>,
);
expect(
screen.queryByText("AUTH$BITBUCKET_SIGNUP_DISABLED"),
).not.toBeInTheDocument();
});
it("should call buildOAuthStateData when clicking auth button", async () => {
const user = userEvent.setup();
const mockBuildOAuthStateData = vi.fn((baseState) => ({