[WBS-7.7][WBS-7.1] Hardening: Upgrade to MudBlazor 9.0.0 and establish warning-free E2E test harness and dev auth fallback
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 7s
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 12s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Deploy to Production / Build & Deploy to Production (push) Successful in 2m47s
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 7s
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 12s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Deploy to Production / Build & Deploy to Production (push) Successful in 2m47s
This commit is contained in:
+29
-15
@@ -5,7 +5,7 @@ import { chromium } from "@playwright/test";
|
||||
console.log(" ✅ FINAL TEST - @rendermode InteractiveWebAssembly");
|
||||
console.log("════════════════════════════════════════════════════════\n");
|
||||
|
||||
const b = await chromium.launch({ headless: false });
|
||||
const b = await chromium.launch({ headless: true });
|
||||
const p = await b.newPage();
|
||||
|
||||
p.on("console", msg => {
|
||||
@@ -17,19 +17,25 @@ import { chromium } from "@playwright/test";
|
||||
|
||||
try {
|
||||
console.log("1️⃣ 로그인 페이지 로드");
|
||||
await p.goto("http://localhost:5265/login.html");
|
||||
await p.goto("http://localhost:5265/login");
|
||||
console.log("🔄 /Account/Login 리다이렉션 대기 중...");
|
||||
await p.waitForURL("**/Account/Login");
|
||||
await p.waitForLoadState("networkidle");
|
||||
|
||||
console.log("2️⃣ 로그인 (admin/admin)");
|
||||
await p.fill("input[name='username']", "admin");
|
||||
await p.fill("input[name='password']", "admin");
|
||||
await p.click("button[type='submit']");
|
||||
console.log("2️⃣ 로그인 입력 시도 (JS DOM Injection)");
|
||||
await p.waitForTimeout(1500); // 폼 렌더링 대기
|
||||
await p.evaluate(() => {
|
||||
document.getElementById('username').value = 'admin';
|
||||
document.getElementById('password').value = 'admin';
|
||||
document.getElementById('loginBtn').click();
|
||||
});
|
||||
|
||||
console.log("3️⃣ 모니터링 (10초)\n");
|
||||
let redirected = false;
|
||||
for (let i = 1; i <= 10; i++) {
|
||||
await new Promise(r => setTimeout(r, 1000));
|
||||
const url = p.url();
|
||||
if (!url.includes("login")) {
|
||||
if (url.includes("/dashboard") || url === "http://localhost:5265/") {
|
||||
console.log(`\n ✅ [${i}s] 리다이렉트됨!`);
|
||||
console.log(` URL: ${url}`);
|
||||
redirected = true;
|
||||
@@ -40,21 +46,29 @@ import { chromium } from "@playwright/test";
|
||||
|
||||
const finalUrl = p.url();
|
||||
|
||||
if (finalUrl.includes("/dashboard")) {
|
||||
if (finalUrl.includes("/dashboard") || finalUrl === "http://localhost:5265/") {
|
||||
console.log("\n\n✅✅✅ 성공! 대시보드에 도착했습니다!\n");
|
||||
|
||||
// 페이지 콘텐츠 확인
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
// 페이지 콘텐츠 및 DOM 확인
|
||||
await new Promise(r => setTimeout(r, 3000));
|
||||
const content = await p.content();
|
||||
|
||||
if (content.includes("관리자 대시보드")) {
|
||||
console.log("✅ 대시보드 콘텐츠 확인됨!\n");
|
||||
console.log("🎉 로그인 완성! 인증 흐름 정상 작동!\n");
|
||||
// MudBlazor Layout DOM 요소 확인
|
||||
const hasMainContent = content.includes("mud-main-content") || content.includes("mud-layout");
|
||||
const hasQuantEngine = content.includes("QuantEngine");
|
||||
|
||||
console.log(`🔍 DOM [mud-main-content/mud-layout] 존재: ${hasMainContent ? '✅ 예' : '❌ 아니오'}`);
|
||||
console.log(`🔍 DOM [QuantEngine] 텍스트 존재: ${hasQuantEngine ? '✅ 예' : '❌ 아니오'}`);
|
||||
|
||||
if (hasMainContent && hasQuantEngine) {
|
||||
console.log("🎉 예측한 대시보드 화면 및 데이터 검증 성공 (DOM 일치)!");
|
||||
} else {
|
||||
console.log("⚠️ 대시보드 콘텐츠 미확인\n");
|
||||
console.error("❌ 예측 데이터와 실제 DOM 결과가 일치하지 않습니다!");
|
||||
process.exit(1);
|
||||
}
|
||||
} else {
|
||||
console.log(`\n❌ 아직도 ${finalUrl}에 있습니다\n`);
|
||||
console.error(`❌ 로그인 후 대시보드 리다이렉션에 실패했습니다. 최종 URL: ${finalUrl}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
await p.screenshot({ path: "./ultimate-test-result.png", fullPage: true });
|
||||
|
||||
Reference in New Issue
Block a user