vscode-codeql icon indicating copy to clipboard operation
vscode-codeql copied to clipboard

Add tests of MethodModelingViewProvider.viewLoaded

Open robertbrignull opened this issue 11 months ago • 0 comments

This PR is trying to add tests that would have caught the bug fixed in https://github.com/github/vscode-codeql/pull/3439

To do this we need to initialize a MethodModelingViewProvider and send it a "viewLoaded" message. Then we can test that it does the right thing in various ModelingStore states. I believe the only thing the test can verify is what messages are sent to the webview.

I've focussed on what it does when the view is first loaded and haven't tried to add tests for all the other behaviours of MethodModelingViewProvider. We could add more tests later if we think that would be useful.

Checklist

  • [ ] CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • [ ] Issues have been created for any UI or other user-facing changes made by this pull request.
  • [ ] [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

robertbrignull avatar Mar 07 '24 10:03 robertbrignull