Files
moreminimore-vibe/e2e-tests/fix_error.spec.ts
Mohamed Aziz Mejri 90c5805b57 adding a button for fixing all errors (#1785)
closes #1688 



<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Add a “Fix All Errors” button to the chat that collects all error
messages and sends a single request to resolve them. This helps users
fix multiple errors in one step.

- New Features
- Parse dyad-output type=error messages and track count/last index in
DyadMarkdownParser.
- Show FixAllErrorsButton after the last error when there are 2+ errors,
not streaming, and chatId is present.
- Button streams a prompt listing all errors, shows a loading state, and
displays the error count.

<sup>Written for commit b9762955d3b9cecd3b00c9efb478ce599f60e32d.
Summary will update automatically on new commits.</sup>

<!-- End of auto-generated description by cubic. -->
2025-12-04 22:20:35 -08:00

32 lines
1018 B
TypeScript

import { testSkipIfWindows, test } from "./helpers/test_helper";
testSkipIfWindows("fix error with AI", async ({ po }) => {
await po.setUp({ autoApprove: true });
await po.sendPrompt("tc=create-error");
await po.snapshotPreviewErrorBanner();
await po.page.getByText("Error Line 6 error", { exact: true }).click();
await po.snapshotPreviewErrorBanner();
await po.clickFixErrorWithAI();
await po.waitForChatCompletion();
await po.snapshotMessages();
// TODO: this is an actual bug where the error banner should not
// be shown, however there's some kind of race condition and
// we don't reliably detect when the HMR update has completed.
// await po.locatePreviewErrorBanner().waitFor({ state: "hidden" });
await po.snapshotPreview();
});
test("fix all errors button", async ({ po }) => {
await po.setUp({ autoApprove: true });
await po.sendPrompt("tc=create-multiple-errors");
await po.clickFixAllErrors();
await po.waitForChatCompletion();
await po.snapshotMessages();
});