Files
Nexus/frontend/e2e/pages/alerts-time.spec.mjs
T
2026-07-08 22:31:31 +08:00

19 lines
662 B
JavaScript

/** E2E-ALT-002 — alert table times not raw ISO UTC (MCP-ALT-001沉淀) */
import { test, expect } from '../fixtures.mjs'
import { ISO_UTC_RE, login, nav } from '../helpers.mjs'
test('E2E-ALT-002 alert times not bare ISO UTC', async ({ page }) => {
await login(page)
await nav(page, '/alerts')
await expect(page.getByText(/告警/).first()).toBeVisible({ timeout: 20000 })
const cells = page.locator('table tbody td')
const count = await cells.count()
for (let i = 0; i < Math.min(count, 20); i++) {
const text = await cells.nth(i).innerText()
if (/\d{4}-\d{2}-\d{2}/.test(text)) {
expect(text).not.toMatch(ISO_UTC_RE)
}
}
})