dev_1.0.0_xuxt_3 完成web和alert的集成测试 #38

Merged
xuxt merged 12 commits from dev_1.0.0_xuxt_3 into dev_1.0.0 2025-10-31 14:18:20 +08:00
7 changed files with 7 additions and 7 deletions
Showing only changes of commit 752d2991ec - Show all commits

View File

@ -2,7 +2,7 @@ import { test, expect } from "@playwright/test";
test.describe("Alerts 页面功能测试", () => {
test.beforeEach(async ({ page }) => {
await page.goto("http://web.argus.com/alerts"); // 根据你实际路由调整
await page.goto("http://localhost:8080/alerts"); // 根据你实际路由调整
});
test("页面加载并显示告警统计", async ({ page }) => {

View File

@ -4,7 +4,7 @@ test.describe('Dashboard 页面测试', () => {
test.beforeEach(async ({ page }) => {
// 打开仪表盘页面
await page.goto('http://web.argus.com/dashboard', { waitUntil: 'networkidle' });
await page.goto('http://localhost:8080/dashboard', { waitUntil: 'networkidle' });
});
test('应能成功加载页面并显示标题', async ({ page }) => {

View File

@ -4,7 +4,7 @@ import { Page, expect } from '@playwright/test';
*
*/
export async function checkPage(page: Page, path: string, title: string) {
await page.goto('http://web.argus.com/');
await page.goto('http://localhost:8080/');
const menu = page.getByRole('link', { name: title });
await expect(menu).toBeVisible();
await menu.click();

View File

@ -4,7 +4,7 @@ import { testEntryCards } from './helpers/entrycards-helpers';
test.describe('Logs Page', () => {
test('should render all log cards', async ({ page }) => {
await page.goto('http://web.argus.com/logs');
await page.goto('http://localhost:8080m/logs');
await expect(page.locator('h2', { hasText: '日志详情' })).toBeVisible();
await testEntryCards(page, logsEntries);
});

View File

@ -5,7 +5,7 @@ import { testEntryCards } from './helpers/entrycards-helpers';
test.describe('Metrics Page', () => {
test('should render all metric cards', async ({ page }) => {
await page.goto('http://web.argus.com/metrics');
await page.goto('http://localhost:8080/metrics');
await expect(page.locator('h2', { hasText: '指标详情' })).toBeVisible();
await testEntryCards(page, metricsEntries);
});

View File

@ -3,7 +3,7 @@ import { test, expect } from "@playwright/test";
test.describe("节点信息页面 NodeInfo", () => {
// 每次测试前打开目标页面
test.beforeEach(async ({ page }) => {
await page.goto("http://web.argus.com/node");
await page.goto("http://localhost:8080/node");
});
test("页面标题应该正确显示", async ({ page }) => {

View File

@ -1,7 +1,7 @@
import { test } from '@playwright/test';
import { checkPage, noConsoleError } from './helpers/testUtils';
const BASE_URL = 'http://web.argus.com';
const BASE_URL = 'http://localhost:8080';
const pages = [
{ path: '/dashboard', title: '仪表盘' },
{ path: '/nodeInfo', title: '节点信息' },