Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EREGCSC-2779 -- Vitest fixes #1404

Merged
merged 31 commits into from
Aug 19, 2024
Merged

EREGCSC-2779 -- Vitest fixes #1404

merged 31 commits into from
Aug 19, 2024

Conversation

PhilR8
Copy link
Contributor

@PhilR8 PhilR8 commented Aug 13, 2024

Resolves EREGCSC-2779

Description

The V4 refactor broke some front end tests and made some others obsolete. This PR will remove the unneeded tests and fix the remaining broken tests.

This pull request changes:

  • Adds new Makefile command to run Vitest UI locally
    • make test.vitest.ui
  • Updates test fixtures to reflect updated API responses where necessary
  • Removes unneeded assertions and test suites
  • Removes failing snapshot tests and associated snapshot files
    • Keeps passing snapshot tests for now
  • excludes MSW directory from coverage calculations

Steps to manually verify this change:

  1. Green check marks
  2. Maybe run the Vitest tests locally and see how it looks?
    • make test.vitest.ui

@PhilR8
Copy link
Contributor Author

PhilR8 commented Aug 14, 2024

Closed to free up buckets; will reopen later

Copy link

✨ See the Django Site in action

Copy link

✨ See the Django Site in action

@PhilR8 PhilR8 marked this pull request as ready for review August 15, 2024 18:29
@PhilR8 PhilR8 added the Needs Review This PR needs a code review label Aug 15, 2024
Copy link
Contributor

@cgodwin1 cgodwin1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! make test.vitest.ui works as expected on Linux too

@cgodwin1 cgodwin1 added Approved and removed Needs Review This PR needs a code review labels Aug 16, 2024
@PhilR8 PhilR8 merged commit 1a3841f into main Aug 19, 2024
20 checks passed
peggles2 pushed a commit that referenced this pull request Aug 20, 2024
* chore: light begin JSDoc annotations; clean up vestigial get method

* chore: update getRegSearchResults to use passed in API url

* chore: getSupplementalContent using passed in apiUrl; update locationString to citationString

* chore: update getTitles to need apiUrl param

* chore: getParts cleanup

* chore: clean up statues methods and assoc. JSDoc

* chore: cleanup return

* chore: fix casing issue; continue to refine JSDoc annotations

* chore: continue to update api method params to be objects with keys instead of comma separated values

* chore: further work to add consistency to api method param format

* chore: continue

* chore: update getTitles

* chore: further work

* chore: finish api.js

* chore: finish filters.js

* chore: remove synthetic part that is no longer relevant

* chore: remove some unused methods, update JSDoc annotations, etc

* chore: remove vestigial/unused utility methods

* chore: rebuild package-lock to get vitest to work on new machine

* test: begin updating/fixing vitest unit tests

* test: fix rest of utils unit tests

* test: remove snapshot-only tests in results-item-part

* test: fix getResultLink tests

* test: fix getResultSnippet tests

* test: all tests pass

* test: ignore msw folder for vitest coverage stats

* test: add Vitest UI Make command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants