Skip to content

Commit e1a9b0e

Browse files
authored
Update test plan to match new notebook functionality (microsoft#7879)
* Update test plan * Add news entry
1 parent 4a2a0d5 commit e1a9b0e

File tree

2 files changed

+74
-2
lines changed

2 files changed

+74
-2
lines changed

.github/test_plan.md

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,22 @@ def test_failure():
365365
1. On the first cell click `Run Below`
366366
1. Interactive Window should open, show connection information, and execute cells
367367
1. The first thing in the window should have a line like this: `Jupyter Server URI: http://localhost:[port number]/?token=[token value]`
368+
- [ ] Verify Basic Notebook Editor
369+
1. Create a new file in VS code with the extension .ipynb
370+
1. Open the file
371+
1. The Notebook Editor should open
372+
1. Verify that there is a single cell in the notebook editor
373+
1. Add `print('bar')` to that cell
374+
1. Run the cell
375+
1. Verify that `bar` shows up below the input
376+
1. Add a cell with the topmost hover bar
377+
1. Verify the cell appears above all others
378+
1. Add a cell at the bottom with the bottom most hover bar
379+
1. Verify the cell appears below all cells
380+
1. Select a cell
381+
1. Add a cell with the plus button on the cell
382+
1. Verify cell appears below
383+
1. Repeat with the topmost toolbar
368384
- [ ] Verify basic outputs
369385
1. Run all the cells in manualTestFile.py
370386
1. Check to make sure that no outputs have errors
@@ -374,8 +390,8 @@ def test_failure():
374390
1. Choose a file location and save the generated .ipynb file
375391
1. When the prompt comes up in the lower right choose to open the file in the browser
376392
1. The file should open in the web browser and contain the output from the Interactive Window
377-
1. In VSCode open up the exported .ipynb file in the editor, when the prompt for `Do you want to import the Jupyter Notebook into Python code?` appears click import
378-
1. The imported file should match the original python file
393+
1. Try the same steps and choose to open the file in the ipynb editor.
394+
1. The file should open in the Notebook Editor.
379395
- [ ] Verify text entry
380396
1. In the Interactive Window type in some new code `print('testing')` and submit it to the Interactive Windows
381397
1. Verify the output from what you added
@@ -388,6 +404,11 @@ def test_failure():
388404
1. Sort the list ascending and descending by Type. Also sort the list ascending and descending by Count. Values like (X, Y) use the first X value for Count sort ordering
389405
1. Check that list, Series, ndarray, and DataFrame types have a button to "Show variable in data viewer" on the right
390406
1. In the Interactive Window input box add a new variable. Verify that it is added into the Variable Explorer
407+
1. Export the contents of the interactive window as a notebook and open the notebook editor
408+
1. Find the first cell and click on the Run Below button
409+
1. Open the variable explorer and verify the same variables are there
410+
1. Add a new cell with a variable in it.
411+
1. Run the cell and verify the variable shows up in the variable explorer
391412
- [ ] Verify Data Explorer
392413
1. From the listed types in the Variable explorer open up the Data Viewer by clicking the button or double clicking the row
393414
1. Inspect the data in the Data Viewer for the expected values
@@ -400,6 +421,52 @@ def test_failure():
400421
1. In one of the numerical columns input a number 1 - 9 to filter to just that column
401422
1. Open the myList variable in the explorer
402423
1. Make sure that you can scroll all the way to the end of the entries
424+
[ ] Verify notebook outputs
425+
1. Open the src/test/datascience/manualTestFiles/manualTestFile.py in VSCode.
426+
1. Run all of the cells in the file.
427+
1. Interactive Window should open
428+
1. Export the cells in the interactive window and open the notebook editor
429+
1. Run all the cells in the notebook editor and verify the same outputs appear as in the interactive window
430+
- [ ] Verify Notebook Editor Intellisense
431+
1. Open the src/test/datascience/manualTestFiles/manualTestFile.py in VSCode.
432+
1. Run all of the cells in the file.
433+
1. Interactive Window should open
434+
1. Export the cells in the interactive window and open the notebook editor
435+
1. Hover over each cell in the notebook editor and verify you get hover intellisense
436+
1. Add a new cell in between cells
437+
1. Add `import sys` and `sys.executable` to the cell
438+
1. Move the cell around and verify intellisense hover still works on the `import sys`
439+
1. Delete and readd the cell and verify intellisense hover still works.
440+
- [ ] Verify Notebook Keyboard Shortcuts
441+
1. Using the notebook generated from the manualTestFile.py, do the following
442+
1. Select a cell by clicking on it
443+
1. Move selection up and down with j,k and arrow keys.
444+
1. Focus a cell by double clicking on it or hitting the enter key when selected
445+
1. Move selection through the code with the arrow keys.
446+
1. Verify selection travels between focused cells
447+
1. Hit escape when a cell has focus and verify it becomes selected instead of focused
448+
1. Hit `y` on a markdown cell when not focused and see that it becomes a code cell
449+
1. Hit `m` on a code cell when not focused and see that it becomes a markdown cell
450+
1. Hit `l` on a code cell and verify line numbers appear
451+
1. Hit `o` on a code cell with output and verify that outputs disappear
452+
1. Hit `d` + `d` and verify a cell is deleted.
453+
1. Hit `z` and verify a deleted cell reappears
454+
1. Hit `a` and verify the selected cell moves up
455+
1. Hit `b` and verify the selected cell moves down
456+
1. Hit `shift+enter` and verify a cell runs and selection moves to the next cell
457+
1. Hit `alt+enter` and verify a cell runs and a new cell is added below
458+
1. Hit `ctrl+enter` and verify a cell runs and selection does not change
459+
- [ ] Verify debugging
460+
1. Open the file src/test/datascience/manualTestFiles/manualTestFile.py in VSCode
461+
1. On the first cell click `Run Below`
462+
1. Interactive Window should open, show connection information, and execute cells
463+
1. Go back to the first cell and click `Debug Cell`
464+
1. Debugger should start and have an ip indicator on the first line of the cell
465+
1. Step through the debugger.
466+
1. Verify the variables tab of the debugger shows variables.
467+
1. Verify the variables explorer window shows output not available while debugging
468+
1. When you get to the end of the cell, the debugger should stop
469+
1. Output from the cell should show up in the Interactive Window (sometimes you have to finish debugging the cell first)
403470

404471
#### P1 Test Scenarios
405472
- [ ] Connect to a `remote` server
@@ -478,6 +545,10 @@ def test_failure():
478545
- [ ] Verify results
479546
1. Output should show up on the Guest Interactive Window
480547
1. Same output should show up in the Host Interactive Window
548+
1. Export the file to a notebook
549+
1. Open the notebook editor on the host
550+
1. Run a cell on the host
551+
1. Verify the editor opens on the guest and the cell is run there too
481552

482553
#### P2 Test Scenarios
483554
- [ ] Directory change

news/3 Code Health/7593.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test plan needed to be updated to include support for the Notebook Editor.

0 commit comments

Comments
 (0)