mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 966b87dd4013be1a9c06e2b8334522ec61905cc2 (#4696)
This commit is contained in:
@@ -143,6 +143,6 @@ export class Application {
|
||||
|
||||
// wait a bit, since focus might be stolen off widgets
|
||||
// as soon as they open (eg quick open)
|
||||
await new Promise(c => setTimeout(c, 500));
|
||||
await new Promise(c => setTimeout(c, 1000));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,16 +61,16 @@ export function setup() {
|
||||
it('focus stack frames and variables', async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
await app.workbench.debug.waitForVariableCount(4);
|
||||
await app.workbench.debug.waitForVariableCount(4, 5);
|
||||
|
||||
await app.workbench.debug.focusStackFrame('layer.js', 'looking for layer.js');
|
||||
await app.workbench.debug.waitForVariableCount(5);
|
||||
await app.workbench.debug.waitForVariableCount(5, 6);
|
||||
|
||||
await app.workbench.debug.focusStackFrame('route.js', 'looking for route.js');
|
||||
await app.workbench.debug.waitForVariableCount(3);
|
||||
await app.workbench.debug.waitForVariableCount(3, 4);
|
||||
|
||||
await app.workbench.debug.focusStackFrame('index.js', 'looking for index.js');
|
||||
await app.workbench.debug.waitForVariableCount(4);
|
||||
await app.workbench.debug.waitForVariableCount(4, 5);
|
||||
});
|
||||
|
||||
it('stepOver, stepIn, stepOut', async function () {
|
||||
|
||||
@@ -136,8 +136,9 @@ export class Debug extends Viewlet {
|
||||
await this.waitForOutput(output => accept(output[output.length - 1] || ''));
|
||||
}
|
||||
|
||||
async waitForVariableCount(count: number): Promise<void> {
|
||||
await this.code.waitForElements(VARIABLE, false, els => els.length === count);
|
||||
// Different node versions give different number of variables. As a workaround be more relaxed when checking for variable count
|
||||
async waitForVariableCount(count: number, alternativeCount: number): Promise<void> {
|
||||
await this.code.waitForElements(VARIABLE, false, els => els.length === count || els.length === alternativeCount);
|
||||
}
|
||||
|
||||
private async waitForOutput(fn: (output: string[]) => boolean): Promise<string[]> {
|
||||
|
||||
@@ -48,7 +48,7 @@ export function setup() {
|
||||
await app.workbench.search.expandReplace();
|
||||
await app.workbench.search.setReplaceText('ydob');
|
||||
await app.workbench.search.replaceFileMatch('app.js');
|
||||
await app.workbench.search.waitForResultText('16 results in 5 files');
|
||||
await app.workbench.search.waitForResultText('12 results in 4 files');
|
||||
|
||||
await app.workbench.search.searchFor('ydob');
|
||||
await app.workbench.search.setReplaceText('body');
|
||||
|
||||
@@ -113,6 +113,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
||||
'--skip-release-notes',
|
||||
'--sticky-quickopen',
|
||||
'--disable-telemetry',
|
||||
'--disable-extensions',
|
||||
'--disable-updates',
|
||||
'--disable-crash-reporter',
|
||||
`--extensions-dir=${options.extensionsPath}`,
|
||||
|
||||
Reference in New Issue
Block a user