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

In the UI show test report when clicking on a test #6747

Closed
4 tasks done
noam-honig opened this issue Oct 20, 2024 · 10 comments
Closed
4 tasks done

In the UI show test report when clicking on a test #6747

noam-honig opened this issue Oct 20, 2024 · 10 comments
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)

Comments

@noam-honig
Copy link

noam-honig commented Oct 20, 2024

Clear and concise description of the problem

Currently when I use the UI with the --ui flag, when I click a test on the UI nothing happens, there's a button to show the source code - but that's less useful (and also doesn't show the source of the test, just the source of the entire file)
There is an "Open test details" that is available only on the test file level - the same icon on the test level does the "show code" functionality.

Suggested solution

The dream would be to click a test and see why it failed.

When I click on the test in the left panel, show that specific test's report.
If I had my way, the tabs should be "Report" "Console" (also preferrably for the clicked test only) than code and module graph.

Checkout this stackblitz to see my current experience:
https://stackblitz.com/edit/api-test-example-qrjqcu?file=test.spec.ts

Alternative

No response

Additional context

No response

Validations

@jycouet
Copy link

jycouet commented Oct 20, 2024

This would improve the UI and make it more usefull 👍
Thx

@sheremet-va sheremet-va added the p2-to-be-discussed Enhancement under consideration (priority) label Oct 22, 2024
@sheremet-va sheremet-va moved this to P2 - 2 in Team Board Oct 22, 2024
@pav-stastny
Copy link

It was really confusing for me, why clicking in the list does "nothing". Probabyl one small improvement before fully integrationg the suggestion, would be to handle click on list item same as the click on the ICON. Currently there is a cursor hinting interactive list element, but it does nothing.

image

@noam-honig
Copy link
Author

@pav-stastny Yes but :)
on a file line - it opens the report tab, on a test line it opens the code tab (and doesn't even focus on the code for that test)

Quick solution, have it open the report tab for that test or if not possible, for the file.

Thanks

@sheremet-va sheremet-va moved this from P2 - 2 to Approved in Team Board Oct 24, 2024
@sheremet-va sheremet-va added p2-nice-to-have Not breaking anything but nice to have (priority) and removed p2-to-be-discussed Enhancement under consideration (priority) enhancement: pending triage labels Oct 29, 2024
@joshuahhh
Copy link
Contributor

This is especially bad because tests have cursor: pointer, which is supposed to mean the element is clickable, but it's not.

@sheremet-va
Copy link
Member

Fixes by #6900

@AlemTuzlak
Copy link

@sheremet-va Thank you so much for this! When can we expect this to drop? Will it be in v2.x.x or?

@sheremet-va
Copy link
Member

This will be in Vitest 3 which comes out in January

@AlemTuzlak
Copy link

awesome! is it already in the beta that just came out? Would love to try it out

@sheremet-va
Copy link
Member

awesome! is it already in the beta that just came out? Would love to try it out

The beta is out, but this change is not yet released. Should be available later today though

@AlemTuzlak
Copy link

awesome, thank you so much!

@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
Status: Approved
Development

No branches or pull requests

6 participants