Skip to content

Commit 50a4122

Browse files
committed
feat: make necessary changes to make E2E tests running
1 parent 573d6b3 commit 50a4122

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

src/notebooks/deepnote/deepnoteExplorerView.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { injectable, inject } from 'inversify';
22
import { commands, window, workspace, type TreeView, Uri, l10n } from 'vscode';
33
import * as yaml from 'js-yaml';
4-
import { convertIpynbFilesToDeepnoteFile } from '@deepnote/convert';
4+
// NOTE: Use dynamic import for '@deepnote/convert' to avoid activation failures in test hosts
5+
// where the package may not be resolvable. We only import it when needed.
56

67
import { IExtensionContext } from '../../platform/common/types';
78
import { IDeepnoteNotebookManager } from '../types';
@@ -357,6 +358,7 @@ export class DeepnoteExplorerView {
357358
const outputFileName = `${projectName}.deepnote`;
358359
const outputPath = Uri.joinPath(workspaceFolder.uri, outputFileName).path;
359360

361+
const { convertIpynbFilesToDeepnoteFile } = await import('@deepnote/convert');
360362
await convertIpynbFilesToDeepnoteFile(inputFilePaths, {
361363
outputPath: outputPath,
362364
projectName: projectName
@@ -429,6 +431,7 @@ export class DeepnoteExplorerView {
429431
// File doesn't exist, continue
430432
}
431433

434+
const { convertIpynbFilesToDeepnoteFile } = await import('@deepnote/convert');
432435
await convertIpynbFilesToDeepnoteFile(inputFilePaths, {
433436
outputPath: outputUri.path,
434437
projectName: projectName

src/test/constants.node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const EXTENSION_TEST_DIR_FOR_FILES = path.join(
1616
'datascience',
1717
'temp'
1818
);
19-
export const JVSC_EXTENSION_ID_FOR_TESTS = 'ms-toolsai.jupyter';
19+
export const JVSC_EXTENSION_ID_FOR_TESTS = 'Deepnote.vscode-deepnote';
2020

2121
export const SMOKE_TEST_EXTENSIONS_DIR = path.join(
2222
EXTENSION_ROOT_DIR_FOR_TESTS,

src/test/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4-
export const JVSC_EXTENSION_ID_FOR_TESTS = 'ms-toolsai.jupyter';
4+
export const JVSC_EXTENSION_ID_FOR_TESTS = 'Deepnote.vscode-deepnote';
55
export const PerformanceExtensionId = 'ms-toolsai.vscode-notebook-perf';
66

77
export type TestSettingsType = {

src/test/datascience/setupTestEnvs.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ python --version
77
python -c "import sys;print(sys.executable)"
88
uv pip install ipykernel
99
python -m ipykernel install --user --name .venvkernel --display-name .venvkernel
10-
uv pip uninstall jedi --yes
10+
uv pip uninstall jedi
1111
uv pip install jedi==0.17.2
1212
uv pip install ipywidgets==7.7.2
1313

@@ -16,6 +16,6 @@ python --version
1616
python -c "import sys;print(sys.executable)"
1717
uv pip install ipykernel
1818
python -m ipykernel install --user --name .venvnokernel --display-name .venvnokernel
19-
uv pip uninstall jedi --yes
19+
uv pip uninstall jedi
2020
uv pip install jedi==0.17.2
21-
uv pip uninstall ipykernel --yes
21+
uv pip uninstall ipykernel

0 commit comments

Comments
 (0)