Skip to content

Commit 4d6da31

Browse files
committed
Get notebook smoketest working in web
Fix microsoft#98364
1 parent a1de2a7 commit 4d6da31

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

test/automation/src/code.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,10 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
120120
let child: cp.ChildProcess | undefined;
121121
let connectDriver: typeof connectElectronDriver;
122122

123+
copyExtension(options, 'vscode-notebook-tests');
124+
123125
if (options.web) {
124-
await launch(options.userDataDir, options.workspacePath, options.codePath);
126+
await launch(options.userDataDir, options.workspacePath, options.codePath, options.extensionsPath);
125127
connectDriver = connectPlaywrightDriver.bind(connectPlaywrightDriver, options.browser);
126128
return connect(connectDriver, child, '', handle, options.logger);
127129
}
@@ -156,7 +158,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
156158
env['TESTRESOLVER_DATA_FOLDER'] = remoteDataDir;
157159
}
158160

159-
copyExtension(options, 'vscode-notebook-tests');
161+
160162
args.push('--enable-proposed-api=vscode.vscode-notebook-tests');
161163

162164
if (!codePath) {

test/automation/src/playwrightDriver.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ let server: ChildProcess | undefined;
9191
let endpoint: string | undefined;
9292
let workspacePath: string | undefined;
9393

94-
export async function launch(userDataDir: string, _workspacePath: string, codeServerPath = process.env.VSCODE_REMOTE_SERVER_PATH): Promise<void> {
94+
export async function launch(userDataDir: string, _workspacePath: string, codeServerPath = process.env.VSCODE_REMOTE_SERVER_PATH, extPath: string): Promise<void> {
9595
workspacePath = _workspacePath;
9696

9797
const agentFolder = userDataDir;
@@ -111,7 +111,7 @@ export async function launch(userDataDir: string, _workspacePath: string, codeSe
111111
}
112112
server = spawn(
113113
serverLocation,
114-
['--browser', 'none', '--driver', 'web'],
114+
['--browser', 'none', '--driver', 'web', '--extensions-dir', extPath],
115115
{ env }
116116
);
117117
server.stderr?.on('data', error => console.log(`Server stderr: ${error}`));
@@ -146,7 +146,8 @@ export function connect(browserType: 'chromium' | 'webkit' | 'firefox' = 'chromi
146146
const context = await browser.newContext();
147147
const page = await context.newPage();
148148
await page.setViewportSize({ width, height });
149-
await page.goto(`${endpoint}&folder=vscode-remote://localhost:9888${URI.file(workspacePath!).path}`);
149+
const payloadParam = `[["enableProposedApi",""]]`;
150+
await page.goto(`${endpoint}&folder=vscode-remote://localhost:9888${URI.file(workspacePath!).path}&payload=${payloadParam}`);
150151
const result = {
151152
client: { dispose: () => browser.close() && teardown() },
152153
driver: buildDriver(browser, page)

test/smoke/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
316316
if (!opts.web) { setupDataLossTests(); }
317317
if (!opts.web) { setupDataPreferencesTests(); }
318318
setupDataSearchTests();
319-
if (!opts.web) { setupDataNotebookTests(); }
319+
setupDataNotebookTests();
320320
setupDataLanguagesTests();
321321
setupDataEditorTests();
322322
setupDataStatusbarTests(!!opts.web);

0 commit comments

Comments
 (0)