Merge pull request #166512 from amunger/integrationTest

Don't rely on notebook focus when adding cells
This commit is contained in:
Aaron Munger
2022-11-16 14:58:30 -08:00
committed by GitHub
@@ -36,7 +36,7 @@ async function addCell(code: string, notebook: vscode.NotebookDocument) {
async function addCellAndRun(code: string, notebook: vscode.NotebookDocument, i: number) {
const cell = await addCell(code, notebook);
const event = asPromise(vscode.workspace.onDidChangeNotebookDocument);
await vscode.commands.executeCommand('notebook.cell.execute', { start: i, end: i + 1 });
await vscode.commands.executeCommand('notebook.cell.execute', { start: i, end: i + 1 }, notebook.uri);
await event;
assert.strictEqual(cell.outputs.length, 1, 'execute failed');
return cell;