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

Vitest UI: file filter display inconsistent with re-run test cases #4735

Closed
6 tasks done
hi-ogawa opened this issue Dec 12, 2023 · 0 comments · Fixed by #4736
Closed
6 tasks done

Vitest UI: file filter display inconsistent with re-run test cases #4735

hi-ogawa opened this issue Dec 12, 2023 · 0 comments · Fixed by #4736

Comments

@hi-ogawa
Copy link
Contributor

hi-ogawa commented Dec 12, 2023

Describe the bug

File filter display seems inconsistent with what's re-run when filtering and also with the count in the label.

Here is a reproduction https://stackblitz.com/edit/vitest-dev-vitest-m3inyx
(no change from the original template https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/react-testing-lib)

  • Search by "count"
  • File list shows only useCounter.test.ts but with a label "Pass (2)"
  • Press "Rerun filtered" and see useCounter.test.ts and App.test.ts are executed in the terminal

Note that App.test.ts includes test case named should increment count on click and I assumed matching the test suite/case names is an intended behavior since that's the feature introduced in #1035.

Reveal screenshot

image


I think the issue is due to TaskTree is hiding TaskItem by unnecessary condition when used from TasksList while TasksList already applies filter to hide TaskTree:

<TaskItem
v-if="!search || caseInsensitiveMatch(task.name, search)"

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-m3inyx

System Info

(stackblitz)

Used Package Manager

npm

Validations

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant