fix: title generation + ai sdk upgrade (#1392)
This commit is contained in:
parent
f19d3d4071
commit
9d5d8a3ea7
38 changed files with 1422 additions and 2360 deletions
|
|
@ -9,12 +9,18 @@ test.describe("Model Selector", () => {
|
|||
|
||||
test("displays a model button", async ({ page }) => {
|
||||
// Look for any button with model-related content
|
||||
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
|
||||
const modelButton = page
|
||||
.locator("button")
|
||||
.filter({ hasText: MODEL_BUTTON_REGEX })
|
||||
.first();
|
||||
await expect(modelButton).toBeVisible();
|
||||
});
|
||||
|
||||
test("opens model selector popover on click", async ({ page }) => {
|
||||
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
|
||||
const modelButton = page
|
||||
.locator("button")
|
||||
.filter({ hasText: MODEL_BUTTON_REGEX })
|
||||
.first();
|
||||
await modelButton.click();
|
||||
|
||||
// Search input should be visible in the popover
|
||||
|
|
@ -22,7 +28,10 @@ test.describe("Model Selector", () => {
|
|||
});
|
||||
|
||||
test("can search for models", async ({ page }) => {
|
||||
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
|
||||
const modelButton = page
|
||||
.locator("button")
|
||||
.filter({ hasText: MODEL_BUTTON_REGEX })
|
||||
.first();
|
||||
await modelButton.click();
|
||||
|
||||
const searchInput = page.getByPlaceholder("Search models...");
|
||||
|
|
@ -33,7 +42,10 @@ test.describe("Model Selector", () => {
|
|||
});
|
||||
|
||||
test("can close model selector by clicking outside", async ({ page }) => {
|
||||
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
|
||||
const modelButton = page
|
||||
.locator("button")
|
||||
.filter({ hasText: MODEL_BUTTON_REGEX })
|
||||
.first();
|
||||
await modelButton.click();
|
||||
|
||||
await expect(page.getByPlaceholder("Search models...")).toBeVisible();
|
||||
|
|
@ -45,7 +57,10 @@ test.describe("Model Selector", () => {
|
|||
});
|
||||
|
||||
test("shows model provider groups", async ({ page }) => {
|
||||
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
|
||||
const modelButton = page
|
||||
.locator("button")
|
||||
.filter({ hasText: MODEL_BUTTON_REGEX })
|
||||
.first();
|
||||
await modelButton.click();
|
||||
|
||||
// Should show provider group headers
|
||||
|
|
@ -54,7 +69,10 @@ test.describe("Model Selector", () => {
|
|||
});
|
||||
|
||||
test("can select a different model", async ({ page }) => {
|
||||
const modelButton = page.locator("button").filter({ hasText: MODEL_BUTTON_REGEX }).first();
|
||||
const modelButton = page
|
||||
.locator("button")
|
||||
.filter({ hasText: MODEL_BUTTON_REGEX })
|
||||
.first();
|
||||
await modelButton.click();
|
||||
|
||||
// Select a specific model
|
||||
|
|
@ -64,6 +82,8 @@ test.describe("Model Selector", () => {
|
|||
await expect(page.getByPlaceholder("Search models...")).not.toBeVisible();
|
||||
|
||||
// Model button should now show the selected model
|
||||
await expect(page.locator("button").filter({ hasText: "Claude Haiku" }).first()).toBeVisible();
|
||||
await expect(
|
||||
page.locator("button").filter({ hasText: "Claude Haiku" }).first()
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue