Align dashboard check with current admin flow
TaxBaik CI/CD / build-and-deploy (push) Failing after 25s
TaxBaik CI/CD / build-and-deploy (push) Failing after 25s
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import { test } from '@playwright/test';
|
||||
import { expect, test } from '@playwright/test';
|
||||
import { loginThroughAdminUi } from './helpers/admin-auth';
|
||||
|
||||
test('check dashboard metrics', async ({ page }) => {
|
||||
const baseUrl = 'https://www.taxbaik.com/taxbaik';
|
||||
const baseUrl = (process.env.E2E_BASE_URL || 'https://www.taxbaik.com/taxbaik').replace(/\/$/, '');
|
||||
const username = process.env.E2E_ADMIN_USERNAME || 'admin';
|
||||
const password = process.env.E2E_ADMIN_PASSWORD || 'Admin123!@#456';
|
||||
|
||||
// Login
|
||||
await page.goto(`${baseUrl}/admin/login`);
|
||||
await page.fill('input[placeholder="사용자명"]', 'test_admin');
|
||||
await page.fill('input[placeholder="비밀번호"]', 'admin123');
|
||||
await page.click('button[type="submit"]');
|
||||
await page.waitForURL(/admin\/dashboard/);
|
||||
await loginThroughAdminUi(page, baseUrl, username, password);
|
||||
await expect(page).toHaveURL(/\/taxbaik\/admin\/dashboard$/);
|
||||
|
||||
// Wait for page load
|
||||
await page.waitForSelector('.admin-page-hero', { timeout: 5000 });
|
||||
|
||||
Reference in New Issue
Block a user