studio icon indicating copy to clipboard operation
studio copied to clipboard

Convert file upload item unit tests to Vue Testing Library

Open MisRob opened this issue 8 months ago • 6 comments

🙂 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 password a
  • 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, screen queries, and userEvent. 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-utils imports 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.

MisRob avatar Apr 02 '26 03:04 MisRob

Hi @MisRob Id like to work on this one

ketan0919 avatar Apr 02 '26 03:04 ketan0919

Thanks @ketan0919

MisRob avatar Apr 02 '26 03:04 MisRob

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!

learning-equality-bot avatar May 11 '26 00:05 learning-equality-bot

hii @MisRob , i would like to contribute

Rajeev529 avatar May 11 '26 08:05 Rajeev529

HI @Rajeev529! Thank you! I have assigned you! Do let us know if you have a questions or comments while workin on the issue

akolson avatar May 11 '26 09:05 akolson

sorry for delay, within last week i create pr. ThankYou

Rajeev529 avatar May 23 '26 16:05 Rajeev529