Файли
openidea/src/cloneWindowBoot.test.ts
T
l0ng-ai b5a8a77cfa fix(vcs): open the GitHub sign-in terminal from the Get from Version Control window (#7965)
The clone window booted without the workbench and never provided the embedded terminal service the Sign In to GitHub CLI dialog uses, so Add account… showed "The terminal is not available in this window." The clone window now provides it lazily, as the Settings window does. The Sign In button on the not-logged-in state uses the same dialog.
2026-12-04 17:10:03 +08:00

18 рядки
890 B
TypeScript

import { describe, expect, it, vi } from "vitest";
import { bootCloneWindow } from "./cloneWindowBoot";
import { embeddedTerminal } from "./workbench/contributions";
vi.mock("./features/app/locale", () => ({ installLocaleSync: () => () => {} }));
vi.mock("./features/settings/runtime", () => ({ trackRuntimeSettings: () => () => {} }));
vi.mock("./workbench/dialogWindow", () => ({ activateDialogWindow: () => () => {} }));
vi.mock("./features/github/clone/source", () => ({ githubCloneSource: { id: "github" } }));
vi.mock("./features/vcs/cloneWindow", () => ({ activateCloneLaunches: () => () => {}, CloneWindow: () => null }));
describe("bootCloneWindow", () => {
it("provides the embedded terminal the GitHub Sign In dialog needs", () => {
expect(embeddedTerminal()).toBeUndefined();
bootCloneWindow("main");
expect(embeddedTerminal()).toBeTypeOf("function");
});
});