chore: add data-testid attributes to workspace home, sidebar, and app shell (#1044)#1055
Merged
sw-factory-automations merged 1 commit intoMay 12, 2026
Merged
Conversation
… shell (#1044) Co-authored-by: Ona <no-reply@ona.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
[shepherd] CI has been pending for >30 minutes — the |
Collaborator
Author
|
✅ Post-merge verification skipped — |
Collaborator
Author
|
✅ UI verification passed — design spec compliance confirmed. Summary:
|
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.
Closes #1044
What
Adds
data-testidattributes to key interactive elements in workspace home, sidebar, and app shell components. Updates 25 E2E test files to preferdata-testidselectors over broadgetByRoleselectors.Why
E2E tests outside the database domain relied on role-based selectors without scoping to a specific container. When new UI elements were added, these selectors matched multiple elements causing "strict mode violation" errors (root cause of #1042, #998, #916, #835, #780).
Changes
Component attributes added:
workspace-home.tsx—wh-header,wh-new-page-btn,wh-new-database-btn,wh-filter-input,wh-sort-dropdown,wh-recently-visited,wh-all-pages,wh-page-item-{id},wh-recent-item-{id}sidebar/page-tree.tsx—sb-page-tree,sb-new-page-btn,sb-new-database-btnsidebar/app-sidebar.tsx—as-sidebar,as-sidebar-togglesidebar/app-shell.tsx—as-shellsidebar/workspace-switcher.tsx—as-workspace-switchersidebar/page-search.tsx—as-search-inputsidebar/user-menu.tsx—as-user-menuE2E test updates (25 files):
Replaced
getByRole("button", { name: /new page/i })→getByTestId("sb-new-page-btn")and similar for all workspace-home and sidebar selectors across: workspace-home, workspace-home-mobile-header, workspace-home-new-database, page-crud, favorites, trash, search, accessibility, sidebar-responsive, mobile-responsive, and 15 database test files.Testing
pnpm lint— 0 errorspnpm typecheck— cleanpnpm test— 1877 tests passed (139 files)