Use insiders bits when running tests (#134578)

These tests run before the content for the webview is published. To work around this, we use previously published bits inside the tests. These only exist on insiders, not stable, so update the `webviewExternalEndpoint` always use insider when running the tests
This commit is contained in:
Matt Bierner 2021-10-07 08:26:06 -07:00 committed by GitHub
parent 192010a0b6
commit c0891ab14b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -234,9 +234,10 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
|| this.productService.webviewContentExternalBaseUrlTemplate
|| 'https://{{uuid}}.vscode-webview.net/{{quality}}/{{commit}}/out/vs/workbench/contrib/webview/browser/pre/';
const webviewExternalEndpointCommit = this.payload?.get('webviewExternalEndpointCommit');
return endpoint
.replace('{{commit}}', this.payload?.get('webviewExternalEndpointCommit') ?? this.productService.commit ?? '5f19eee5dc9588ca96192f89587b5878b7d7180d')
.replace('{{quality}}', this.productService.quality || 'insider');
.replace('{{commit}}', webviewExternalEndpointCommit ?? this.productService.commit ?? '5f19eee5dc9588ca96192f89587b5878b7d7180d')
.replace('{{quality}}', (webviewExternalEndpointCommit ? 'insider' : this.productService.quality) ?? 'insider');
}
@memoize