-
Notifications
You must be signed in to change notification settings - Fork 286
Comments
[Remove Vuetify from Studio] Convert collection modal tests to Vue Testing Library#5694
[Remove Vuetify from Studio] Convert collection modal tests to Vue Testing Library #5694SheikhZaeem wants to merge 2 commits intolearningequality:unstable from
Conversation
👋 Thanks for contributing!
We will assign a reviewer within the next two weeks. In the meantime, please ensure that:
- You ran
pre-commitlocally - All issue requirements are satisfied
- The contribution is aligned with our Contributing guidelines. Pay extra attention to Using generative AI. Pull requests that don't follow the guidelines will be closed.
We'll be in touch! 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assertion depends on the exact validation copy. If the message changes but the validation behavior stays the same, this test will fail unnecessarily.
My suggestion is to assert the validation state instead (for example via a semantic role).
expect(screen.getByRole('alert')).toBeInTheDocument();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same I wanted to apply here .
expect(screen.getByRole('dialog')).toBeInTheDocument();
@AllanOXDi
AllanOXDi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @SheikhZaeem, I have left some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this only checks that the route changes, it never asserts that updateChannelSet or add/removeChannels is invoked with the updated name. Think about where we navigate away without persisting would still pass. Consider asserting the action call, maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only create-related check is the "required name" validation, so regressions in commitChannelSet/$router.replace could slip by unnoticed. Adding a success-case test would be ideal as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also test for for channel items
SheikhZaeem
commented
Feb 16, 2026
Thanks for the reviews, I will make the necessary changes soon
b8adaee to
5abe5b7
Compare
SheikhZaeem
commented
Feb 17, 2026
@AllanOXDi I made the relevant changes according to your review, can you check and let me know.
Summary
Refactored channelSetModal.spec.js to use Vue Testing Library and focus on user-facing behavior instead of component internals.
Ran
pnpm test -- channelList/views/ChannelSet/tests/channelSetModal.spec.js
Ref:
Screenshot 2026年02月08日 at 5 21 16 PM
Closes : #5686