refactor(webui): open models directly for first-run setup
This commit is contained in:
1 parent
1c1f746903
commit
05100b70ad
22 files changed
+75
-627
No files matched your search
@@ -481,7 +481,7 @@ describe("App layout", () => {
|
||||
expect(screen.getByRole("heading", { level: 1, name: "Settings" })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("carries a first-run setup path into settings and restores composer focus", async () => {
|
||||
it("opens the full Models settings directly from the first-run prompt", async () => {
|
||||
const user = userEvent.setup();
|
||||
const base = baseSettingsPayload();
|
||||
mockFetchRoutes({
|
||||
@@ -496,26 +496,6 @@ describe("App layout", () => {
|
||||
},
|
||||
model_presets: [],
|
||||
model_call_order: [],
|
||||
providers: [
|
||||
{
|
||||
name: "openai_codex",
|
||||
label: "OpenAI Codex",
|
||||
configured: false,
|
||||
auth_type: "oauth",
|
||||
},
|
||||
{
|
||||
name: "deepseek",
|
||||
label: "DeepSeek",
|
||||
configured: false,
|
||||
auth_type: "api_key",
|
||||
},
|
||||
{
|
||||
name: "ollama",
|
||||
label: "Ollama",
|
||||
configured: false,
|
||||
api_base: "http://127.0.0.1:11434",
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -523,23 +503,14 @@ describe("App layout", () => {
|
||||
|
||||
await waitFor(() => expect(connectSpy).toHaveBeenCalled());
|
||||
await user.click(await screen.findByRole("button", { name: "Choose your AI" }));
|
||||
await user.click(await screen.findByRole("button", { name: "Run locally" }));
|
||||
|
||||
expect(
|
||||
await screen.findByRole("navigation", { name: "Settings sections" }),
|
||||
).toBeInTheDocument();
|
||||
const providerMenu = await screen.findByRole("menu");
|
||||
expect(within(providerMenu).getByRole("menuitem", { name: "Ollama" }))
|
||||
expect(screen.getByText("Model providers")).toBeInTheDocument();
|
||||
expect(screen.getByRole("button", { name: "Add your own model provider" }))
|
||||
.toBeInTheDocument();
|
||||
expect(within(providerMenu).queryByRole("menuitem", { name: "OpenAI Codex" }))
|
||||
.not.toBeInTheDocument();
|
||||
expect(within(providerMenu).queryByRole("menuitem", { name: "DeepSeek" }))
|
||||
.not.toBeInTheDocument();
|
||||
|
||||
const composer = screen.getByRole("textbox", { name: "Message input" });
|
||||
expect(composer).not.toHaveFocus();
|
||||
await user.click(screen.getByRole("button", { name: "Back to chat" }));
|
||||
await waitFor(() => expect(composer).toHaveFocus());
|
||||
expect(screen.queryByRole("dialog", { name: "Choose your AI" })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("places Automations after Skills in the main sidebar", async () => {
|
||||
|
||||
Reference in new issue
Block a user