Skip to content

Refactored the tests on fileUpoadItem.spec.js to Vue Testing Library …#6010

Open
harrisonoakess wants to merge 1 commit into
learningequality:unstablefrom
harrisonoakess:5811-fileuploaditem-vtl-tests
Open

Refactored the tests on fileUpoadItem.spec.js to Vue Testing Library …#6010
harrisonoakess wants to merge 1 commit into
learningequality:unstablefrom
harrisonoakess:5811-fileuploaditem-vtl-tests

Conversation

@harrisonoakess

Copy link
Copy Markdown

Summary

Refactored channelEdit/views/files/tests/fileUploadItem.spec.js to use Vue Testing Library (VTL). Tests are rewritten to reflect how a user interacts with the file upload feature rather than testing implementation details.

References

Closes #5811
Sub-issue of #5789

Reviewer guidance

Ran the docker instance and verified the upload process.
Ran 'pnpm test fileUploadItem' and passed 1/1 test suites and 9/9 tests in 2.5 s
Code changes should not affect UI, these changes are only tests
The tests make sure the upload files section works correctly. channels --> my channels --> click on the channel card or create a new channel) --> Add --> Upload files

AI usage

I used Claude Code for some code generation and final review. For the code I wrote, I had Claude Code review. For the code that Claude wrote, I reviewed the code, made edits, and removed excessive lines.

I am new to open-source contribution, so let me know if you have any suggestions.

@learning-equality-bot

Copy link
Copy Markdown

👋 Hi @harrisonoakess, thanks for contributing!

For the review process to begin, please verify that the following is satisfied:

  • Contribution is aligned with our contributing guidelines

  • Pull request description has correctly filled AI usage section & follows our AI guidance:

    AI guidance

    State explicitly whether you didn't use or used AI & how.

    If you used it, ensure that the PR is aligned with Using AI as well as our DEEP framework. DEEP asks you:

    • Disclose — Be open about when you've used AI for support.
    • Engage critically — Question what is generated. Review code for correctness and unnecessary complexity.
    • Edit — Review and refine AI output. Remove unnecessary code and verify it still works after your edits.
    • Process sharing — Explain how you used the AI so others can learn.

    Examples of good disclosures:

    "I used Claude Code to implement the component, prompting it to follow the pattern in ComponentX. I reviewed the generated code, removed unnecessary error handling, and verified the tests pass."

    "I brainstormed the approach with Gemini, then had it write failing tests for the feature. After reviewing the tests, I used Claude Code to generate the implementation. I refactored the output to reduce verbosity and ran the full test suite."

Also check that issue requirements are satisfied & you ran pre-commit locally.

Pull requests that don't follow the guidelines will be closed.

Reviewer assignment can take up to 2 weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert file upload item unit tests to Vue Testing Library

1 participant