forked from evcc-io/evcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheating.spec.js
29 lines (24 loc) · 907 Bytes
/
heating.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
24
25
26
27
28
29
import { test, expect } from "@playwright/test";
import { start, stop, baseUrl } from "./evcc";
test.use({ baseURL: baseUrl() });
test.beforeAll(async () => {
await start("heating.evcc.yaml", "password.sql");
});
test.afterAll(async () => {
await stop();
});
test.beforeEach(async ({ page }) => {
await page.goto("/");
});
test.describe("loadpoint", async () => {
test("initial values", async ({ page }) => {
await expect(page.getByTestId("current-soc")).toContainText("55.0°C");
await expect(page.getByTestId("limit-soc")).toContainText("100.0°C");
});
test("change limit in 1° steps", async ({ page }) => {
await page.getByTestId("limit-soc").getByRole("combobox").selectOption("69.0°C");
await expect(page.getByTestId("limit-soc")).toContainText("69.0°C");
await page.reload();
await expect(page.getByTestId("limit-soc")).toContainText("69.0°C");
});
});