fix smoke tests with stable build (fix #117420)
parent
763bfde29a
commit
041e4d9b1f
|
@ -73,7 +73,12 @@ export class Application {
|
|||
await this.code.waitForElement('.explorer-folders-view');
|
||||
|
||||
if (expectWalkthroughPart) {
|
||||
await this.code.waitForElement(`.editor-instance > div > div.welcomePageFocusElement[tabIndex="0"]`);
|
||||
if (this.quality === Quality.Stable) {
|
||||
// TODO@bpasero remove me in March 2021
|
||||
await this.code.waitForActiveElement(`.editor-instance[data-editor-id="workbench.editor.walkThroughPart"] > div > div[tabIndex="0"]`);
|
||||
} else {
|
||||
await this.code.waitForElement(`.editor-instance > div > div.welcomePageFocusElement[tabIndex="0"]`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -145,6 +145,10 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
|||
'--driver', handle
|
||||
];
|
||||
|
||||
if (process.platform === 'linux') {
|
||||
args.push('--disable-gpu'); // Linux has trouble in VMs to render properly with GPU enabled
|
||||
}
|
||||
|
||||
if (options.remote) {
|
||||
// Replace workspace path with URI
|
||||
args[0] = `--${options.workspacePath.endsWith('.code-workspace') ? 'file' : 'folder'}-uri=vscode-remote://test+test/${URI.file(options.workspacePath).path}`;
|
||||
|
@ -199,7 +203,7 @@ async function copyExtension(extensionsPath: string, extId: string): Promise<voi
|
|||
const dest = path.join(extensionsPath, extId);
|
||||
if (!fs.existsSync(dest)) {
|
||||
const orig = path.join(repoPath, 'extensions', extId);
|
||||
await new Promise((c, e) => ncp(orig, dest, err => err ? e(err) : c()));
|
||||
await new Promise<void>((c, e) => ncp(orig, dest, err => err ? e(err) : c()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ export class SettingsEditor {
|
|||
|
||||
async clearUserSettings(): Promise<void> {
|
||||
const settingsPath = path.join(this.userDataPath, 'User', 'settings.json');
|
||||
await new Promise((c, e) => fs.writeFile(settingsPath, '{\n}', 'utf8', err => err ? e(err) : c()));
|
||||
await new Promise<void>((c, e) => fs.writeFile(settingsPath, '{\n}', 'utf8', err => err ? e(err) : c()));
|
||||
|
||||
await this.openSettings();
|
||||
await this.editor.waitForEditorContents('settings.json', c => c === '{}');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2016",
|
||||
"target": "es2017",
|
||||
"strict": true,
|
||||
"noUnusedParameters": false,
|
||||
"noUnusedLocals": true,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application, ApplicationOptions } from '../../../../automation';
|
||||
import { Application, ApplicationOptions, Quality } from '../../../../automation';
|
||||
import { join } from 'path';
|
||||
|
||||
export function setup(stableCodePath: string, testDataPath: string) {
|
||||
|
@ -19,6 +19,7 @@ export function setup(stableCodePath: string, testDataPath: string) {
|
|||
const stableOptions: ApplicationOptions = Object.assign({}, this.defaultOptions);
|
||||
stableOptions.codePath = stableCodePath;
|
||||
stableOptions.userDataDir = userDataDir;
|
||||
stableOptions.quality = Quality.Stable;
|
||||
|
||||
const stableApp = new Application(stableOptions);
|
||||
await stableApp!.start();
|
||||
|
@ -58,6 +59,7 @@ export function setup(stableCodePath: string, testDataPath: string) {
|
|||
const stableOptions: ApplicationOptions = Object.assign({}, this.defaultOptions);
|
||||
stableOptions.codePath = stableCodePath;
|
||||
stableOptions.userDataDir = userDataDir;
|
||||
stableOptions.quality = Quality.Stable;
|
||||
|
||||
const stableApp = new Application(stableOptions);
|
||||
await stableApp!.start();
|
||||
|
|
Loading…
Reference in New Issue