The progress bar falls about laughing in the face of a "Re-Run" when there were no failed tests. This is because it believes the number of tests to run are what project.find_tests returns as a count, but that will return 0 if there were no failed tests. It also returns no labels to restrict the test run to so the executor will run all tests.
Either Re-Run needs to be disabled in the face of no failures, or the above count issue needs to be addressed. I'd suggest disabling the button and re-labelling it "Re-Run Failures".
Similarly the "Run Selected" button should be disabled if there are no selected tests.
I'm also looking to add a binding for to (re-)run tests which will execute tests as though the user pressed the "Re-Run", or "Run Selected", or "Run All" button depending on the current state of the runner (ie. whether there are any failed tests, or any selected tests otherwise all tests.) It would highlight the active button in some way.
The progress bar falls about laughing in the face of a "Re-Run" when there were no failed tests. This is because it believes the number of tests to run are what project.find_tests returns as a count, but that will return 0 if there were no failed tests. It also returns no labels to restrict the test run to so the executor will run all tests.
Either Re-Run needs to be disabled in the face of no failures, or the above count issue needs to be addressed. I'd suggest disabling the button and re-labelling it "Re-Run Failures".
Similarly the "Run Selected" button should be disabled if there are no selected tests.
I'm also looking to add a binding for to (re-)run tests which will execute tests as though the user pressed the "Re-Run", or "Run Selected", or "Run All" button depending on the current state of the runner (ie. whether there are any failed tests, or any selected tests otherwise all tests.) It would highlight the active button in some way.