mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
smoke - remove timeout
from launches (#177204)
This commit is contained in:
parent
ce5c586128
commit
2c3a648d88
|
@ -25,10 +25,6 @@ export class BrowserWindowDriver implements IWindowDriver {
|
|||
inputElement.dispatchEvent(event);
|
||||
}
|
||||
|
||||
async getTitle(): Promise<string> {
|
||||
return document.title;
|
||||
}
|
||||
|
||||
async isActiveElement(selector: string): Promise<boolean> {
|
||||
const element = document.querySelector(selector);
|
||||
|
||||
|
@ -198,14 +194,6 @@ export class BrowserWindowDriver implements IWindowDriver {
|
|||
return { x, y };
|
||||
}
|
||||
|
||||
click(selector: string, xoffset?: number, yoffset?: number): Promise<void> {
|
||||
|
||||
// This is actually not used in the playwright drivers
|
||||
// that can implement `click` natively via the driver
|
||||
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
async exitApplication(): Promise<void> {
|
||||
// No-op in web
|
||||
}
|
||||
|
|
|
@ -28,9 +28,7 @@ export interface ILocalizedStrings {
|
|||
}
|
||||
|
||||
export interface IWindowDriver {
|
||||
click(selector: string, xoffset?: number | undefined, yoffset?: number | undefined): Promise<void>;
|
||||
setValue(selector: string, text: string): Promise<void>;
|
||||
getTitle(): Promise<string>;
|
||||
isActiveElement(selector: string): Promise<boolean>;
|
||||
getElements(selector: string, recursive: boolean): Promise<IElement[]>;
|
||||
getElementXY(selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number }>;
|
||||
|
|
|
@ -88,7 +88,11 @@ async function launchServer(options: LaunchOptions) {
|
|||
async function launchBrowser(options: LaunchOptions, endpoint: string) {
|
||||
const { logger, workspacePath, tracing, headless } = options;
|
||||
|
||||
const browser = await measureAndLog(() => playwright[options.browser ?? 'chromium'].launch({ headless: headless ?? false }), 'playwright#launch', logger);
|
||||
const browser = await measureAndLog(() => playwright[options.browser ?? 'chromium'].launch({
|
||||
headless: headless ?? false,
|
||||
timeout: 0
|
||||
}), 'playwright#launch', logger);
|
||||
|
||||
browser.on('disconnected', () => logger.log(`Playwright: browser disconnected`));
|
||||
|
||||
const context = await measureAndLog(() => browser.newContext(), 'browser.newContext', logger);
|
||||
|
|
|
@ -171,7 +171,7 @@ export class PlaywrightDriver {
|
|||
}
|
||||
|
||||
async getTitle() {
|
||||
return this.evaluateWithDriver(([driver]) => driver.getTitle());
|
||||
return this.page.title();
|
||||
}
|
||||
|
||||
async isActiveElement(selector: string) {
|
||||
|
|
|
@ -32,7 +32,8 @@ async function launchElectron(configuration: IElectronConfiguration, options: La
|
|||
const electron = await measureAndLog(() => playwright._electron.launch({
|
||||
executablePath: configuration.electronPath,
|
||||
args: configuration.args,
|
||||
env: configuration.env as { [key: string]: string }
|
||||
env: configuration.env as { [key: string]: string },
|
||||
timeout: 0
|
||||
}), 'playwright-electron#launch', logger);
|
||||
|
||||
const window = await measureAndLog(() => electron.firstWindow(), 'playwright-electron#firstWindow', logger);
|
||||
|
|
|
@ -35,7 +35,7 @@ export class Search extends Viewlet {
|
|||
|
||||
async clearSearchResults(): Promise<void> {
|
||||
await retry(
|
||||
() => this.code.waitAndClick(`.sidebar .codicon-search-clear-results`),
|
||||
() => this.code.waitAndClick(`.sidebar .title-actions .codicon-search-clear-results`),
|
||||
() => this.waitForNoResultText(10));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue