From ecd40e7856a1a7192b1fe0b8e60372f90672d03e Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Wed, 8 Jul 2026 01:49:03 +0900 Subject: [PATCH] Restore admin shell and harden smoke tests --- scripts/route_lint.mjs | 12 ++++++++++++ .../Components/Admin/Layout/MainLayout.razor | 4 ++-- tests/e2e/admin-smoke.spec.ts | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/route_lint.mjs b/scripts/route_lint.mjs index 1b2352d..2799ffe 100644 --- a/scripts/route_lint.mjs +++ b/scripts/route_lint.mjs @@ -27,6 +27,11 @@ const required = [ file: 'tests/e2e/route-isolation.spec.ts', pattern: 'admin login boots the admin app under the admin base path', message: '관리자 base path 하네스가 필요합니다.' + }, + { + file: 'tests/e2e/admin-smoke.spec.ts', + pattern: '.admin-shell', + message: '관리자 셸 렌더 검증이 필요합니다.' } ]; @@ -60,6 +65,13 @@ for (const file of adminFiles) { failed = true; } } + + if (file === 'src/TaxBaik.Web.Client/Components/Admin/Layout/MainLayout.razor') { + if (!text.includes('')) { + console.error('[route-lint] FAIL MainLayout: admin shell wrapper should be restored.'); + failed = true; + } + } } if (failed) process.exit(1); diff --git a/src/TaxBaik.Web.Client/Components/Admin/Layout/MainLayout.razor b/src/TaxBaik.Web.Client/Components/Admin/Layout/MainLayout.razor index 9a5d651..81e49b8 100644 --- a/src/TaxBaik.Web.Client/Components/Admin/Layout/MainLayout.razor +++ b/src/TaxBaik.Web.Client/Components/Admin/Layout/MainLayout.razor @@ -1,5 +1,5 @@ @inherits LayoutComponentBase -
+ @Body -
+
diff --git a/tests/e2e/admin-smoke.spec.ts b/tests/e2e/admin-smoke.spec.ts index 968e369..1313cde 100644 --- a/tests/e2e/admin-smoke.spec.ts +++ b/tests/e2e/admin-smoke.spec.ts @@ -59,6 +59,9 @@ test.describe('admin smoke', () => { await expect(page).toHaveURL(/\/taxbaik\/admin\/dashboard$/, { timeout: 20_000 }); await expect(page.locator('body')).toContainText('세무 운영 콘솔', { timeout: 60_000 }); await expect(page.getByRole('link', { name: /로그아웃/ })).toBeVisible({ timeout: 30_000 }); + await expect(page.locator('.admin-shell')).toBeVisible({ timeout: 30_000 }); + await expect(page.locator('.admin-drawer')).toBeVisible({ timeout: 30_000 }); + await expect(page.locator('.admin-content')).toContainText(/대시보드|세무 운영 콘솔/, { timeout: 30_000 }); await captureEvidence(page, test.info(), 'admin-dashboard-smoke'); expect(consoleErrors, 'browser console/page errors').toEqual([]);