Skip to content

Migrate Coach attendance tests to Vue Testing Library #14816

@rtibbles

Description

@rtibbles

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

Complexity: Low

Context

The test suites for the Coach plugin's attendance components currently use @vue/test-utils, which couples tests to component internals. These test files were added after the original migration sub-issues were scoped, so they aren't covered by any existing sub-issue.

The Change

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

  • kolibri/plugins/coach/frontend/views/attendance/__tests__/AttendanceHistoryPage.spec.js
  • kolibri/plugins/coach/frontend/views/home/HomePage/__tests__/AttendanceBlock.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 coach

References

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions