This commit is contained in:
Will Chen
2025-05-31 23:59:55 -07:00
committed by GitHub
parent 5c8cd05cf6
commit 440482356b
5 changed files with 51 additions and 2 deletions

View File

@@ -73,10 +73,18 @@ class PageObject {
await this.getRetryButton().click();
}
async clickUndo() {
await this.getUndoButton().click();
}
private getRetryButton() {
return this.page.getByRole("button", { name: "Retry" });
}
private getUndoButton() {
return this.page.getByRole("button", { name: "Undo" });
}
async sendPrompt(prompt: string) {
await this.page
.getByRole("textbox", { name: "Ask Dyad to build..." })
@@ -84,7 +92,7 @@ class PageObject {
await this.page
.getByRole("textbox", { name: "Ask Dyad to build..." })
.fill(prompt);
await this.page.getByRole("button", { name: "Start new chat" }).click();
await this.page.getByRole("button", { name: "Send message" }).click();
await this.waitForChatCompletion();
}