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

Dynamic test play button in text window stops working when spaces are added to a test name that did not previously have them #728

Closed
jimasp opened this issue Oct 22, 2022 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@jimasp
Copy link

jimasp commented Oct 22, 2022

When adding spaces to the start of the test line, the dynamic test play button in text window can sometimes stop functioning for a test, while the test window play button continues to work for the same test.

This is evident when using the simple test-provider-sample, if you make a single change to the sample code:

change this line in parser.ts:
const testRe = /^([0-9]+)\s*([+*/-])\s*([0-9]+)\s*=\s*([0-9]+)/;
to this:
const testRe = /^\s*([0-9]+)\s*([+*/-])\s*([0-9]+)\s*=\s*([0-9]+)/;

Now if you fire up the extension host, and add spaces to the front of a test line, you would expect the test to still work.
And it does, from the testing window, but the dynamic play button inside the text window stops functioning.

Notes:
If instead of typing spaces, you copy/paste the text with spaces, the text window play button will start working again.
If you save, close and open the text window, the text window play button will start working again.
If when you open the test file, it already has spaces in front of the test, and you add more spaces, the test window play button will continue work until you remove all spaces, then if you add spaces again it will stop working.

68 sec gif showing the problem:
https://github.com/jimasp/public-misc/blob/main/sample-1666430441223.gif

@jimasp jimasp changed the title Dynamic test play button in text window stops working when spaces are added to a test Dynamic test play button in text window stops working when spaces are added to a test name that did not previously have them Oct 23, 2022
@connor4312 connor4312 added the bug Issue identified by VS Code Team member as probable bug label Nov 5, 2022
@connor4312
Copy link
Member

It looks like this has since been fixed, thanks for the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants
@jimasp @connor4312 and others