forked from baron/baron-sso
userfront e2e 전체 테스트
This commit is contained in:
@@ -89,6 +89,26 @@ test.describe("Authentication", () => {
|
||||
await expect(page).toHaveURL(/.*\/login.*/, { timeout: 15000 });
|
||||
});
|
||||
|
||||
test("should render an actionable SSO button on login route with returnTo", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.addInitScript(() => {
|
||||
window.localStorage.clear();
|
||||
(
|
||||
window as Window & typeof globalThis & { _IS_TEST_MODE?: boolean }
|
||||
)._IS_TEST_MODE = false;
|
||||
});
|
||||
|
||||
await page.goto("/login?returnTo=%2F");
|
||||
|
||||
const loginButton = page.getByRole("button", {
|
||||
name: /SSO 계정으로 로그인/i,
|
||||
});
|
||||
await expect(loginButton).toBeVisible();
|
||||
await expect(loginButton).toBeEnabled();
|
||||
await expect(loginButton).not.toContainText("로그인 진행 중");
|
||||
});
|
||||
|
||||
test("should allow access to dashboard when authenticated", async ({
|
||||
page,
|
||||
}) => {
|
||||
|
||||
Reference in New Issue
Block a user