Skip to content

Commit f981ed3

Browse files
maskarbclaude
andauthored
fix(e2e): wait for Unleash before running tests (#869)
## Summary - E2E tests fail on `main` with `cy.click() failed because the page updated` — the "New Session" button gets detached from the DOM by continuous React re-renders - Root cause: the frontend retries failed Unleash connections, triggering re-render loops when Unleash is still starting (DB migration, pod restarts) - Fix: add `kubectl wait` for the Unleash deployment in `wait-for-ready.sh` so all services are stable before tests begin ## Test plan - [x] Reproduced failure locally on fresh Kind cluster without fix (100% failure rate) - [x] Verified fix: fresh Kind cluster with Unleash wait → 57/57 tests passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 07d50e5 commit f981ed3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

e2e/scripts/wait-for-ready.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ kubectl wait --for=condition=available --timeout=300s \
2222
deployment/frontend \
2323
-n ambient-code
2424

25+
# Wait for Unleash (feature flags - frontend retries on connect failure cause re-render loops)
26+
echo "⏳ Waiting for unleash..."
27+
kubectl wait --for=condition=available --timeout=300s \
28+
deployment/unleash \
29+
-n ambient-code 2>/dev/null || echo "⚠️ Unleash not deployed (feature flags disabled)"
30+
2531
# Wait for MinIO (required for session state persistence)
2632
echo "⏳ Waiting for minio..."
2733
kubectl wait --for=condition=available --timeout=300s \

0 commit comments

Comments
 (0)