-
Notifications
You must be signed in to change notification settings - Fork 294
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
Main VariableView test code #4400
Conversation
Note: I'll have to merge up with the eslint change, and fix the xvfb action. But this is a full example of the variable view tests. Have a question or two on this, so would like to get the PR out while fixing the github action. |
@@ -207,6 +207,7 @@ | |||
"VSC_FORCE_REAL_JUPYTER": "true", // Enalbe tests that require Jupyter. | |||
"VSC_JUPYTER_CI_RUN_NON_PYTHON_NB_TEST": "", // Initialize this to run tests again Julia & other kernels. | |||
"VSC_JUPYTER_RUN_NB_TEST": "true", // Initialize this to run notebook tests (must be using VSC Insiders). | |||
"VSC_JUPYTER_WEBVIEW_TEST_MIDDLEWARE": "true", // Initialize to create the webview test middleware |
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.
Add an env var to force on the test middle ware, needed for the middleware VariablesComplete message, and handy to be able to turn on quick just when running VS Code from debugger.
} | ||
|
||
// For our target object wait for a specific message to come in from onMessage function | ||
public async waitForMessage(message: string, options?: WaitForMessageOptions): Promise<void> { |
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.
The waitForMessage implementation here is very close to the existing one in mountedWebView.ts. Figured that interface already existed and was doing the same basic thing so just reused it here with minor changes for not being part of a mountedWebView.
suiteTeardown(() => closeNotebooksAndCleanUpAfterTests(disposables)); | ||
|
||
// Test showing the basic variable view with a value or two | ||
test('Can show VariableView', async function () { |
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.
More tests in the queue. But wanted to get approval here and get one basic test running on CI before adding more.
Codecov Report
@@ Coverage Diff @@
## main #4400 +/- ##
=======================================
- Coverage 75% 65% -10%
=======================================
Files 392 392
Lines 25627 25671 +44
Branches 3661 3669 +8
=======================================
- Hits 19371 16887 -2484
- Misses 4753 7465 +2712
+ Partials 1503 1319 -184
|
For #4355
package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed).