test(e2e): type the guardrail name before deleting it in the guardrail UI specs

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
mateo 2026-10-21 10:33:28 +00:00
parent 2b7c7fd962
commit 4ff9ee625e
2 changed files with 3 additions and 0 deletions

View file

@ -195,6 +195,7 @@ test.describe("Guardrails", () => {
const modal = page.getByRole("dialog");
await expect(modal).toBeVisible({ timeout: 5_000 });
await modal.getByPlaceholder(guardrailName).fill(guardrailName);
await modal.getByRole("button", { name: "Delete", exact: true }).click();
await expect(page.getByRole("row").filter({ hasText: guardrailName })).toHaveCount(0, { timeout: 15_000 });
@ -281,6 +282,7 @@ test.describe("Guardrails", () => {
const deleteModal = page.getByRole("dialog", { name: "Delete Guardrail" });
await expect(deleteModal).toBeVisible({ timeout: 5_000 });
await deleteModal.getByPlaceholder(guardrailName).fill(guardrailName);
await deleteModal.getByRole("button", { name: "Delete", exact: true }).click();
await expect(page.getByText(`Guardrail "${guardrailName}" deleted successfully`)).toBeVisible({

View file

@ -58,6 +58,7 @@ async function deleteGuardrail(page: PlaywrightPage, guardrailName: string): Pro
await page.getByRole("menuitem", { name: "Delete" }).click();
const deleteModal = page.getByRole("dialog", { name: "Delete Guardrail" });
await expect(deleteModal).toBeVisible({ timeout: 5_000 });
await deleteModal.getByPlaceholder(guardrailName).fill(guardrailName);
await deleteModal.getByRole("button", { name: "Delete", exact: true }).click();
await expect(page.getByText(`Guardrail "${guardrailName}" deleted successfully`)).toBeVisible({ timeout: 10_000 });
}