Refine admin login flow and verification harness
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m21s
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m21s
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
import { captureEvidence } from './helpers/evidence';
|
||||
|
||||
const baseUrl = 'https://www.taxbaik.com/taxbaik';
|
||||
const username = 'test_admin';
|
||||
const password = 'TestAdmin@123456';
|
||||
const password = 'admin123';
|
||||
|
||||
test('Admin Login Page - prerendered HTML contains the form before JS runs', async ({ request }) => {
|
||||
// Login.razor is @rendermode ...(prerender: true), so the raw HTTP response
|
||||
@@ -43,12 +44,12 @@ test('Admin Login Page - Full Flow Test', async ({ page }) => {
|
||||
console.log('\n=== 2단계: 로그인 필드 확인 ===');
|
||||
|
||||
// 사용자명 입력 필드 찾기
|
||||
const usernameField = await page.locator('input[type="text"], input[placeholder*="사용자"], input[placeholder*="이름"]').first();
|
||||
const usernameField = await page.locator('input[name="username"], input[name="Username"], input[type="text"], input[placeholder*="사용자"], input[placeholder*="이름"]').first();
|
||||
const usernameVisible = await usernameField.isVisible().catch(() => false);
|
||||
console.log(`✅ 사용자명 필드: ${usernameVisible ? '보임 ✨' : '안 보임 ❌'}`);
|
||||
|
||||
// 비밀번호 입력 필드 찾기
|
||||
const passwordField = await page.locator('input[type="password"], input[placeholder*="비밀"], input[placeholder*="암호"]').first();
|
||||
const passwordField = await page.locator('input[name="password"], input[name="Password"], input[type="password"], input[placeholder*="비밀"], input[placeholder*="암호"]').first();
|
||||
const passwordVisible = await passwordField.isVisible().catch(() => false);
|
||||
console.log(`✅ 비밀번호 필드: ${passwordVisible ? '보임 ✨' : '안 보임 ❌'}`);
|
||||
|
||||
@@ -89,8 +90,8 @@ test('Admin Login Page - Full Flow Test', async ({ page }) => {
|
||||
}
|
||||
|
||||
console.log('\n=== 5단계: 스크린샷 ===');
|
||||
await page.screenshot({ path: 'test-results/login-page.png' });
|
||||
console.log('✅ 스크린샷 저장: test-results/login-page.png');
|
||||
await captureEvidence(page, test.info(), 'login-page');
|
||||
console.log('✅ 증빙 저장');
|
||||
|
||||
console.log('\n=== 🎯 테스트 결과 ===');
|
||||
console.log(`✅ 페이지 로드: 성공`);
|
||||
|
||||
Reference in New Issue
Block a user