forked from evcc-io/evcc
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfatal.spec.js
23 lines (21 loc) · 978 Bytes
/
fatal.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { test, expect } from "@playwright/test";
import { start, stop, baseUrl } from "./evcc";
test.use({ baseURL: baseUrl() });
test.describe("fatal", async () => {
test("evcc yaml error", async ({ page }) => {
const instance = await start("fatal-syntax.evcc.yaml");
await page.goto("/");
await expect(page.getByTestId("bottom-banner")).toBeVisible();
await expect(page.getByTestId("bottom-banner")).toContainText("failed parsing config file");
await expect(page.getByTestId("generalconfig-password")).not.toBeVisible();
await stop(instance);
});
test("database error", async ({ page }) => {
const instance = await start("fatal-db.evcc.yaml");
await page.goto("/");
await expect(page.getByTestId("bottom-banner")).toBeVisible();
await expect(page.getByTestId("bottom-banner")).toContainText("invalid database");
await expect(page.getByTestId("generalconfig-password")).not.toBeVisible();
await stop(instance);
});
});