forked from baron/baron-sso
로컬/CI 테스트 동기화
This commit is contained in:
@@ -17,7 +17,7 @@ const SIGNIN_SUBMIT_X = 640;
|
||||
const SIGNIN_SUBMIT_Y = 381;
|
||||
|
||||
const RESET_NEW_PASSWORD_X = 640;
|
||||
const RESET_NEW_PASSWORD_Y = 401;
|
||||
const RESET_NEW_PASSWORD_Y = 382;
|
||||
const RESET_CONFIRM_PASSWORD_X = 640;
|
||||
const RESET_CONFIRM_PASSWORD_Y = 464;
|
||||
const RESET_SUBMIT_X = 640;
|
||||
@@ -236,7 +236,13 @@ test.describe('UserFront WASM password login and reset', () => {
|
||||
const capture: RequestCapture = { clientLogs: [] };
|
||||
await mockAuthApis(page, capture);
|
||||
|
||||
const policyLoaded = page.waitForResponse(
|
||||
(response) =>
|
||||
response.url().includes('/api/v1/auth/password/policy') &&
|
||||
response.status() === 200,
|
||||
);
|
||||
await page.goto('/ko/reset-password?token=reset-token-e2e');
|
||||
await policyLoaded;
|
||||
await page.waitForTimeout(900);
|
||||
await fillAt(page, RESET_NEW_PASSWORD_X, RESET_NEW_PASSWORD_Y, 'ValidPass1!A');
|
||||
await fillAt(
|
||||
@@ -250,7 +256,10 @@ test.describe('UserFront WASM password login and reset', () => {
|
||||
force: true,
|
||||
});
|
||||
|
||||
await expect(page).toHaveURL(/\/ko\/signin$/);
|
||||
await expect
|
||||
.poll(() => capture.resetBody?.newPassword as string | undefined)
|
||||
.toBe('ValidPass1!A');
|
||||
await expect(page).toHaveURL(/\/ko\/signin(?:\?.*)?$/, { timeout: 10_000 });
|
||||
expect(capture.resetToken).toBe('reset-token-e2e');
|
||||
expect(capture.resetBody?.newPassword).toBe('ValidPass1!A');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user