mirror of
https://github.com/Microsoft/vscode
synced 2024-08-26 20:39:37 +00:00
fix smoke tests with stable build (fix #117420)
This commit is contained in:
parent
763bfde29a
commit
041e4d9b1f
|
@ -73,7 +73,12 @@ export class Application {
|
||||||
await this.code.waitForElement('.explorer-folders-view');
|
await this.code.waitForElement('.explorer-folders-view');
|
||||||
|
|
||||||
if (expectWalkthroughPart) {
|
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
|
'--driver', handle
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (process.platform === 'linux') {
|
||||||
|
args.push('--disable-gpu'); // Linux has trouble in VMs to render properly with GPU enabled
|
||||||
|
}
|
||||||
|
|
||||||
if (options.remote) {
|
if (options.remote) {
|
||||||
// Replace workspace path with URI
|
// Replace workspace path with URI
|
||||||
args[0] = `--${options.workspacePath.endsWith('.code-workspace') ? 'file' : 'folder'}-uri=vscode-remote://test+test/${URI.file(options.workspacePath).path}`;
|
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);
|
const dest = path.join(extensionsPath, extId);
|
||||||
if (!fs.existsSync(dest)) {
|
if (!fs.existsSync(dest)) {
|
||||||
const orig = path.join(repoPath, 'extensions', extId);
|
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> {
|
async clearUserSettings(): Promise<void> {
|
||||||
const settingsPath = path.join(this.userDataPath, 'User', 'settings.json');
|
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.openSettings();
|
||||||
await this.editor.waitForEditorContents('settings.json', c => c === '{}');
|
await this.editor.waitForEditorContents('settings.json', c => c === '{}');
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es2016",
|
"target": "es2017",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noUnusedParameters": false,
|
"noUnusedParameters": false,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* 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';
|
import { join } from 'path';
|
||||||
|
|
||||||
export function setup(stableCodePath: string, testDataPath: string) {
|
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);
|
const stableOptions: ApplicationOptions = Object.assign({}, this.defaultOptions);
|
||||||
stableOptions.codePath = stableCodePath;
|
stableOptions.codePath = stableCodePath;
|
||||||
stableOptions.userDataDir = userDataDir;
|
stableOptions.userDataDir = userDataDir;
|
||||||
|
stableOptions.quality = Quality.Stable;
|
||||||
|
|
||||||
const stableApp = new Application(stableOptions);
|
const stableApp = new Application(stableOptions);
|
||||||
await stableApp!.start();
|
await stableApp!.start();
|
||||||
|
@ -58,6 +59,7 @@ export function setup(stableCodePath: string, testDataPath: string) {
|
||||||
const stableOptions: ApplicationOptions = Object.assign({}, this.defaultOptions);
|
const stableOptions: ApplicationOptions = Object.assign({}, this.defaultOptions);
|
||||||
stableOptions.codePath = stableCodePath;
|
stableOptions.codePath = stableCodePath;
|
||||||
stableOptions.userDataDir = userDataDir;
|
stableOptions.userDataDir = userDataDir;
|
||||||
|
stableOptions.quality = Quality.Stable;
|
||||||
|
|
||||||
const stableApp = new Application(stableOptions);
|
const stableApp = new Application(stableOptions);
|
||||||
await stableApp!.start();
|
await stableApp!.start();
|
||||||
|
|
Loading…
Reference in a new issue