Skip to content

Conversation

@sharma-anushka
Copy link

Summary

Converted Content Library (CatalogFilterBar) unit tests from Vue Test Utils to Vue Testing Library.

Key Changes

  • Replaced mount() and wrapper.vm usage with Vue Testing Library’s render() and semantic queries
  • Removed direct calls to component methods (resetKeywords, resetCoach, removeLanguage)
  • Tests now simulate real user interactions (clicking buttons and filter chips)
  • Router state is validated through actual navigation updates instead of manual mutation
  • Eliminated assertions on internal computed state (currentFilters)
  • Improved test resilience by asserting only user-observable behavior

Test Coverage

  • Clear all filters via UI interaction
  • Remove text-based filters (keywords)
  • Remove boolean-based filters (coach)
  • Remove list-based filters incrementally (languages)
  • Ensure unrelated query parameters remain unaffected

References

closes #5649

Verification

Ran pnpm test -- catalogFilterBar.spec.js

Pasted Graphic

@learning-equality-bot
Copy link

👋 Thanks for contributing!

We will assign a reviewer within the next two weeks. In the meantime, please ensure that:

  • You ran pre-commit locally
  • All issue requirements are satisfied
  • The contribution is aligned with our Contributing guidelines. Pay extra attention to Using generative AI. Pull requests that don't follow the guidelines will be closed.

We'll be in touch! 😊

@MisRob
Copy link
Member

MisRob commented Jan 20, 2026

Hi @sharma-anushka - Files Changed tab is showing 56 changed files which I believe wasn't intended. Can you have a look?

@sharma-anushka
Copy link
Author

Yes @MisRob, I think I have forgotten to drop the changes from the other issue, Ill soon revert with only the intended changes. Sorry for the inconvenience.

@MisRob
Copy link
Member

MisRob commented Jan 20, 2026

No problem @sharma-anushka , can happen. Thanks!

@sharma-anushka
Copy link
Author

sharma-anushka commented Jan 20, 2026

Hi @MisRob, Ive dropped the changes from the issue #5645. You may have a look.

@MisRob MisRob changed the title Fix issue 5649 [Remove Vuetify from Studio] Convert content library filter bar unit tests to Vue Testing Library Jan 21, 2026
@MisRob
Copy link
Member

MisRob commented Jan 21, 2026

Hi @sharma-anushka, thank you! Before we assign a maintainer, I will first invite the community.

@MisRob
Copy link
Member

MisRob commented Jan 21, 2026

📢 ✨ Community Review guidance for both authors and reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Remove Vuetify from Studio] Convert content library filter bar unit tests to Vue Testing Library

2 participants