From 809dfb41a2ea0441600e2bbb50ec4b20e1d6a33e Mon Sep 17 00:00:00 2001 From: rebornix Date: Mon, 7 Jun 2021 11:10:04 -0700 Subject: [PATCH] remove join cell test covered by unit test. --- .../src/singlefolder-tests/notebook.test.ts | 54 ------------------- 1 file changed, 54 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts index 62c87958dcb..f63820c36e0 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts @@ -563,41 +563,6 @@ suite('Notebook API tests', function () { assert.strictEqual(vscode.window.activeNotebookEditor!.document.getCells().indexOf(getFocusedCell(vscode.window.activeNotebookEditor)!), 1, `first move down, active cell ${getFocusedCell(vscode.window.activeNotebookEditor)!.document.uri.toString()}, ${getFocusedCell(vscode.window.activeNotebookEditor)!.document.getText()}`); - // await vscode.commands.executeCommand('notebook.cell.moveDown'); - // activeCell = getFocusedCell(vscode.window.activeNotebookEditor); - - // assert.strictEqual(vscode.window.activeNotebookEditor!.document.getCells().indexOf(activeCell!), 2, - // `second move down, active cell ${getFocusedCell(vscode.window.activeNotebookEditor)!.uri.toString()}, ${getFocusedCell(vscode.window.activeNotebookEditor)!.document.getText()}`); - // assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellAt(0).document.getText(), 'test'); - // assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellAt(1).document.getText(), ''); - // assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellAt(2).document.getText(), 'test'); - // assert.strictEqual(vscode.window.activeNotebookEditor!.document.cellAt(3).document.getText(), ''); - - // ---- ---- // - - await vscode.commands.executeCommand('workbench.action.files.save'); - await vscode.commands.executeCommand('workbench.action.closeActiveEditor'); - }); - - test('notebook join cells', async function () { - const resource = await createRandomNotebookFile(); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - assert.strictEqual(vscode.window.activeNotebookEditor !== undefined, true, 'notebook first'); - assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.document.getText(), 'test'); - assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.document.languageId, 'typescript'); - - await vscode.commands.executeCommand('notebook.cell.insertCodeCellBelow'); - assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.document.getText(), ''); - const edit = new vscode.WorkspaceEdit(); - edit.insert(getFocusedCell(vscode.window.activeNotebookEditor)!.document.uri, new vscode.Position(0, 0), 'var abc = 0;'); - await vscode.workspace.applyEdit(edit); - - const cellsChangeEvent = asPromise(vscode.notebooks.onDidChangeNotebookCells); - await vscode.commands.executeCommand('notebook.cell.joinAbove'); - await cellsChangeEvent; - - assert.deepStrictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.document.getText().split(/\r\n|\r|\n/), ['test', 'var abc = 0;']); - await vscode.commands.executeCommand('workbench.action.files.save'); await vscode.commands.executeCommand('workbench.action.closeActiveEditor'); }); @@ -1051,25 +1016,6 @@ suite('Notebook API tests', function () { }); - - // TODO@rebornix skip as it crashes the process all the time - test.skip('custom metadata should be supported 2', async function () { - const resource = await createRandomNotebookFile(); - await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); - assert.strictEqual(vscode.window.activeNotebookEditor !== undefined, true, 'notebook first'); - assert.strictEqual(vscode.window.activeNotebookEditor!.document.metadata.custom!['testMetadata'] as boolean, false); - assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.metadata.custom!['testCellMetadata'] as number, 123); - assert.strictEqual(getFocusedCell(vscode.window.activeNotebookEditor)?.document.languageId, 'typescript'); - - // TODO see #101462 - // await vscode.commands.executeCommand('notebook.cell.copyDown'); - // const activeCell = getFocusedCell(vscode.window.activeNotebookEditor); - // assert.strictEqual(vscode.window.activeNotebookEditor!.document.getCells().indexOf(activeCell!), 1); - // assert.strictEqual(activeCell?.metadata.custom!['testCellMetadata'] as number, 123); - - }); - - test.skip('#106657. Opening a notebook from markers view is broken ', async function () { const document = await openRandomNotebookDocument();