Convert file upload item unit tests to Vue Testing Library
🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:
- Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
- Confirm that you’ve read the guidelines in your comment.
Overview
Complexity: Low
Context
See https://github.com/learningequality/studio/issues/5789
The Change
Refactor channelEdit/views/files/__tests__/fileUploadItem.spec.js test suite to use Vue Testing Library (VTL) and write tests in a way that reflects how a user interacts with the application. In the pull request description, include a screenshot or screen recording of the feature covered by these tests.
How to Get There
- Login as
[email protected]with passworda - Go to Channels > My Channels > Published Channel
- Go to Sample Document > Edit details
- Interact with Files section
Out of Scope
Do not refactor any other areas of the codebase.
Acceptance Criteria
- [ ] Cover all major workflows while avoiding excessive testing of details
- [ ] Pull request description includes a screenshot or screen recording of the feature covered by these tests
- [ ] Concise but explicit test descriptions that describe what's tested from a user point of view
- [ ] Migrated tests should use
render,screenqueries, anduserEvent. Follow Testing Library principles and Testing Library query priority recommendation - [ ] Follow our Unit testing guide and Testing template, where you will also find how we mock router, store, composables, and more.
- [ ] No residual
@vue/test-utilsimports should remain in migrated files - [ ] All migrated tests must pass
pnpm test <filename>
References
Sub-issue of https://github.com/learningequality/studio/issues/5789
AI usage
Issue drafted & iteratively adjusted in collaboration with Claude. Final version carefully reviewed by @MisRob.
Hi @MisRob Id like to work on this one
Thanks @ketan0919
Automatically unassigning @ketan0919 due to no comments here, or updates on the associated pull request for 1 month. @ketan0919, if you're still interested in this issue or already have work in progress, please message us here, and we'll assign you again. Thank you!
hii @MisRob , i would like to contribute
HI @Rajeev529! Thank you! I have assigned you! Do let us know if you have a questions or comments while workin on the issue
sorry for delay, within last week i create pr. ThankYou