mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add <ErrorAlert /> debug details (#22462)
Closes #22140 Short simple and sweet PR to add a bunch of details to our `<Alert />` stacks. This means we aren't simply asking the user to read the developer console and surface things easier. - Implement `Response data` and `Stack trace` `<details />` - Fix overflow in `ErrorAlert` debug accordions so long `Response data` and `Stack Trace` content stays inside the alert. - Add horizontal scroll wrappers around both `<pre>` blocks used in debug details. - Update `Alert` layout with `min-w-0` on flex containers so nested content can shrink correctly and internal scrolling works as intended. <img width="739" height="550" alt="preview-validation" src="https://github.com/user-attachments/assets/a6f890d3-8f1f-4fd6-b9d0-882838db04a4" />
This commit is contained in:
@@ -69,5 +69,9 @@ test("show error if `match` parameter is invalid", async ({ page }) => {
|
||||
},
|
||||
);
|
||||
await page.getByRole("button", { name: /confirm and create/i }).click();
|
||||
await expect(page.getByText("Invalid match value")).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole("alert").getByRole("heading", {
|
||||
name: "Invalid match value",
|
||||
}),
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user