feat(FN-1441): correct Models settings scope to mixed and update renderScopeBanner
- Correct Models section scope from project to mixed since it contains both global settings (provider/model) and project overrides - Update renderScopeBanner to support mixed scope type with globe+folder icon - Add scope-banner-mixed CSS class for consistent styling of mixed-scope banners - Update SettingsModal tests to cover mixed scope behavior
This commit is contained in:
@@ -2059,10 +2059,11 @@ describe("SettingsModal", () => {
|
||||
expect(container.querySelector(".settings-scope-project")).toBeTruthy();
|
||||
expect(container.querySelector(".settings-scope-global")).toBeNull();
|
||||
|
||||
// Switch to Models → should show project banner
|
||||
// Switch to Models → should show mixed scope banner (contains both global and project settings)
|
||||
fireEvent.click(screen.getAllByText("Models")[0]);
|
||||
expect(container.querySelector(".settings-scope-project")).toBeTruthy();
|
||||
expect(container.querySelector(".settings-scope-global")).toBeNull();
|
||||
expect(container.querySelector(".settings-scope-mixed")).toBeTruthy();
|
||||
expect(container.querySelector(".settings-scope-mixed")?.textContent).toContain("global");
|
||||
expect(container.querySelector(".settings-scope-mixed")?.textContent).toContain("project");
|
||||
});
|
||||
|
||||
// --- Settings save error handling tests ---
|
||||
|
||||
Reference in New Issue
Block a user