Unverified 提交 35ea8edb authored 作者: wwwillchen-bot's avatar wwwillchen-bot 提交者: GitHub

Improve E2E test resilience for logs_server and update snapshot (#2613)

## Summary - Improve picker button wait reliability in logs_server.spec.ts using toPass() with visibility and enabled checks - Update local_agent_read_logs snapshot to use regex for dynamic log count matching ## Test plan - Run the affected E2E tests: `npx playwright test logs_server.spec.ts local_agent_read_logs.spec.ts` - Tests should pass consistently without timing-related flakiness 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2613" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end --> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Improve logs_server E2E stability and update a snapshot to handle dynamic log counts. We now poll with toPass until the picker button is visible and enabled, and the snapshot uses a regex (/LOGS Reading \d+ logs/) instead of a fixed count. <sup>Written for commit 1810af01aee8f1862c36ded946adda4a60436b97. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> Co-authored-by: 's avatarWill Chen <willchen90@gmail.com> Co-authored-by: 's avatarClaude Opus 4.5 <noreply@anthropic.com>
上级 6ae812e5
...@@ -16,8 +16,12 @@ testSkipIfWindows( ...@@ -16,8 +16,12 @@ testSkipIfWindows(
await po.approveProposal(); await po.approveProposal();
// Wait for app to run - this generates server logs from stdout/stderr // Wait for app to run - this generates server logs from stdout/stderr
const picker = po.page.getByTestId("preview-pick-element-button"); // Use toPass() for resilience since the picker button needs time to appear and become enabled
await expect(picker).toBeEnabled({ timeout: Timeout.EXTRA_LONG }); await expect(async () => {
const picker = po.page.getByTestId("preview-pick-element-button");
await expect(picker).toBeVisible();
await expect(picker).toBeEnabled();
}).toPass({ timeout: Timeout.EXTRA_LONG });
// Open the system messages console // Open the system messages console
const consoleHeader = po.page.locator('text="System Messages"').first(); const consoleHeader = po.page.locator('text="System Messages"').first();
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
- text: "" - text: ""
- paragraph: tc=local-agent/read-logs - paragraph: tc=local-agent/read-logs
- paragraph: Let me check the recent console logs to see what's happening in the application. - paragraph: Let me check the recent console logs to see what's happening in the application.
- button "LOGS Reading 1 logs": - button /LOGS Reading \d+ logs/:
- img - img
- text: "" - text: ""
- img - img
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论