test: 관리자 e2e 검증 안정화
This commit is contained in:
@@ -23,16 +23,16 @@ test.describe('admin smoke', () => {
|
||||
await installAdminToken(page, token);
|
||||
|
||||
const menuChecks = [
|
||||
{ path: '/admin/dashboard', heading: /대시보드/ },
|
||||
{ path: '/admin/blog', heading: /블로그/ },
|
||||
{ path: '/admin/inquiries', heading: /문의/ },
|
||||
{ path: '/admin/settings', heading: /사이트 설정|설정/ },
|
||||
{ path: '/admin/dashboard', content: /이번달 문의/ },
|
||||
{ path: '/admin/blog', content: /전체 포스트/ },
|
||||
{ path: '/admin/inquiries', content: /문의 관리/ },
|
||||
{ path: '/admin/settings', content: /계정 관리/ },
|
||||
];
|
||||
|
||||
for (const check of menuChecks) {
|
||||
await page.goto(`${baseUrl}${check.path}`);
|
||||
await expect(page).toHaveURL(new RegExp(`${check.path.replace(/\//g, '\\/')}$/`));
|
||||
await expect(page.getByRole('heading', { name: check.heading })).toBeVisible({ timeout: 20_000 });
|
||||
await expect(page).toHaveURL(new RegExp(`${check.path}$`));
|
||||
await expect(page.locator('.mud-main-content').getByText(check.content).first()).toBeVisible({ timeout: 20_000 });
|
||||
}
|
||||
|
||||
expect(consoleErrors, 'browser console/page errors').toEqual([]);
|
||||
|
||||
Reference in New Issue
Block a user