Prompt gallery (#957)

- [x] show prompt instead of app in autocomplete
- [x] use proper array/list for db (tags)
- [x] don't do <dyad-prompt> - replace inline
This commit is contained in:
Will Chen
2025-08-18 13:25:11 -07:00
committed by GitHub
parent a547735714
commit 573642ae5f
26 changed files with 1540 additions and 42 deletions

View File

@@ -727,6 +727,30 @@ export class PageObject {
await this.page.getByRole("link", { name: "Settings" }).click();
}
async goToLibraryTab() {
await this.page.getByRole("link", { name: "Library" }).click();
}
async createPrompt({
title,
description,
content,
}: {
title: string;
description?: string;
content: string;
}) {
await this.page.getByRole("button", { name: "New Prompt" }).click();
await this.page.getByRole("textbox", { name: "Title" }).fill(title);
if (description) {
await this.page
.getByRole("textbox", { name: "Description (optional)" })
.fill(description);
}
await this.page.getByRole("textbox", { name: "Content" }).fill(content);
await this.page.getByRole("button", { name: "Save" }).click();
}
getTitleBarAppNameButton() {
return this.page.getByTestId("title-bar-app-name-button");
}