Add .prettierrc.json and refactor test files for improved formatting consistency:

- Introduced `.prettierrc.json` to enforce consistent code formatting across the project.
- Updated unit and e2e test files to address formatting issues, improve readability, and ensure alignment with the new Prettier configuration.
This commit is contained in:
Jeppe Bundgaard
2026-04-13 09:13:27 +02:00
parent f040614f46
commit b39b458f4f
149 changed files with 7212 additions and 6178 deletions
@@ -186,7 +186,8 @@ const longReasonSnapshot = {
configured: true,
probe_supported: true,
status: "configured",
status_reason: "Shelly cloud credentials are configured, but no known device id is available for a safe read-only probe.",
status_reason:
"Shelly cloud credentials are configured, but no known device id is available for a safe read-only probe.",
status_reason_key: "shelly_no_device_id",
status_reason_params: {},
checked_at: "2026-04-08T08:45:00.000Z",
@@ -231,7 +232,9 @@ test.describe("Superuser system status smoke", () => {
await primeSuperuserSession(page);
});
test("@smoke superuser status dashboard renders Danish translations for degraded infrastructure and recent sessions", async ({ page }) => {
test("@smoke superuser status dashboard renders Danish translations for degraded infrastructure and recent sessions", async ({
page,
}) => {
await installSystemStatusMock(page, degradedSnapshot);
await page.goto("/superuser");
@@ -286,10 +289,7 @@ test.describe("Superuser system status smoke", () => {
expect(pillBox).not.toBeNull();
expect(reasonBox).not.toBeNull();
const headerBottom = Math.max(
titleBox.y + titleBox.height,
pillBox.y + pillBox.height
);
const headerBottom = Math.max(titleBox.y + titleBox.height, pillBox.y + pillBox.height);
expect(reasonBox.y).toBeGreaterThanOrEqual(headerBottom - 1);
});