관리자 증거와 계정 흐름을 정돈
This commit is contained in:
parent
21bbe3f98d
commit
34aff65cb0
9 changed files with 1100 additions and 193 deletions
|
|
@ -217,6 +217,38 @@ test.describe("uc auth-onboarding", () => {
|
|||
await expect(submit).toBeDisabled();
|
||||
});
|
||||
|
||||
// usecase: 다른 Google 계정을 잘못 선택한 사용자가 현재 이메일을 확인하고 로그인 화면으로 빠져나간다
|
||||
test("온보딩 최상단에서 현재 Google 계정을 확인하고 다른 계정으로 로그인한다", async ({ page }) => {
|
||||
await routeUnmockedApi(page);
|
||||
await routeMe(page, () =>
|
||||
makeMe({
|
||||
email: "yunchan8804@gmail.com",
|
||||
onboarding_completed_at: null,
|
||||
nickname: "",
|
||||
}),
|
||||
);
|
||||
await routeOnboardingData(page);
|
||||
await routeAuthConfig(page);
|
||||
|
||||
let logoutRequested = false;
|
||||
await page.route("**/api/auth/logout", (route) => {
|
||||
logoutRequested = route.request().method() === "POST";
|
||||
return route.fulfill(jsonRoute({ ok: true }));
|
||||
});
|
||||
|
||||
await page.goto("/onboarding");
|
||||
|
||||
const account = page.getByLabel("현재 로그인 계정");
|
||||
await expect(account).toBeVisible();
|
||||
await expect(account.getByText("현재 Google 계정", { exact: true })).toBeVisible();
|
||||
await expect(account.getByText("yunchan8804@gmail.com", { exact: true })).toBeVisible();
|
||||
|
||||
await account.getByRole("button", { name: "다른 계정으로 로그인" }).click();
|
||||
await page.waitForURL(/\/login(?:$|[/?#])/);
|
||||
expect(logoutRequested).toBe(true);
|
||||
await expect(page.getByRole("heading", { name: "로그인" })).toBeVisible();
|
||||
});
|
||||
|
||||
// usecase: 신규 사용자가 입력을 마쳤지만 약관·개인정보 동의를 빠뜨린 채 제출하려 한다
|
||||
test("온보딩 필수 동의를 모두 체크해야 제출 버튼이 활성화된다", async ({ page }) => {
|
||||
await setupFreshLearnerOnOnboarding(page);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue