test: 관리자 화면 e2e를 실제 로그인 흐름으로 전환
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
import { findInquiryByName, getAdminToken, installAdminToken } from './helpers/admin-auth';
|
||||
import { findInquiryByName, getAdminToken, loginThroughAdminUi } from './helpers/admin-auth';
|
||||
|
||||
const username = process.env.E2E_ADMIN_USERNAME ?? 'admin';
|
||||
const password = process.env.E2E_ADMIN_PASSWORD;
|
||||
@@ -48,7 +48,7 @@ test.describe('contact submit', () => {
|
||||
expect(inquiry.phone).toBe(phone);
|
||||
expect(inquiry.message).toContain(message.slice(0, 20));
|
||||
|
||||
await installAdminToken(page, token);
|
||||
await loginThroughAdminUi(page, baseUrl, username, password);
|
||||
await page.goto(`${baseUrl}/admin/inquiries`);
|
||||
await expect(page.locator('.mud-main-content').getByText('문의 관리').first()).toBeVisible({ timeout: 20_000 });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user