mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 4d91d96e5e121b38d33508cdef17868bab255eae
This commit is contained in:
committed by
AzureDataStudio
parent
a971aee5bd
commit
5e7071e466
@@ -120,8 +120,10 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
||||
let child: cp.ChildProcess | undefined;
|
||||
let connectDriver: typeof connectElectronDriver;
|
||||
|
||||
copyExtension(options, 'vscode-notebook-tests');
|
||||
|
||||
if (options.web) {
|
||||
await launch(options.userDataDir, options.workspacePath, options.extensionsPath, options.codePath);
|
||||
await launch(options.userDataDir, options.workspacePath, options.codePath, options.extensionsPath);
|
||||
connectDriver = connectPlaywrightDriver.bind(connectPlaywrightDriver, options.browser);
|
||||
return connect(connectDriver, child, '', handle, options.logger);
|
||||
}
|
||||
@@ -134,6 +136,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
||||
options.workspacePath,
|
||||
'--skip-release-notes',
|
||||
'--disable-telemetry',
|
||||
'--no-cached-data',
|
||||
'--disable-updates',
|
||||
'--disable-crash-reporter',
|
||||
`--extensions-dir=${options.extensionsPath}`,
|
||||
@@ -156,7 +159,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
||||
env['TESTRESOLVER_DATA_FOLDER'] = remoteDataDir;
|
||||
}
|
||||
|
||||
copyExtension(options, 'vscode-notebook-tests');
|
||||
|
||||
args.push('--enable-proposed-api=vscode.vscode-notebook-tests');
|
||||
|
||||
if (!codePath) {
|
||||
|
||||
@@ -35,7 +35,7 @@ export class Notebook {
|
||||
}
|
||||
|
||||
async stopEditingCell() {
|
||||
await this.code.dispatchKeybinding('esc');
|
||||
await this.quickAccess.runCommand('notebook.cell.quitEdit');
|
||||
}
|
||||
|
||||
async waitForTypeInEditor(text: string): Promise<any> {
|
||||
|
||||
@@ -91,7 +91,7 @@ let server: ChildProcess | undefined;
|
||||
let endpoint: string | undefined;
|
||||
let workspacePath: string | undefined;
|
||||
|
||||
export async function launch(userDataDir: string, _workspacePath: string, extensionsDir: string, codeServerPath = process.env.VSCODE_REMOTE_SERVER_PATH): Promise<void> {
|
||||
export async function launch(userDataDir: string, _workspacePath: string, codeServerPath = process.env.VSCODE_REMOTE_SERVER_PATH, extPath: string): Promise<void> {
|
||||
workspacePath = _workspacePath;
|
||||
|
||||
const agentFolder = userDataDir;
|
||||
@@ -111,7 +111,7 @@ export async function launch(userDataDir: string, _workspacePath: string, extens
|
||||
}
|
||||
server = spawn(
|
||||
serverLocation,
|
||||
['--browser', 'none', '--driver', 'web', '--extensions-dir', `${extensionsDir}`],
|
||||
['--browser', 'none', '--driver', 'web', '--extensions-dir', extPath],
|
||||
{ env }
|
||||
);
|
||||
server.stderr?.on('data', error => console.log(`Server stderr: ${error}`));
|
||||
@@ -146,7 +146,8 @@ export function connect(browserType: 'chromium' | 'webkit' | 'firefox' = 'chromi
|
||||
const context = await browser.newContext();
|
||||
const page = await context.newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
await page.goto(`${endpoint}&folder=vscode-remote://localhost:9888${URI.file(workspacePath!).path}`);
|
||||
const payloadParam = `[["enableProposedApi",""]]`;
|
||||
await page.goto(`${endpoint}&folder=vscode-remote://localhost:9888${URI.file(workspacePath!).path}&payload=${payloadParam}`);
|
||||
const result = {
|
||||
client: { dispose: () => browser.close() && teardown() },
|
||||
driver: buildDriver(browser, page)
|
||||
|
||||
@@ -19,7 +19,7 @@ export const enum StatusBarElement {
|
||||
|
||||
export class StatusBar {
|
||||
|
||||
private readonly mainSelector = 'div[id="workbench.parts.statusbar"]';
|
||||
private readonly mainSelector = 'footer[id="workbench.parts.statusbar"]';
|
||||
|
||||
constructor(private code: Code) { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user