mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
tests - disable experiments in tests
This commit is contained in:
parent
61b860aab7
commit
7e86d63f29
|
@ -123,7 +123,7 @@ export class BrowserWindow extends Disposable {
|
|||
}
|
||||
|
||||
private setupDriver(): void {
|
||||
if (this.environmentService.options?.developmentOptions?.enableSmokeTestDriver) {
|
||||
if (this.environmentService.enableSmokeTestDriver) {
|
||||
registerWindowDriver();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import { asJson, IRequestService } from 'vs/platform/request/common/request';
|
|||
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
|
||||
import { ITelemetryService, lastSessionDateStorageKey } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IWorkspaceTagsService } from 'vs/workbench/contrib/tags/common/workspaceTags';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { ILifecycleService, LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
|
||||
import { ITextFileEditorModel, ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
|
@ -182,7 +183,8 @@ export class ExperimentService extends Disposable implements IExperimentService
|
|||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@IProductService private readonly productService: IProductService,
|
||||
@IWorkspaceTagsService private readonly workspaceTagsService: IWorkspaceTagsService,
|
||||
@IExtensionService private readonly extensionService: IExtensionService
|
||||
@IExtensionService private readonly extensionService: IExtensionService,
|
||||
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService
|
||||
) {
|
||||
super();
|
||||
|
||||
|
@ -227,6 +229,10 @@ export class ExperimentService extends Disposable implements IExperimentService
|
|||
}
|
||||
|
||||
protected async getExperiments(): Promise<IRawExperiment[] | null> {
|
||||
if (this.environmentService.enableSmokeTestDriver || this.environmentService.extensionTestsLocationURI) {
|
||||
return []; // TODO@sbatten add CLI argument (https://github.com/microsoft/vscode-internalbacklog/issues/2855)
|
||||
}
|
||||
|
||||
const experimentsUrl = this.configurationService.getValue<string>('_workbench.experimentsUrl') || this.productService.experimentsUrl;
|
||||
if (!experimentsUrl || this.configurationService.getValue('workbench.enableExperiments') === false) {
|
||||
return [];
|
||||
|
|
|
@ -578,8 +578,8 @@ export class NativeWindow extends Disposable {
|
|||
|
||||
private setupDriver(): void {
|
||||
|
||||
// Browser Driver
|
||||
if (this.environmentService.args['enable-smoke-test-driver']) {
|
||||
// Modern Driver
|
||||
if (this.environmentService.enableSmokeTestDriver) {
|
||||
const that = this;
|
||||
registerWindowDriver({
|
||||
async exitApplication(): Promise<number> {
|
||||
|
|
|
@ -171,6 +171,9 @@ export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvi
|
|||
return this.extensionHostDebugEnvironment.debugRenderer;
|
||||
}
|
||||
|
||||
@memoize
|
||||
get enableSmokeTestDriver() { return this.options.developmentOptions?.enableSmokeTestDriver; }
|
||||
|
||||
@memoize
|
||||
get disableExtensions() { return this.payload?.get('disableExtensions') === 'true'; }
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ export interface IWorkbenchEnvironmentService extends IEnvironmentService {
|
|||
// --- Development
|
||||
readonly debugRenderer: boolean;
|
||||
readonly logExtensionHostCommunication?: boolean;
|
||||
readonly enableSmokeTestDriver?: boolean;
|
||||
|
||||
// --- Editors to open
|
||||
readonly filesToOpenOrCreate?: IPath[] | undefined;
|
||||
|
|
|
@ -102,6 +102,9 @@ export class NativeWorkbenchEnvironmentService extends AbstractNativeEnvironment
|
|||
@memoize
|
||||
get logExtensionHostCommunication(): boolean { return !!this.args.logExtensionHostCommunication; }
|
||||
|
||||
@memoize
|
||||
get enableSmokeTestDriver(): boolean { return !!this.args['enable-smoke-test-driver']; }
|
||||
|
||||
@memoize
|
||||
get extensionEnabledProposedApi(): string[] | undefined {
|
||||
if (Array.isArray(this.args['enable-proposed-api'])) {
|
||||
|
|
Loading…
Reference in a new issue