Skip to content

Commit a77501f

Browse files
authored
Reenable a couple notebook smoketests (microsoft#159521)
* Remove vscode-notebook-tests in favor of an .ipynb in vscode-smoketest-express * Update build folder * Add build task to correct platform * Build for smoke tests on other platforms * Fix repo url and remove comment * Just -media? * Update darwin/win32 as well
1 parent 817db72 commit a77501f

File tree

5 files changed

+14
-25
lines changed

5 files changed

+14
-25
lines changed

automation/src/code.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,15 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { join } from 'path';
7-
import * as os from 'os';
86
import * as cp from 'child_process';
9-
import { IElement, ILocalizedStrings, ILocaleInfo } from './driver';
7+
import * as os from 'os';
8+
import * as treekill from 'tree-kill';
9+
import { IElement, ILocaleInfo, ILocalizedStrings } from './driver';
10+
import { Logger, measureAndLog } from './logger';
1011
import { launch as launchPlaywrightBrowser } from './playwrightBrowser';
12+
import { PlaywrightDriver } from './playwrightDriver';
1113
import { launch as launchPlaywrightElectron } from './playwrightElectron';
12-
import { Logger, measureAndLog } from './logger';
13-
import { copyExtension } from './extensions';
14-
import * as treekill from 'tree-kill';
1514
import { teardown } from './processes';
16-
import { PlaywrightDriver } from './playwrightDriver';
17-
18-
const rootPath = join(__dirname, '../../..');
1915

2016
export interface LaunchOptions {
2117
codePath?: string;
@@ -76,8 +72,6 @@ export async function launch(options: LaunchOptions): Promise<Code> {
7672
throw new Error('Smoke test process has terminated, refusing to spawn Code');
7773
}
7874

79-
await measureAndLog(() => copyExtension(rootPath, options.extensionsPath, 'vscode-notebook-tests'), 'copyExtension(vscode-notebook-tests)', options.logger);
80-
8175
// Browser smoke tests
8276
if (options.web) {
8377
const { serverProcess, driver } = await measureAndLog(() => launchPlaywrightBrowser(options), 'launch playwright (browser)', options.logger);

automation/src/electron.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,13 @@ export async function resolveElectronConfiguration(options: LaunchOptions): Prom
6161
const remoteDataDir = `${userDataDir}-server`;
6262
mkdirp.sync(remoteDataDir);
6363

64-
if (codePath) {
65-
// running against a build: copy the test resolver extension into remote extensions dir
66-
const remoteExtensionsDir = join(remoteDataDir, 'extensions');
67-
mkdirp.sync(remoteExtensionsDir);
68-
await measureAndLog(() => copyExtension(root, remoteExtensionsDir, 'vscode-notebook-tests'), 'copyExtension(vscode-notebook-tests)', logger);
69-
}
70-
7164
env['TESTRESOLVER_DATA_FOLDER'] = remoteDataDir;
7265
env['TESTRESOLVER_LOGS_FOLDER'] = join(logsPath, 'server');
7366
if (options.verbose) {
7467
env['TESTRESOLVER_LOG_LEVEL'] = 'trace';
7568
}
7669
}
7770

78-
args.push('--enable-proposed-api=vscode.vscode-notebook-tests');
79-
8071
if (!codePath) {
8172
args.unshift(root);
8273
}

automation/src/notebook.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@
55

66
import { Code } from './code';
77
import { QuickAccess } from './quickaccess';
8+
import { QuickInput } from './quickinput';
89

910
const activeRowSelector = `.notebook-editor .monaco-list-row.focused`;
1011

1112
export class Notebook {
1213

1314
constructor(
1415
private readonly quickAccess: QuickAccess,
16+
private readonly quickInput: QuickInput,
1517
private readonly code: Code) {
1618
}
1719

1820
async openNotebook() {
19-
await this.quickAccess.runCommand('vscode-notebook-tests.createNewNotebook');
21+
await this.quickAccess.openFileQuickAccessAndWait('notebook.ipynb', 1);
22+
await this.quickInput.selectQuickInputElement(0);
23+
2024
await this.code.waitForElement(activeRowSelector);
2125
await this.focusFirstCell();
2226
await this.waitForActiveCellEditorContents('code()');

automation/src/workbench.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class Workbench {
6464
this.settingsEditor = new SettingsEditor(code, this.editors, this.editor, this.quickaccess);
6565
this.keybindingsEditor = new KeybindingsEditor(code);
6666
this.terminal = new Terminal(code, this.quickaccess, this.quickinput);
67-
this.notebook = new Notebook(this.quickaccess, code);
67+
this.notebook = new Notebook(this.quickaccess, this.quickinput, code);
6868
this.localization = new Localization(code);
6969
this.task = new Task(code, this.editor, this.editors, this.quickaccess, this.quickinput, this.terminal);
7070
}

smoke/src/areas/notebook/notebook.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Application, Logger } from '../../../../automation';
88
import { installAllHandlers } from '../../utils';
99

1010
export function setup(logger: Logger) {
11-
describe.skip('Notebooks', () => { // TODO@rebornix https://github.com/microsoft/vscode/issues/140575
11+
describe('Notebooks', () => {
1212

1313
// Shared before/after handling
1414
installAllHandlers(logger);
@@ -25,7 +25,7 @@ export function setup(logger: Logger) {
2525
cp.execSync('git reset --hard HEAD --quiet', { cwd: app.workspacePathOrFolder });
2626
});
2727

28-
it.skip('inserts/edits code cell', async function () { // TODO@rebornix https://github.com/microsoft/vscode/issues/139672
28+
it('inserts/edits code cell', async function () {
2929
const app = this.app as Application;
3030
await app.workbench.notebook.openNotebook();
3131
await app.workbench.notebook.focusNextCell();
@@ -34,7 +34,7 @@ export function setup(logger: Logger) {
3434
await app.workbench.notebook.stopEditingCell();
3535
});
3636

37-
it.skip('inserts/edits markdown cell', async function () {
37+
it('inserts/edits markdown cell', async function () {
3838
const app = this.app as Application;
3939
await app.workbench.notebook.openNotebook();
4040
await app.workbench.notebook.focusNextCell();

0 commit comments

Comments
 (0)