import { expect, type Page } from "@playwright/test"; export async function expectInsufficientCreditsDialog(page: Page) { const dialog = page.getByRole("dialog", { name: "Not enough credits" }); await expect(dialog).toBeVisible(); await expect(dialog.getByText("Balance")).toBeVisible(); await expect(dialog.getByText("Required")).toBeVisible(); await expect(dialog.getByText("Still needed")).toBeVisible(); return dialog; }