Files
Nexus/frontend/e2e/pages/commands-time.spec.mjs
T
Nexus Agent 0f6f91e61a fix(api): align alerts/commands contracts and ship full-site test suite.
Restore alert history filters and stats fields, paginate command/session logs for the SPA, show script labels on schedules, and land integration/E2E coverage with rebuilt web assets.
2026-06-09 02:13:13 +08:00

25 lines
909 B
JavaScript

/** E2E-CMD-002 — push log view time columns (MCP-CMD-001沉淀) */
import { test, expect } from '../fixtures.mjs'
import { ISO_UTC_RE, login, nav } from '../helpers.mjs'
test('E2E-CMD-002 push log times not bare ISO UTC', async ({ page }) => {
await login(page)
await nav(page, '/commands')
await expect(page.locator('main .v-card-title').filter({ hasText: '命令日志' })).toBeVisible({
timeout: 20000,
})
await page.locator('.v-card-title .v-select').first().click()
await page.locator('.v-overlay-container').getByText('推送日志').click()
await expect(page.locator('table').first()).toBeVisible()
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)
}
}
})