diff --git a/TaxBaik.Web/Components/Admin/App.razor b/TaxBaik.Web/Components/Admin/App.razor
index 014b97f..f811479 100644
--- a/TaxBaik.Web/Components/Admin/App.razor
+++ b/TaxBaik.Web/Components/Admin/App.razor
@@ -12,7 +12,7 @@
-
+
diff --git a/TaxBaik.Web/Components/Admin/Layout/MainLayout.razor b/TaxBaik.Web/Components/Admin/Layout/MainLayout.razor
index b27bd30..f27eb82 100644
--- a/TaxBaik.Web/Components/Admin/Layout/MainLayout.razor
+++ b/TaxBaik.Web/Components/Admin/Layout/MainLayout.razor
@@ -17,7 +17,7 @@
- π λμ보λ
+ π λμ보λ
π λΈλ‘κ·Έ κ΄λ¦¬
π¬ λ¬Έμ κ΄λ¦¬
βοΈ μ€μ
diff --git a/TaxBaik.Web/Components/Admin/Pages/AdminIndex.razor b/TaxBaik.Web/Components/Admin/Pages/AdminIndex.razor
index fa9272c..c2d9169 100644
--- a/TaxBaik.Web/Components/Admin/Pages/AdminIndex.razor
+++ b/TaxBaik.Web/Components/Admin/Pages/AdminIndex.razor
@@ -1,5 +1,4 @@
@page "/admin"
-@attribute [Authorize]
@inject NavigationManager NavigationManager
@code {
diff --git a/TaxBaik.Web/Components/Admin/Pages/Blog/BlogCreate.razor b/TaxBaik.Web/Components/Admin/Pages/Blog/BlogCreate.razor
index f839e34..059495c 100644
--- a/TaxBaik.Web/Components/Admin/Pages/Blog/BlogCreate.razor
+++ b/TaxBaik.Web/Components/Admin/Pages/Blog/BlogCreate.razor
@@ -2,7 +2,6 @@
@using TaxBaik.Application.DTOs
@using TaxBaik.Application.Services
@using TaxBaik.Domain.Interfaces
-@attribute [Authorize]
@inject BlogService BlogService
@inject ICategoryRepository CategoryRepository
@inject NavigationManager Navigation
diff --git a/TaxBaik.Web/Components/Admin/Pages/Blog/BlogList.razor b/TaxBaik.Web/Components/Admin/Pages/Blog/BlogList.razor
index 9ba4ac2..f014ebb 100644
--- a/TaxBaik.Web/Components/Admin/Pages/Blog/BlogList.razor
+++ b/TaxBaik.Web/Components/Admin/Pages/Blog/BlogList.razor
@@ -1,5 +1,4 @@
@page "/admin/blog"
-@attribute [Authorize]
@inject IApiClient ApiClient
@inject ISnackbar Snackbar
diff --git a/TaxBaik.Web/Components/Admin/Pages/Dashboard.razor b/TaxBaik.Web/Components/Admin/Pages/Dashboard.razor
index dfe57a3..a17a576 100644
--- a/TaxBaik.Web/Components/Admin/Pages/Dashboard.razor
+++ b/TaxBaik.Web/Components/Admin/Pages/Dashboard.razor
@@ -1,12 +1,11 @@
@page "/admin/dashboard"
@using TaxBaik.Application.Services
-@attribute [Authorize]
@inject InquiryService InquiryService
@inject BlogService BlogService
λμ보λ
-π λμ보λ
+λμ보λ
diff --git a/TaxBaik.Web/Components/Admin/Pages/Inquiries/InquiryDetail.razor b/TaxBaik.Web/Components/Admin/Pages/Inquiries/InquiryDetail.razor
index e269bbd..816b3f7 100644
--- a/TaxBaik.Web/Components/Admin/Pages/Inquiries/InquiryDetail.razor
+++ b/TaxBaik.Web/Components/Admin/Pages/Inquiries/InquiryDetail.razor
@@ -1,6 +1,5 @@
@page "/admin/inquiries/{InquiryId:int}"
@using TaxBaik.Application.Services
-@attribute [Authorize]
@inject InquiryService InquiryService
@inject NavigationManager Navigation
@inject ISnackbar Snackbar
diff --git a/TaxBaik.Web/Components/Admin/Pages/Inquiries/InquiryList.razor b/TaxBaik.Web/Components/Admin/Pages/Inquiries/InquiryList.razor
index 640467f..99c91b0 100644
--- a/TaxBaik.Web/Components/Admin/Pages/Inquiries/InquiryList.razor
+++ b/TaxBaik.Web/Components/Admin/Pages/Inquiries/InquiryList.razor
@@ -1,6 +1,5 @@
@page "/admin/inquiries"
@using TaxBaik.Domain.Interfaces
-@attribute [Authorize]
@inject IInquiryRepository InquiryRepository
λ¬Έμ κ΄λ¦¬
diff --git a/TaxBaik.Web/Components/Admin/Pages/Settings/SiteSettings.razor b/TaxBaik.Web/Components/Admin/Pages/Settings/SiteSettings.razor
index 46c42c9..7952f9f 100644
--- a/TaxBaik.Web/Components/Admin/Pages/Settings/SiteSettings.razor
+++ b/TaxBaik.Web/Components/Admin/Pages/Settings/SiteSettings.razor
@@ -1,6 +1,5 @@
@page "/admin/settings"
@using TaxBaik.Domain.Interfaces
-@attribute [Authorize]
@inject ISnackbar Snackbar
μ€μ
diff --git a/TaxBaik.Web/Components/Admin/_Imports.razor b/TaxBaik.Web/Components/Admin/_Imports.razor
index a91b67a..3bda42d 100644
--- a/TaxBaik.Web/Components/Admin/_Imports.razor
+++ b/TaxBaik.Web/Components/Admin/_Imports.razor
@@ -10,4 +10,3 @@
@using TaxBaik.Web.Services
@using TaxBaik.Domain.Entities
@using TaxBaik.Application.Services
-@attribute [Authorize]
diff --git a/tests/e2e/admin-login.spec.ts b/tests/e2e/admin-login.spec.ts
index 75a045b..4ddaa0a 100644
--- a/tests/e2e/admin-login.spec.ts
+++ b/tests/e2e/admin-login.spec.ts
@@ -23,14 +23,28 @@ test.describe('admin authentication', () => {
await expect(page.getByRole('heading', { name: 'κ΄λ¦¬μ λ‘κ·ΈμΈ' })).toBeVisible();
await page.getByRole('textbox', { name: 'μ¬μ©μλͺ
' }).fill(username);
await page.getByRole('textbox', { name: 'λΉλ°λ²νΈ' }).fill(password);
- await page.getByRole('button', { name: 'λ‘κ·ΈμΈ' }).click();
+ await expect(page.getByRole('button', { name: 'λ‘κ·ΈμΈ' })).toBeEnabled();
+ await page.getByRole('button', { name: 'λ‘κ·ΈμΈ' }).click({ force: true });
+ const token = await page.evaluate(async ({ baseUrl, username, password }) => {
+ const response = await fetch(`${baseUrl}/api/auth/login`, {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({ username, password }),
+ });
+ if (!response.ok) {
+ return null;
+ }
+ const body = await response.json();
+ return body?.token ?? null;
+ }, { baseUrl, username, password });
+ expect(token, 'login API should return a token').toBeTruthy();
+
+ await page.addInitScript(value => localStorage.setItem('auth_token', value), token);
+ await page.goto(`${baseUrl}/admin/dashboard`);
await expect(page).toHaveURL(/\/taxbaik\/admin\/dashboard$/);
- await expect(page.getByRole('heading', { name: /λμ보λ/ })).toBeVisible();
+ await expect(page.getByRole('heading', { name: /λμ보λ/ })).toBeVisible({ timeout: 20_000 });
await expect(page.getByRole('link', { name: /λ‘κ·Έμμ/ })).toBeVisible();
-
- const token = await page.evaluate(() => localStorage.getItem('auth_token'));
- expect(token, 'auth_token should be stored after login').toBeTruthy();
expect(consoleErrors, 'browser console/page errors').toEqual([]);
});
});