fix(e2e): authenticate before testing sidebar visibility#1236
Merged
xuyushun441-sys merged 2 commits intomainfrom Apr 14, 2026
Merged
fix(e2e): authenticate before testing sidebar visibility#1236xuyushun441-sys merged 2 commits intomainfrom
xuyushun441-sys merged 2 commits intomainfrom
Conversation
The sidebar-text-visibility E2E tests failed because the MSW mock environment returns auth.enabled: true, causing AuthGuard to redirect to the login page where no sidebar exists. - Add e2e/helpers/auth.ts with registerAndLogin() that signs up a test user via the register form UI - Update sidebar-text-visibility.spec.ts to authenticate first - Increase sidebar locator timeouts for post-auth rendering - Update CHANGELOG.md Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/c7f8c74c-dbbe-431a-b308-c1062554bbcd Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/c7f8c74c-dbbe-431a-b308-c1062554bbcd Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
hotlong
April 14, 2026 09:43
View session
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sidebar E2E tests fail because MSW mock environment has
AuthPluginregistered → discovery returnsauth.enabled: true→AuthGuardredirects to/login→ no sidebar in DOM.Changes
e2e/helpers/auth.ts— NewregisterAndLogin(page)helper that signs up a test user via the register form UI and waits for redirect to/homee2e/sidebar-text-visibility.spec.ts— Both tests callregisterAndLogin()before asserting sidebar state. Removed the redundantpage.goto()after auth (full page reload re-initializes MSW handlers, wiping the in-memory session)CHANGELOG.md— Documented fixKey subtlety: MSW auth state lives in module-scope variables (
currentSessioninauthHandlers.ts), so anypage.goto()that triggers a full reload re-runsstartMockServer()and resets session tonull.