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

[BUG] "testing.openTesting": "openOnTestFailure" opens the Test Results viewlet every test suite run, instead of only on failures #1118

Closed
GeorgeWL opened this issue Feb 21, 2024 · 3 comments · Fixed by #1119

Comments

@GeorgeWL
Copy link

Describe the bug
I tried setting "testing.openTesting": "openOnTestFailure" and the Test Results viewlet still opens every time, instead of only on failures

To Reproduce
Steps to reproduce the behavior:

  1. Go to VS code settings
  2. Set "testing.openTesting": "openOnTestFailure"
  3. Trigger tests on a test suite that is all successful years
  4. The test results viewlet displays when it shouldn't do

Note: A sample repo will help us identify the bug much faster. 🙏

Expected behavior
A clear and concise description of what you expected to happen.
Viewlet only opens on failures, if all are successful, no Test Results viewlet is shown

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • vscode-jest version: LTS
  • node -v: LTS
  • npm -v or yarn --version: LTS
  • jest or react-scripts (if you haven’t ejected) version: LTS
  • your vscode-jest settings:
    • jest.jestCommandLine? yarn test
    • jest.runMode? on-save
    • jest.outputConfig? [e.g., none]
    • anything else that you think might be relevant? [e.g., none]
  • Operating system: Windows 11

Prerequisite

  • are you able to run jest from the command line? Yes
  • where do you run jest CLI from? Monorepo folder for specific subprojects
  • how do you run your tests from the command line? yarn test

Additional context
Add any other context about the problem here.


The fastest (and the most fun) way to resolve the issue is to submit a pull request yourself. If you are interested, please check out the contribution guide, we look forward to seeing your PR...

@GeorgeWL GeorgeWL changed the title [BUG] [BUG] "testing.openTesting": "openOnTestFailure" and opens Test Results viewlet every time, instead of only on failures Feb 21, 2024
@GeorgeWL GeorgeWL changed the title [BUG] "testing.openTesting": "openOnTestFailure" and opens Test Results viewlet every time, instead of only on failures [BUG] "testing.openTesting": "openOnTestFailure" opens the Test Results viewlet every test suite run, instead of only on failures Feb 21, 2024
@GeorgeWL
Copy link
Author

#1111 (comment)

@GeorgeWL
Copy link
Author

#1119 seems to have mostly fixed it, my only curiosity, is there a way to have it auto-close when tests begin succeeding again, or is that not something the vscode API gives access to?

@connectdotz
Copy link
Collaborator

is there a way to have it auto-close when tests begin succeeding again

Yes, there is a command to close the panel, but neither vscode nor this extension implemented the auto "closing" logic.

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 a pull request may close this issue.

2 participants