-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Group by document and not editor #382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but please add a test
Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
Almost every action uses this code so it's already thoroughly tested. Was there any thing in particular you want to me to test? |
To my knowledge, we have no tests that operate on two editors with the same document, which is what this PR is supposed to fix. Would be good to have a test for that |
To my knowledge we can't do tests on multiple editors with our recorded tests framework. The code changes are used by almost every single action so we have regression testing. The issue with multiple editors for the same document is tested manually and I have no idea how to write a test for that. |
Yeah you can't use test case recorder but it shouldn't be too bad. Have a look at eg https://github.com/pokey/cursorless-vscode/blob/14749f4f42b30fe8c7f7c9906ce79138982b0b2e/src/test/suite/backwardCompatibility.test.ts#L21-L36 |
The only way to open the same document in multiple editors is to actually open a file on disk. A bit problematic on running unit tests isn't it? |
Can just make a temp file |
Of course true. I might have a look at that when I have some time over. I'm tempted to just merge this one and then create an issue about the missing test. |
@pokey Test added. I took special care to make sure that the hats are now in different editors of the same document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome test thank you! Left a tiny nit but otherwise looks great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
fixes #316