Skip to content

test(e2e): wait for the input row to hide under a pending permission prompt - #17

Merged
NetDevAutomate merged 1 commit into
mainfrom
fix/e2e-permission-prompt-race
Sep 7, 2026
Merged

test(e2e): wait for the input row to hide under a pending permission prompt#17
NetDevAutomate merged 1 commit into
mainfrom
fix/e2e-permission-prompt-race

Conversation

@NetDevAutomate

Copy link
Copy Markdown
Owner

Why

CI run 34159374409 on 7f9a19ec failed a single browser e2e test, TestPermissionPrompt::test_allow_deny_buttons_render_and_input_row_hidden[chromium-kiro], while the identical code on fb606468 passed the same job. The test sampled .acp-input-row's computed display once, immediately after .acp-permission-prompt attached; Alpine applies the x-show="!pendingPermission" style on the next tick, so a loaded runner can observe the pre-update state.

What

Replace the one-shot page.evaluate with a bounded page.wait_for_function for 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

…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>
Copilot AI lite review requested due to automatic review settings September 7, 2026 20:49
@NetDevAutomate
NetDevAutomate merged commit 0adeb6c into main Sep 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 bounded page.wait_for_function(...) (3s) to wait until .acp-input-row is hidden while the permission prompt is pending.
  • Add an explicit import/alias for Playwright’s TimeoutError to 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.

@NetDevAutomate
NetDevAutomate deleted the fix/e2e-permission-prompt-race branch September 7, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants