test(e2e): wait for the input row to hide under a pending permission prompt - #17
Merged
Merged
Conversation
…prompt The permission-prompt element is attached first and Alpine applies the x-show style to .acp-input-row on the next tick. The test sampled the row's display once, immediately after the prompt attached, so on a loaded CI runner it could observe the pre-update state and fail (CI run 34159374409, chromium-kiro). Wait for the hidden state with a bounded wait_for_function instead, mirroring the existing check that the row becomes visible again after the prompt resolves. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The change is a small, test-only synchronization fix that reduces CI flakiness without altering application behavior.
Pull request overview
This PR stabilizes a flaky Playwright browser e2e test around the ACP permission prompt by waiting for Alpine’s x-show-driven DOM style update rather than sampling the computed style at a single instant.
Changes:
- Replace a one-shot
page.evaluate(...)visibility check with a boundedpage.wait_for_function(...)(3s) to wait until.acp-input-rowis hidden while the permission prompt is pending. - Add an explicit import/alias for Playwright’s
TimeoutErrorto convert a timeout into a clearer assertion failure message.
File summaries
| File | Description |
|---|---|
| packages/studyloop/tests/test_web_acp_chat_ui.py | Makes the permission-prompt e2e test deterministic by waiting for the input row to become hidden after the prompt attaches. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CI run 34159374409 on
7f9a19ecfailed a single browser e2e test,TestPermissionPrompt::test_allow_deny_buttons_render_and_input_row_hidden[chromium-kiro], while the identical code onfb606468passed the same job. The test sampled.acp-input-row's computed display once, immediately after.acp-permission-promptattached; Alpine applies thex-show="!pendingPermission"style on the next tick, so a loaded runner can observe the pre-update state.What
Replace the one-shot
page.evaluatewith a boundedpage.wait_for_functionfor the hidden state (3 s), mirroring the existing check later in the same test that the row becomes visible again after the prompt resolves. Test-only change.Evidence
just e2e packages/studyloop/tests/test_web_acp_chat_ui.py -k TestPermissionPrompt→ 7 passed locally.🤖 Generated with Claude Code