import { expect, test } from "@playwright/test"; import { captureScreenshot, completeOnboarding, openUserSettings, routePatchRpc, signup, } from "./helpers"; test("settings hide Models when the deployment routes models itself", async ({ page, }, testInfo) => { await routePatchRpc(page, "me", (json) => ({ ...json, modelsManaged: true })); await routePatchRpc(page, "bootstrap", (json) => ({ ...json, me: { ...(json.me as Record), modelsManaged: true }, })); const stamp = Date.now(); await signup(page, `models-managed-${stamp}@rakazo.test`, "password12", `Managed ${stamp}`); await completeOnboarding(page); const settings = await openUserSettings(page); await expect(settings.getByTestId("settings-nav-general")).toBeVisible(); await expect(settings.getByTestId("settings-nav-memory")).toBeVisible(); await expect(settings.getByTestId("settings-nav-models")).toHaveCount(0); await captureScreenshot(page, testInfo, "settings-models-managed"); });