mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 04:46:05 +00:00
implement/init e2e tests (#135)
* init e2e * updated/moved vitest, finished merge * fix bun picking up e2e tests * e2e: overwrite webserver config with env * e2e: added adapter configs * e2e: replaced image
This commit is contained in:
22
app/e2e/base.e2e-spec.ts
Normal file
22
app/e2e/base.e2e-spec.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
// @ts-check
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { testIds } from "../src/ui/lib/config";
|
||||
|
||||
test("start page has expected title", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await expect(page).toHaveTitle(/BKND/);
|
||||
});
|
||||
|
||||
test("start page has expected heading", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
|
||||
// Example of checking if a heading with "No entity selected" exists and is visible
|
||||
const heading = page.getByRole("heading", { name: /No entity selected/i });
|
||||
await expect(heading).toBeVisible();
|
||||
});
|
||||
|
||||
test("modal opens on button click", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.getByTestId(testIds.data.btnCreateEntity).click();
|
||||
await expect(page.getByRole("dialog")).toBeVisible();
|
||||
});
|
||||
Reference in New Issue
Block a user