smoke - switch away from potentially flaky editors.selectTab method

This commit is contained in:
Benjamin Pasero 2021-11-26 09:22:19 +01:00
parent 01d1ea52e6
commit a11814c57a
No known key found for this signature in database
GPG key ID: E6380CC4C8219E65
2 changed files with 6 additions and 6 deletions

View file

@ -80,8 +80,8 @@ export class QuickAccess {
}
}
async openFile(fileName: string): Promise<void> {
await this.openQuickAccessAndWait(fileName, true);
async openFile(fileName: string, fileSearch = fileName): Promise<void> {
await this.openQuickAccessAndWait(fileSearch, true);
await this.code.dispatchKeybinding('enter');
await this.editors.waitForActiveTab(fileName);

View file

@ -56,11 +56,11 @@ export function setup(opts: ParsedArgs, testDataPath: string) {
await app.restart();
await app.workbench.editors.waitForTab(readmeMd, true);
await app.workbench.editors.selectTab(readmeMd);
await app.workbench.quickaccess.openFile(readmeMd);
await app.workbench.editor.waitForEditorContents(readmeMd, c => c.indexOf(textToType) > -1);
await app.workbench.editors.waitForTab(untitled, true);
await app.workbench.editors.selectTab(untitled);
await app.workbench.quickaccess.openFile(untitled, textToTypeInUntitled);
await app.workbench.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1);
await app.stop();
@ -162,11 +162,11 @@ export function setup(opts: ParsedArgs, testDataPath: string) {
await insidersApp.start();
await insidersApp.workbench.editors.waitForTab(readmeMd, true);
await insidersApp.workbench.editors.selectTab(readmeMd);
await insidersApp.workbench.quickaccess.openFile(readmeMd);
await insidersApp.workbench.editor.waitForEditorContents(readmeMd, c => c.indexOf(textToType) > -1);
await insidersApp.workbench.editors.waitForTab(untitled, true);
await insidersApp.workbench.editors.selectTab(untitled);
await insidersApp.workbench.quickaccess.openFile(textToTypeInUntitled);
await insidersApp.workbench.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1);
await insidersApp.stop();