test: 관리자 화면 e2e를 실제 로그인 흐름으로 전환
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
import { getAdminToken, installAdminToken } from './helpers/admin-auth';
|
||||
import { loginThroughAdminUi } from './helpers/admin-auth';
|
||||
|
||||
const username = process.env.E2E_ADMIN_USERNAME ?? 'admin';
|
||||
const password = process.env.E2E_ADMIN_PASSWORD;
|
||||
const baseUrl = (process.env.E2E_BASE_URL ?? 'http://178.104.200.7/taxbaik').replace(/\/$/, '');
|
||||
|
||||
test.describe('admin smoke', () => {
|
||||
test('navigates the main admin menus without circuit errors', async ({ page, request }) => {
|
||||
test('navigates the main admin menus without circuit errors', async ({ page }) => {
|
||||
test.skip(!password, 'E2E_ADMIN_PASSWORD is required.');
|
||||
|
||||
const consoleErrors: string[] = [];
|
||||
@@ -19,8 +19,7 @@ test.describe('admin smoke', () => {
|
||||
consoleErrors.push(error.message);
|
||||
});
|
||||
|
||||
const token = await getAdminToken(request, baseUrl, username, password);
|
||||
await installAdminToken(page, token);
|
||||
await loginThroughAdminUi(page, baseUrl, username, password);
|
||||
|
||||
const menuChecks = [
|
||||
{ path: '/admin/dashboard', content: /이번달 문의/ },
|
||||
|
||||
Reference in New Issue
Block a user