Skip to content

Conversation

@estib-vega
Copy link
Contributor

@estib-vega estib-vega commented Apr 4, 2025


⧓ Review in Butler Review #9GlCFO04s

component-testing

9 commit series (version 1)

Series Commit Title Status Reviewers
9/9 Branch card component tests
8/9 Modal: Test ID
7/9 Branch: Test IDs
6/9 Context menus: Test IDs
5/9 testing: add user-events
4/9 Add a bunch of service mocks
3/9 Create a setup function for component tests
2/9 UI state: export the types for conveniece
1/9 testing: Add test ids

Please leave review feedback in the Butler Review

@vercel
Copy link

vercel bot commented Apr 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitbutler-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 7, 2025 11:57am
gitbutler-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 7, 2025 11:57am

@estib-vega estib-vega marked this pull request as ready for review April 4, 2025 15:17
- Centralize the test IDs into an enum
- Add one for the branch name label component
The component tests sometimes require definition an Resize obeserver, which is not necessarily present in the global object.

Expose a function that defined a stub for that
Add some mocks for the services so that
Add the @testing-library/user-events for better user interaction simulations in tests
The context menus and their items can take in test id strings
- Branch header
- Header context menu & items
- Rename modal
Modals can have test IDs as well, you know?
Just do some simple reactivity tests
@estib-vega estib-vega enabled auto-merge April 7, 2025 11:54
@estib-vega estib-vega merged commit 5d5acb0 into master Apr 7, 2025
18 of 19 checks passed
@estib-vega estib-vega deleted the component-testing branch April 7, 2025 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants