fix: improve login form field selection and extend playwright timeouts
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m29s
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m29s
Changes:
1. admin-session.js: Use name attribute selectors instead of placeholder
- Changed: querySelector('input[placeholder="사용자명"]')
- To: querySelector('input[name="username"]')
- Reason: Placeholder selectors are fragile with DOM mutations
2. playwright.config.ts: Extend test timeouts for WASM boot
- Test timeout: 120s → 180s
- Expect timeout: 60s → 90s
- Reason: Blazor WASM bundle takes 60-120s to boot in local dev
3. tests/e2e/admin-login.spec.ts: Increase assertion timeouts
- Dashboard heading visibility: 20s → 60s
- Logout link visibility: timeout added 30s
4. tests/e2e/blog-crud.spec.ts: New comprehensive blog CRUD test
- Tests complete login flow
- Validates localStorage token storage
- Checks blog list page navigation
Status: Login form submission now works with proper field selection.
Remaining: Blazor WASM boot optimization needed for production.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -73,8 +73,9 @@ test.describe('admin authentication', () => {
|
||||
}
|
||||
|
||||
await expect(page).toHaveURL(/\/taxbaik\/admin\/dashboard$/, { timeout: 20_000 });
|
||||
await expect(page.getByRole('heading', { name: '대시보드' }).first()).toBeVisible({ timeout: 20_000 });
|
||||
await expect(page.getByRole('link', { name: /로그아웃/ })).toBeVisible();
|
||||
// WASM 부팅에 시간이 걸릴 수 있으므로 더 긴 타임아웃 사용
|
||||
await expect(page.getByRole('heading', { name: '대시보드' }).first()).toBeVisible({ timeout: 60_000 });
|
||||
await expect(page.getByRole('link', { name: /로그아웃/ })).toBeVisible({ timeout: 30_000 });
|
||||
expect(consoleErrors, 'browser console/page errors').toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user