You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(visualization): fix flaky mapTreeView E2E test in CI (#4386)
Add explicit waitForSelector before opening context menu to ensure element is fully rendered and interactive. This prevents race conditions in CI environments where folder expansion and Angular change detection take longer than local development.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Christian Hühn <christian.huehn@maibornwolff.de>
Co-authored-by: Claude <noreply@anthropic.com>
Fix the flaky E2E test "NodeContextMenu path should remain marked when hovering over another mapTreeView Element" that fails in CI due to race condition when waiting for child elements after folder expansion.
11
+
12
+
## Tasks
13
+
14
+
### 1. Add explicit wait in openContextMenu method
15
+
- Add `waitForSelector` with increased timeout (15s) before clicking element
16
+
- Ensures element is fully rendered and interactive before attempting context menu action
17
+
- Fixes race condition where child elements aren't ready after folder expansion in CI environments
18
+
19
+
### 2. Verify fix doesn't break existing tests
20
+
- Run all mapTreeView E2E tests locally
21
+
- Confirm both test cases still pass
22
+
23
+
## Steps
24
+
25
+
-[x] Create plan
26
+
-[x] Add explicit wait in openContextMenu method
27
+
-[x] Update plan state to complete
28
+
29
+
## Notes
30
+
31
+
- Root cause: In CI environments, folder expansion triggers Angular change detection and CSS layout updates that take longer than the current 100ms buffer
32
+
- The `clickButtonOnPageElement` helper has a 10s timeout, but the element might not exist yet when that's called
33
+
- Adding the wait inside `openContextMenu` fixes it for all callers, not just this specific test
0 commit comments