kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Convert setup wizard core unit tests to Vue Testing Library

Open rtibbles opened this issue 9 months ago β€’ 7 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 setup wizard's core flow components (LoadingTaskPage.spec.js, FacilityPermissionsForm.spec.js) currently use @vue/test-utils, which couples tests to component internals.

Related page:

Setup wizard facility permissions form

The Change

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

  • kolibri/plugins/setup_wizard/frontend/views/__tests__/LoadingTaskPage.spec.js
  • kolibri/plugins/setup_wizard/frontend/views/__tests__/FacilityPermissionsForm.spec.js

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

How to Get There

The setup wizard appears on first launch of an unprovisioned Kolibri device. To see it during development, start Kolibri with a fresh KOLIBRI_HOME:

export KOLIBRI_HOME=$(mktemp -d)
pnpm run devserver

Then navigate to http://localhost:8000/.

  • FacilityPermissionsForm appears at step 1 of the "Create a new learning facility" flow (select "Group learning" β†’ name device β†’ "Full device" β†’ "Create a new learning facility")
  • LoadingTaskPage shows a progress indicator while background tasks (like facility import) are running

Acceptance Criteria

  • [ ] LoadingTaskPage.spec.js and FacilityPermissionsForm.spec.js 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 setup_wizard

References

πŸ€– This issue was written with AI assistance, under supervision, review and final edits by @rtibbles πŸ€–

rtibbles avatar Feb 17 '26 00:02 rtibbles

Hii @rtibbles Could you assign this to me ??

rohitt-pandey avatar Feb 17 '26 01:02 rohitt-pandey

I have assigned you.

rtibbles avatar Feb 17 '26 01:02 rtibbles

Thank you for assigning this πŸ™‚ I’ll start working on it and will share updates soon.

rohitt-pandey avatar Feb 17 '26 04:02 rohitt-pandey

@rtibbles kindly check pr #14219

rohitt-pandey avatar Feb 20 '26 16:02 rohitt-pandey

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

m21ahima avatar Apr 01 '26 10:04 m21ahima

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 01 '26 10:04 learning-equality-bot

Thank you @m21ahima, this is already done here https://github.com/learningequality/kolibri/pull/14219, we just forgot to close issue.

MisRob avatar Apr 01 '26 10:04 MisRob