mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
"@types/debug": "4.1.5",
|
||||
"@types/mkdirp": "^1.0.1",
|
||||
"@types/ncp": "2.0.1",
|
||||
"@types/node": "^12.19.9",
|
||||
"@types/node": "14.x",
|
||||
"@types/tmp": "0.1.0",
|
||||
"cpx2": "3.0.0",
|
||||
"mkdirp": "^1.0.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as fs from 'fs';
|
||||
|
||||
@@ -140,6 +140,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
||||
'--disable-updates',
|
||||
'--disable-keytar',
|
||||
'--disable-crash-reporter',
|
||||
'--disable-workspace-trust',
|
||||
`--extensions-dir=${options.extensionsPath}`,
|
||||
`--user-data-dir=${options.userDataDir}`,
|
||||
'--driver', handle
|
||||
@@ -310,9 +311,9 @@ export class Code {
|
||||
return element.textContent;
|
||||
}
|
||||
|
||||
async waitAndClick(selector: string, xoffset?: number, yoffset?: number): Promise<void> {
|
||||
async waitAndClick(selector: string, xoffset?: number, yoffset?: number, retryCount: number = 200): Promise<void> {
|
||||
const windowId = await this.getActiveWindowId();
|
||||
await poll(() => this.driver.click(windowId, selector, xoffset, yoffset), () => true, `click '${selector}'`);
|
||||
await poll(() => this.driver.click(windowId, selector, xoffset, yoffset), () => true, `click '${selector}'`, retryCount);
|
||||
}
|
||||
|
||||
async waitAndDoubleClick(selector: string): Promise<void> {
|
||||
|
||||
@@ -9,4 +9,4 @@ exports.connect = function (outPath, handle) {
|
||||
const bootstrapPath = path.join(outPath, 'bootstrap-amd.js');
|
||||
const { load } = require(bootstrapPath);
|
||||
return new Promise((c, e) => load('vs/platform/driver/node/driver', ({ connect }) => connect(handle).then(c, e), e));
|
||||
};
|
||||
};
|
||||
|
||||
@@ -39,4 +39,4 @@ export class MultiLogger implements Logger {
|
||||
logger.log(message, ...args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ function buildDriver(browser: playwright.Browser, page: playwright.Page): IDrive
|
||||
getWindowIds: () => {
|
||||
return Promise.resolve([1]);
|
||||
},
|
||||
// {{SQL CARBON EDIT}}
|
||||
capturePage: async () => {
|
||||
const buffer = await page.screenshot();
|
||||
return buffer.toString('base64');
|
||||
|
||||
@@ -43,6 +43,11 @@ export class Search extends Viewlet {
|
||||
await this.waitForInputFocus(INPUT);
|
||||
}
|
||||
|
||||
async getSearchTooltip(): Promise<any> {
|
||||
const icon = await this.code.waitForElement(`.activitybar .action-label.codicon.codicon-search-view-icon`, (el) => !!el?.attributes?.['title']);
|
||||
return icon.attributes['title'];
|
||||
}
|
||||
|
||||
async searchFor(text: string): Promise<void> {
|
||||
await this.waitForInputFocus(INPUT);
|
||||
await this.code.waitForSetValue(INPUT, text);
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.1.tgz#3b5c3a26393c19b400844ac422bd0f631a94d69d"
|
||||
integrity sha512-aK9jxMypeSrhiYofWWBf/T7O+KwaiAHzM4sveCdWPn71lzUSMimRnKzhXDKfKwV1kWoBo2P1aGgaIYGLf9/ljw==
|
||||
|
||||
"@types/node@^12.19.9":
|
||||
version "12.19.9"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679"
|
||||
integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q==
|
||||
"@types/node@14.x":
|
||||
version "14.14.43"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8"
|
||||
integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==
|
||||
|
||||
"@types/tmp@0.1.0":
|
||||
version "0.1.0"
|
||||
|
||||
Reference in New Issue
Block a user