mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Re-enabled some of the skipped notebook tests (#255087)
* Identify flaky test failures * Updates
This commit is contained in:
@@ -6,13 +6,40 @@
|
||||
import * as assert from 'assert';
|
||||
import 'mocha';
|
||||
import * as vscode from 'vscode';
|
||||
import { assertNoRpc, closeAllEditors, createRandomFile } from '../utils';
|
||||
|
||||
const ipynbContent = JSON.stringify({
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": ["## Header"],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"source": ["print('hello 1')\n", "print('hello 2')"],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": ["hello 1\n", "hello 2\n"]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
suite('ipynb NotebookSerializer', function () {
|
||||
teardown(async function () {
|
||||
assertNoRpc();
|
||||
await closeAllEditors();
|
||||
});
|
||||
|
||||
(vscode.env.uiKind === vscode.UIKind.Web ? suite.skip : suite)('ipynb NotebookSerializer', function () {
|
||||
test('Can open an ipynb notebook', async () => {
|
||||
assert.ok(vscode.workspace.workspaceFolders);
|
||||
const workspace = vscode.workspace.workspaceFolders[0];
|
||||
const uri = vscode.Uri.joinPath(workspace.uri, 'test.ipynb');
|
||||
const notebook = await vscode.workspace.openNotebookDocument(uri);
|
||||
const file = await createRandomFile(ipynbContent, undefined, '.ipynb');
|
||||
const notebook = await vscode.workspace.openNotebookDocument(file);
|
||||
await vscode.window.showNotebookDocument(notebook);
|
||||
|
||||
const notebookEditor = vscode.window.activeNotebookEditor;
|
||||
|
||||
Reference in New Issue
Block a user