Avoid passing a consumed fetch Response into route.fulfill alongside json, which intermittently throws Response has been disposed in CI. Add routePatchRpc helper that reads the body once and fulfills with status, headers, and patched json only. Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
20 lines
762 B
TypeScript
20 lines
762 B
TypeScript
import { expect, test } from "@playwright/test";
|
|
import { routePatchRpc, signup } from "./helpers";
|
|
|
|
test("onboarding no longer gates first run on a model picker", async ({ page }) => {
|
|
await routePatchRpc(page, "me", (json) => ({
|
|
...json,
|
|
needsModel: true,
|
|
defaultProvider: "openrouter",
|
|
defaultModel: "openai/gpt-5.6-luna",
|
|
}));
|
|
|
|
const stamp = Date.now();
|
|
await signup(page, `model-labels-${stamp}@rakazo.test`, "password12", `Model labels ${stamp}`);
|
|
await expect(page.getByRole("heading", { name: /Design your Oo/i })).toBeVisible({
|
|
timeout: 20_000,
|
|
});
|
|
await expect(page.getByRole("heading", { name: "Connect a model" })).toHaveCount(0);
|
|
await expect(page.getByRole("combobox", { name: "Provider" })).toHaveCount(0);
|
|
});
|