smoke tests - try other ways of ensuring the editor is open for data migration (#129279)

This commit is contained in:
Benjamin Pasero 2021-08-04 15:32:21 +02:00
parent e007ca899c
commit c28ea165cd
No known key found for this signature in database
GPG key ID: E6380CC4C8219E65
2 changed files with 6 additions and 13 deletions

View file

@ -70,14 +70,9 @@ export class Application {
return this._userDataPath;
}
async start(expectWalkthroughPart = true): Promise<any> {
async start(): Promise<any> {
await this._start();
await this.code.waitForElement('.explorer-folders-view');
// https://github.com/microsoft/vscode/issues/118748
// if (expectWalkthroughPart) {
// await this.code.waitForElement(`.editor-instance > div > div.welcomePageFocusElement[tabIndex="0"]`);
// }
}
async restart(options: { workspaceOrFolder?: string, extraArgs?: string[] }): Promise<any> {

View file

@ -31,7 +31,7 @@ export function setup(opts: ParsedArgs, testDataPath: string) {
stableOptions.quality = Quality.Stable;
const stableApp = new Application(stableOptions);
await stableApp!.start();
await stableApp.start();
// Open 3 editors and pin 2 of them
await stableApp.workbench.quickaccess.openFile('www');
@ -48,10 +48,10 @@ export function setup(opts: ParsedArgs, testDataPath: string) {
insiderOptions.userDataDir = userDataDir;
const insidersApp = new Application(insiderOptions);
await insidersApp!.start(false /* not expecting walkthrough path */);
await insidersApp.start();
// Verify 3 editors are open
await insidersApp.workbench.editors.waitForEditorFocus('Untitled-1');
await insidersApp.workbench.editors.selectTab('Untitled-1');
await insidersApp.workbench.editors.selectTab('app.js');
await insidersApp.workbench.editors.selectTab('www');
@ -72,7 +72,7 @@ export function setup(opts: ParsedArgs, testDataPath: string) {
stableOptions.quality = Quality.Stable;
const stableApp = new Application(stableOptions);
await stableApp!.start();
await stableApp.start();
await stableApp.workbench.editors.newUntitledFile();
@ -91,13 +91,11 @@ export function setup(opts: ParsedArgs, testDataPath: string) {
insiderOptions.userDataDir = userDataDir;
const insidersApp = new Application(insiderOptions);
await insidersApp!.start(false /* not expecting walkthrough path */);
await insidersApp.start();
await insidersApp.workbench.editors.waitForTab(readmeMd, true);
await insidersApp.workbench.editors.selectTab(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.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1);