Skip to content

Commit c540adc

Browse files
e2e: each run checks the backend it started is the one it asked for (the setting's, or the bundle the extension carries)
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 3b50e8f commit c540adc

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎vscode/src/session.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ export class Session implements vscode.Disposable {
4545
);
4646
}
4747

48+
/** The backend's command and where it was found. */
49+
get started(): Located | undefined {
50+
return this.located;
51+
}
52+
4853
get info(): InitializeResult | undefined {
4954
return this.initResult;
5055
}

‎vscode/test/e2e/runTest.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async function main(): Promise<void> {
3939
"--disable-gpu", "--disable-workspace-trust", "--skip-welcome", "--skip-release-notes",
4040
// No display (a container, an agent's shell): Chromium's headless platform.
4141
...(process.env.MCPP_E2E_HEADLESS ? ["--ozone-platform=headless"] : [])],
42-
extensionTestsEnv: { MCPPIDE_E2E_WORKSPACE: workspace },
42+
extensionTestsEnv: { MCPPIDE_E2E_WORKSPACE: workspace, MCPPIDE_E2E_SOURCE: process.env.MCPP_E2E_BUNDLED ? "bundle" : "setting" },
4343
});
4444
}
4545

‎vscode/test/e2e/suite/index.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const cases: [string, (api: McppApi) => Promise<void>][] = [
2424
assert.ok(declared.length > 40);
2525
}],
2626
["the backend found the project and mcpp", async (api) => {
27+
// As the run asked: the backend the settings name, or the bundle the extension carries.
28+
assert.equal(api.session.started?.source, process.env.MCPPIDE_E2E_SOURCE);
2729
const info = api.session.info!;
2830
assert.equal(info.projects.length, 1);
2931
assert.equal(info.projects[0].name, "app");

0 commit comments

Comments
 (0)