* fix(e2e): harden onboarding-model-labels rpc/me intercept
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>
* fix(e2e): migrate rpc/me intercept anti-pattern across specs
Extend helpers with fulfillFetchedRpc for multi-procedure or in-place
patches. Move onboarding, mobile, host-computer, and group-chats specs
off route.fulfill({ response, json }) after response.json().
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* style(e2e): biome-format host-computer-prompt rpc/me cast
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
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);
|
|
});
|