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>
22 lines
697 B
TypeScript
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);
|
|
});
|
|
}
|
|
});
|