ci(frontend): 提高前端流水线及端到端测试稳定性
前端验证 / verify (push) Failing after 15m3s

- 使用内部 checkout 镜像,并校验运行环境中的 Node.js 22
- 检测预览服务端口冲突并重试,避免并行测试误连其他进程
- 调整布局测试的视口宽度和溢出断言,兼容经典滚动条
- 增加时钟暂停的时间余量,避免 CI 调度延迟导致测试失败
This commit is contained in:
cneicy committed 2026-11-06 20:24:56 +08:00
1 parent 6041d717f7
commit 5d080cacec
4 files changed
+69 -48

No files matched your search

+3 -1
View File
@@ -88,7 +88,9 @@ async function enterMonitor(page) {
await login(page, "/servers/server?id=5");
await page.getByRole("tab", { name: "监控", exact: true }).waitFor();
await page.evaluate(() => document.fonts.ready);
await page.clock.pauseAt(await page.evaluate(() => Date.now() + 50));
// pauseAt 是跳转而非真实等待;只留 50ms 时,读时间与暂停之间的调度延迟(并行验收或 CI)
// 会让目标落在过去并报 “Cannot fast-forward to the past”,因此留出 1 秒余量。
await page.clock.pauseAt(await page.evaluate(() => Date.now() + 1000));
await page.getByRole("tab", { name: "监控", exact: true }).click();
await eventually(
async () => {