undo e2e (#300)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user