mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 04:46:05 +00:00
e2e: added script to auto test adapters
This commit is contained in:
@@ -2,13 +2,16 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { testIds } from "../src/ui/lib/config";
|
||||
|
||||
import { getAdapterConfig } from "./inc/adapters";
|
||||
const config = getAdapterConfig();
|
||||
|
||||
test("start page has expected title", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.goto(config.base_path);
|
||||
await expect(page).toHaveTitle(/BKND/);
|
||||
});
|
||||
|
||||
test("start page has expected heading", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.goto(config.base_path);
|
||||
|
||||
// Example of checking if a heading with "No entity selected" exists and is visible
|
||||
const heading = page.getByRole("heading", { name: /No entity selected/i });
|
||||
@@ -16,7 +19,7 @@ test("start page has expected heading", async ({ page }) => {
|
||||
});
|
||||
|
||||
test("modal opens on button click", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.goto(config.base_path);
|
||||
await page.getByTestId(testIds.data.btnCreateEntity).click();
|
||||
await expect(page.getByRole("dialog")).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user