Improves E2E test reset to dismiss lingering notifications#5103
Improves E2E test reset to dismiss lingering notifications#5103nikolay-1986 merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR prevents an expected unauthenticated background fetch from surfacing as a user-facing error toast, and hardens E2E stability by clearing lingering VS Code notifications between tests.
Changes:
- Suppress
window.showErrorMessageinOrganizationService.getOrganizations()when the failure isAuthenticationRequiredError. - Clear all VS Code notifications as part of
VSCodePage.resetUI()to avoid toasts intercepting pointer events in later E2E steps.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/plus/gk/organizationService.ts |
Avoids showing a toast for expected AuthenticationRequiredError during background organization fetch. |
tests/e2e/pageObjects/vscodePage.ts |
Clears notifications during E2E UI reset to reduce flakiness caused by lingering toasts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🤖 Augment PR SummarySummary: Prevents a user-facing auth error toast when organizations are fetched in the background without an active session. 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds notification dismissal to resetUI() so that stray VS Code toasts (e.g. org auth errors) cannot intercept pointer events in subsequent tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0c7f91a to
92a51e8
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Wraps the notifications.clearAll call in resetUI() with .catch(() => {})
so a missing command registration cannot break test cleanup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
notifications.clearAlltoVSCodePage.resetUI()so stray VS Code toast notifications (e.g. org auth errors triggered by the Home webview) cannot intercept pointer events in subsequent E2E tests.catch(() => {})to prevent a missing command registration from breaking test cleanupRoot Cause
Serial E2E tests share one VS Code worker. When the Home webview is open during smoke tests,
SubscriptionServicetriggersgetOrganizations()on subscription changes — which shows an "Unable to get organizations" toast when no auth session is active. This toast overlaps the editor area and intercepts pointer events, causingblame.test.tsclicks to fail with "subtree intercepts pointer events".The
resetUI()call inbeforeEachnow dismisses all pending notifications, preventing carry-over between tests.Test plan