argus/src/web/tests/playwright/web-pages.spec.ts
xuxt b6da5bc8b8 dev_1.0.0_xuxt_3 完成web和alert的集成测试 (#38)
Co-authored-by: xiuting.xu <xiutingxt.xu@gmail.com>
Reviewed-on: #38
Reviewed-by: huhy <husteryezi@163.com>
Reviewed-by: yuyr <yuyr@zgclab.edu.cn>
Reviewed-by: sundapeng <sundp@mail.zgclab.edu.cn>
2025-10-31 14:18:19 +08:00

22 lines
697 B
TypeScript

import { test } from '@playwright/test';
import { checkPage, noConsoleError } from './helpers/testUtils';
import { BASE_URL } from './helpers/utils'
const pages = [
{ path: '/dashboard', title: '仪表盘' },
{ path: '/nodeInfo', title: '节点信息' },
{ path: '/metrics', title: '指标详情' },
{ path: '/logs', title: '日志详情' },
{ path: '/alerts', title: '告警详情' }
];
test.describe('Argus Web 页面可用性巡检', () => {
for (const { path, title } of pages) {
test(`${title} 页面加载验证`, async ({ page }) => {
await page.goto(`${BASE_URL}${path}`);
await checkPage(page, path, title);
await noConsoleError(page);
});
}
});