음성 재생과 운영 배포 정리
This commit is contained in:
parent
8ed185ce6c
commit
ac7db95542
1020 changed files with 46863 additions and 2175 deletions
|
|
@ -69,10 +69,14 @@ export async function signInAsLearner(page: Page) {
|
|||
},
|
||||
});
|
||||
expect(res.ok(), await res.text()).toBeTruthy();
|
||||
const consent = await page.request.post("/api/auth/consent", {
|
||||
data: { accepted: true },
|
||||
await completeOnboarding(page, {
|
||||
legal_name: "E2E Learner",
|
||||
affiliation: "한신대학교",
|
||||
department: "상담심리학과",
|
||||
grade_level: "3학년",
|
||||
phone: "010-0000-0000",
|
||||
contact_address: "경기도 오산시 한신대학교",
|
||||
});
|
||||
expect(consent.ok(), await consent.text()).toBeTruthy();
|
||||
}
|
||||
|
||||
export async function signInAsTeacher(page: Page) {
|
||||
|
|
@ -84,6 +88,42 @@ export async function signInAsTeacher(page: Page) {
|
|||
},
|
||||
});
|
||||
expect(res.ok(), await res.text()).toBeTruthy();
|
||||
await completeOnboarding(page, {
|
||||
legal_name: "E2E Teacher",
|
||||
affiliation: "한신대학교",
|
||||
department: "상담심리학과",
|
||||
grade_level: "교수",
|
||||
phone: "010-1111-1111",
|
||||
contact_address: "경기도 오산시 한신대학교",
|
||||
});
|
||||
}
|
||||
|
||||
export async function completeOnboarding(
|
||||
page: Page,
|
||||
profile: {
|
||||
legal_name: string;
|
||||
affiliation: string;
|
||||
department: string;
|
||||
grade_level: string;
|
||||
phone: string;
|
||||
contact_address: string;
|
||||
nickname?: string;
|
||||
self_introduction?: string;
|
||||
avatar_url?: string;
|
||||
},
|
||||
) {
|
||||
const onboarding = await page.request.post("/api/users/me/onboarding", {
|
||||
data: {
|
||||
...profile,
|
||||
nickname: profile.nickname ?? profile.legal_name,
|
||||
self_introduction:
|
||||
profile.self_introduction ?? "상담 시뮬레이션 훈련을 위한 테스트 사용자입니다.",
|
||||
avatar_url: profile.avatar_url ?? "",
|
||||
terms_accepted: true,
|
||||
privacy_accepted: true,
|
||||
},
|
||||
});
|
||||
expect(onboarding.ok(), await onboarding.text()).toBeTruthy();
|
||||
}
|
||||
|
||||
export async function fetchAvailablePersonas(page: Page): Promise<E2EPersona[]> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue