kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Convert epub viewer navigation button unit tests to Vue Testing Library

Open rtibbles opened this issue 9 months ago • 8 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 epub viewer's navigation buttons (NextButton.spec.js, PreviousButton.spec.js) currently use @vue/test-utils, which couples tests to component internals.

Related page:

Epub viewer showing navigation buttons

The Change

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

  • kolibri/plugins/epub_viewer/frontend/views/__tests__/NextButton.spec.js
  • kolibri/plugins/epub_viewer/frontend/views/__tests__/PreviousButton.spec.js

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

How to Get There

  • Sign in to Kolibri
  • Go to Learn > Library
  • Open any epub/document content (e.g., from the QA Channel)
  • The next/previous buttons appear on the right and left edges of the reader content area

Acceptance Criteria

  • [ ] NextButton.spec.js and PreviousButton.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 epub_viewer

References

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

rtibbles avatar Feb 17 '26 00:02 rtibbles

@rtibbles can you assign this one ?

curiouscoder-cmd avatar Feb 17 '26 02:02 curiouscoder-cmd

Yes, I have assigned you.

rtibbles avatar Feb 17 '26 02:02 rtibbles

hi @curiouscoder-cmd r u still working on this ??

ayushman1210 avatar Feb 23 '26 18:02 ayushman1210

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 Feb 23 '26 18:02 learning-equality-bot

hi @curiouscoder-cmd r u still working on this ??

yes

curiouscoder-cmd avatar Feb 24 '26 07:02 curiouscoder-cmd

@rtibbles have a look i have raise a PR #14237

curiouscoder-cmd avatar Feb 24 '26 17:02 curiouscoder-cmd

Hi @curiouscoder-cmd, there is no need to notify anyone manually. A reviewer will be assigned to your pull request within the next two weeks. Thank you for your work on this! :)

LianaHarris360 avatar Feb 24 '26 18:02 LianaHarris360

Hi @curiouscoder-cmd, there is no need to notify anyone manually. A reviewer will be assigned to your pull request within the next two weeks. Thank you for your work on this! :)

Sure , thankyou for the clarification !

curiouscoder-cmd avatar Feb 24 '26 21:02 curiouscoder-cmd