Skip to content

Migrate Device auth and task panel tests to Vue Testing Library #14265

@rtibbles

Description

@rtibbles

🙂 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 PIN authentication modal and task panel 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 these components:

  • kolibri/plugins/device/frontend/views/__tests__/PinAuthenticationModal.spec.js
  • kolibri/plugins/device/frontend/views/ManageTasksPage/__tests__/TaskPanel.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 🤖

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions