Files
cozsweet-frontend-nextjs/e2e/fixtures/helpers/assertions.ts
T

11 lines
438 B
TypeScript

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;
}