kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Migrate Device transfer modal tests to Vue Testing Library

Open rtibbles opened this issue 9 months ago • 14 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

The test suites for the Device plugin's transfer source selection modals currently use @vue/test-utils, which couples tests to component internals.

The Change

Refactor these test files to use Vue Testing Library (VTL) and write tests that reflect how a user interacts with transfer modals:

  • kolibri/plugins/device/frontend/views/__tests__/SelectDriveModal.spec.js
  • kolibri/plugins/device/frontend/views/__tests__/SelectTransferSourceModal.spec.js

Do not refactor any other test files or areas of the codebase.

Acceptance Criteria

  • [ ] Both files migrated to use @testing-library/vue
  • [ ] No residual @vue/test-utils imports in migrated files
  • [ ] Cover all major workflows while avoiding excessive testing of details
  • [ ] Concise but explicit test descriptions that describe what's tested from a user point of view
  • [ ] Follow Testing Library principles and Testing Library query priority recommendation
  • [ ] Use patterns consistent with existing VTL test suites (search for from '@testing-library/vue')
  • [ ] All migrated tests pass: pnpm run test-jest -- --testPathPattern device

References

🤖 This issue was written with AI assistance, under supervision, review and final edits by @rtibbles 🤖

rtibbles avatar Feb 26 '26 17:02 rtibbles

sir, please assign this issue to me , i want to work on this issue @rtibbles

MANDEep22332 avatar Mar 07 '26 04:03 MANDEep22332

i work on the similar issue before this

MANDEep22332 avatar Mar 07 '26 04:03 MANDEep22332

I have assigned you.

rtibbles avatar Mar 07 '26 05:03 rtibbles

Hi @MANDEep22332, Are you still actively working on this issue? I’d be happy to help or take this forward if it’s free.

abhicodes0324 avatar Mar 17 '26 14:03 abhicodes0324

can i work on this issue?

sebinbabu5555 avatar Mar 24 '26 17:03 sebinbabu5555

/assign

HiddendarkViper07 avatar Mar 26 '26 12:03 HiddendarkViper07

I have assigned you.

Hi @rtibbles , I’d like to be assigned this issue.

I noticed that there hasn’t been any progress over the past 3 weeks from @MANDEep22332's side, so I would love to work on it if that’s okay.

I’m also applying for GSoC 2026 for the "Introduce user-generated UI themes" project. I’ve already set up Kolibri locally on WSL2 and have been exploring the Device plugin, since my proposed Theme model extends DeviceSettings. Working on this issue would really help me better understand the Device plugin’s component structure.

I’m familiar with Vue 2.x, Vuex, and Jest. @rtibbles , I’d be very grateful if you could assign this to me.

soaebhasan12 avatar Mar 30 '26 14:03 soaebhasan12

Hey @MANDEep22332 , just checking to see if you are still working on this? I finished the PDF viewer VTL migration, so I'd be glad to pick this up if you're busy with other stuff. Let me know !!!

rohitt-pandey avatar Apr 04 '26 07:04 rohitt-pandey

Hi! 👋

Thanks so much for your interest! This issue is already assigned. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. If there are no unassigned 'help wanted' issues available, please wait until new ones are added.

We really appreciate your willingness to help. 😊

Are you preparing for Google Summer of Code? See our GSoC guidelines.

learning-equality-bot avatar Apr 04 '26 07:04 learning-equality-bot

The assignee didn't reply for weeks ~ I will go ahead and assign @soaebhasan12 who asked next recently. Thank you.

MisRob avatar Apr 06 '26 06:04 MisRob

Thanks mam, for assigning this issue to me. I will start working on it.

On Mon, 6 Apr, 2026, 12:06 pm Michaela Robosova, @.***> wrote:

Assigned #14263 https://github.com/learningequality/kolibri/issues/14263 to @soaebhasan12 https://github.com/soaebhasan12.

— Reply to this email directly, view it on GitHub https://github.com/learningequality/kolibri/issues/14263#event-24216186280, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCPLQL5P3PZD47ZMFKBVIY34UNGABAVCNFSM6AAAAACWA2BFSWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMRUGIYTMMJYGYZDQMA . You are receiving this because you were assigned.Message ID: @.***>

soaebhasan12 avatar Apr 06 '26 07:04 soaebhasan12

I have started working on the migration. I will submit a PR soon. @MisRob

soaebhasan12 avatar Apr 07 '26 17:04 soaebhasan12

Hi @MisRob , I am working on this issue. I have started migrating SelectDriveModal.spec.js to Vue Testing Library.

Progress so far:

  • Removed all @vue/test-utils imports
  • Set up renderComponent helper using @testing-library/vue
  • 3 tests passing so far

Will complete remaining tests and submit PR soon.

soaebhasan12 avatar Apr 08 '26 15:04 soaebhasan12

I have migrated both test files to the Vue testing library:

  • SelectDriveModal.spec.js — 9 tests migrated

  • SelectTransferSourceModal.spec.js — 2 tests migrated

All tests passed: Test Suite: 19 passes, total 19 Test: 461 passes, total 461

Now I will send a pull request. Please let me know if anything needs to be changed before doing this.

soaebhasan12 avatar Apr 09 '26 09:04 soaebhasan12