Repository navigation
fix: flaky "element detached from DOM" in sessions test - #929
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe Cypress e2e test was changed to intercept GET Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Cypress Test
participant Browser as React App (Browser)
participant API as Server API
Test->>Browser: visit /workspace (with intercept registered)
Browser->>API: GET /api/projects/*/agentic-sessions*
API-->>Browser: sessions list response
Test-->>API: wait for intercepted "sessionsList" (15s timeout)
Test->>Browser: assert new-session button visible
Test->>Browser: click new-session button
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@e2e/cypress/e2e/sessions.cy.ts`:
- Around line 84-85: The intercept for sessions ('cy.intercept' with alias
'sessionsList') is registered but no network request is triggered before
'cy.wait('@sessionsList')', so insert a 'cy.visit(...)' to navigate to the
workspace page that triggers the sessions GET request immediately after the
intercept registration and before calling 'cy.wait('@sessionsList')'; ensure the
visited route is the app's workspace/ project page that performs the sessions
fetch so the wait can observe the request.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 04ad1170-7a95-42ef-8b0e-b98c419d376f
📒 Files selected for processing (1)
e2e/cypress/e2e/sessions.cy.ts
07a1c07 to
b64dc64
Compare
Wait for the sessions list API response before clicking the new session button, ensuring React has finished re-rendering with the fetched data. Example failed test: https://github.com/ambient-code/platform/actions/runs/23146894542/job/67237433020 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Martin Prpič <mprpic@redhat.com>
b64dc64 to
d90d899
Compare
|
@Mergifyio queue |
Merge Queue Status
This pull request spent 18 seconds in the queue, including 2 seconds running CI. Required conditions to merge
|
Wait for the sessions list API response before clicking the new session button, ensuring React has finished re-rendering with the fetched data.
Example failed test:
https://github.com/ambient-code/platform/actions/runs/23146894542/job/67237433020