mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
smoke tests - try other ways of ensuring the editor is open for data migration (#129279)
This commit is contained in:
parent
e007ca899c
commit
c28ea165cd
|
@ -70,14 +70,9 @@ export class Application {
|
||||||
return this._userDataPath;
|
return this._userDataPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
async start(expectWalkthroughPart = true): Promise<any> {
|
async start(): Promise<any> {
|
||||||
await this._start();
|
await this._start();
|
||||||
await this.code.waitForElement('.explorer-folders-view');
|
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> {
|
async restart(options: { workspaceOrFolder?: string, extraArgs?: string[] }): Promise<any> {
|
||||||
|
|
|
@ -31,7 +31,7 @@ export function setup(opts: ParsedArgs, testDataPath: string) {
|
||||||
stableOptions.quality = Quality.Stable;
|
stableOptions.quality = Quality.Stable;
|
||||||
|
|
||||||
const stableApp = new Application(stableOptions);
|
const stableApp = new Application(stableOptions);
|
||||||
await stableApp!.start();
|
await stableApp.start();
|
||||||
|
|
||||||
// Open 3 editors and pin 2 of them
|
// Open 3 editors and pin 2 of them
|
||||||
await stableApp.workbench.quickaccess.openFile('www');
|
await stableApp.workbench.quickaccess.openFile('www');
|
||||||
|
@ -48,10 +48,10 @@ export function setup(opts: ParsedArgs, testDataPath: string) {
|
||||||
insiderOptions.userDataDir = userDataDir;
|
insiderOptions.userDataDir = userDataDir;
|
||||||
|
|
||||||
const insidersApp = new Application(insiderOptions);
|
const insidersApp = new Application(insiderOptions);
|
||||||
await insidersApp!.start(false /* not expecting walkthrough path */);
|
await insidersApp.start();
|
||||||
|
|
||||||
// Verify 3 editors are open
|
// 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('app.js');
|
||||||
await insidersApp.workbench.editors.selectTab('www');
|
await insidersApp.workbench.editors.selectTab('www');
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ export function setup(opts: ParsedArgs, testDataPath: string) {
|
||||||
stableOptions.quality = Quality.Stable;
|
stableOptions.quality = Quality.Stable;
|
||||||
|
|
||||||
const stableApp = new Application(stableOptions);
|
const stableApp = new Application(stableOptions);
|
||||||
await stableApp!.start();
|
await stableApp.start();
|
||||||
|
|
||||||
await stableApp.workbench.editors.newUntitledFile();
|
await stableApp.workbench.editors.newUntitledFile();
|
||||||
|
|
||||||
|
@ -91,13 +91,11 @@ export function setup(opts: ParsedArgs, testDataPath: string) {
|
||||||
insiderOptions.userDataDir = userDataDir;
|
insiderOptions.userDataDir = userDataDir;
|
||||||
|
|
||||||
const insidersApp = new Application(insiderOptions);
|
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.editors.selectTab(readmeMd);
|
||||||
await insidersApp.workbench.editor.waitForEditorContents(readmeMd, c => c.indexOf(textToType) > -1);
|
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.editors.selectTab(untitled);
|
||||||
await insidersApp.workbench.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1);
|
await insidersApp.workbench.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue