fix: per-page WASM render mode, Contact checkbox binding, Telegram inquiry channel
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m11s
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m11s
- Admin: replace the global @rendermode on <Routes>/<Router> with per-page render mode. Login.razor now prerenders (form visible before WASM loads); every other [Authorize] page stays prerender: false to avoid the AuthorizeRouteView blank-render regression from earlier attempts. Adds a "준비 중" -> "로그인" splash tied to WASM boot completion, and lets the authenticated-shell loading overlay stay up until AdminShell actually renders. - Contact.cshtml: fix the "Agree" checkbox missing value="true" - a checked box sent the browser-default "on", which bool model binding can't parse, so ModelState.IsValid silently went false and OnPostAsync returned a blank form with no visible error on every submission. Validation summary widened from ModelOnly to All so this class of failure isn't silent again. - TelegramInquiryNotificationService: read Telegram:InquiryChatId (falling back to ChatId) instead of only ChatId, matching the channel routing CLAUDE.md documents and deploy.yml already provisions as separate secrets. - Reconcile CLAUDE.md's self-contradicting Phase 8 prerender notes (Phase 9), rewrite validate_admin_render.sh for the per-page design, and add a SmartAdmin 5.5 design reference section to DOUZONE_UX_GUIDE.md for future admin screens (existing screens unchanged, tracked as WBS P4-03). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,4 +54,25 @@ test.describe('contact submit', () => {
|
||||
await navigateInBlazor(page, `${baseUrl}/admin/inquiries`);
|
||||
await expect(page.locator('.mud-main-content').getByText('문의 관리').first()).toBeVisible({ timeout: 20_000 });
|
||||
});
|
||||
|
||||
test('submitting the public Contact.cshtml form shows the success message', async ({ page }) => {
|
||||
// Regression test: Contact.cshtml's "Agree" checkbox had no value="true", so a
|
||||
// checked box submitted the browser-default "on", which bool model binding
|
||||
// cannot parse. ModelState.IsValid became false and OnPostAsync silently
|
||||
// returned Page() with a blank form and no visible error - the "무한 작성 유도"
|
||||
// bug. This drives the real form through a browser to catch that class of bug.
|
||||
const stamp = Date.now();
|
||||
|
||||
await page.goto(`${baseUrl}/contact`, { waitUntil: 'networkidle' });
|
||||
|
||||
await page.fill('#name', `Contact-E2E-${stamp}`);
|
||||
await page.fill('#phone', '010-1234-5678');
|
||||
await page.fill('#email', `contact-e2e-${stamp}@example.com`);
|
||||
await page.fill('#message', 'Playwright로 Contact.cshtml 폼을 직접 제출한 테스트입니다.');
|
||||
await page.check('#agree');
|
||||
await page.click('button[type="submit"]');
|
||||
|
||||
await expect(page.locator('#contact-success')).toBeVisible({ timeout: 15_000 });
|
||||
await expect(page.locator('#contact-success')).toContainText('접수되었습니다');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -4,6 +4,21 @@ const baseUrl = 'https://www.taxbaik.com/taxbaik';
|
||||
const username = 'test_admin';
|
||||
const password = 'TestAdmin@123456';
|
||||
|
||||
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
|
||||
// (no JS execution) must already contain the login form markup. This is the
|
||||
// regression check for the WASM-boot white-screen bug: if Router/Routes ever
|
||||
// regains a global @rendermode, this prerender is silently dropped and this
|
||||
// test catches it without needing a browser.
|
||||
const response = await request.get(`${baseUrl}/admin/login`);
|
||||
expect(response.ok()).toBeTruthy();
|
||||
|
||||
const html = await response.text();
|
||||
expect(html).toContain('name="username"');
|
||||
expect(html).toContain('name="password"');
|
||||
expect(html).toContain('admin-login-form');
|
||||
});
|
||||
|
||||
test('Admin Login Page - Full Flow Test', async ({ page }) => {
|
||||
// 콘솔 에러 캡처
|
||||
page.on('console', msg => {
|
||||
|
||||
Reference in New Issue
Block a user