Fix: enhance welcome overlay skip functionality for automated tests with CLI flag and query parameter

This commit is contained in:
Osvaldo Ortega
2026-03-02 22:04:43 -08:00
parent 884c5882c9
commit 80e30be070

View File

@@ -147,10 +147,15 @@ class SessionsWelcomeContribution extends Disposable implements IWorkbenchContri
return;
}
// Allow automated tests to skip the welcome overlay entirely
// Allow automated tests to skip the welcome overlay entirely.
// Desktop: --skip-sessions-welcome CLI flag
// Web: ?skip-sessions-welcome query parameter
if ('args' in this.environmentService && (this.environmentService as any).args?.['skip-sessions-welcome']) {
return;
}
if (typeof globalThis.location !== 'undefined' && new URLSearchParams(globalThis.location.search).has('skip-sessions-welcome')) {
return;
}
const isFirstLaunch = !this.storageService.getBoolean(WELCOME_COMPLETE_KEY, StorageScope.APPLICATION, false);
if (isFirstLaunch) {