apply prettier fixes to new e2e files

This commit is contained in:
Josh Hawkins 2026-04-08 16:34:36 -05:00
parent 91c5b1b785
commit 741c5abdc3
5 changed files with 8 additions and 14 deletions

View File

@ -32,7 +32,10 @@ function isAllowlisted(message: string, allowlist: RegExp[]): boolean {
function firstStackFrame(stack: string | undefined): string | undefined {
if (!stack) return undefined;
const lines = stack.split("\n").map((l) => l.trim()).filter(Boolean);
const lines = stack
.split("\n")
.map((l) => l.trim())
.filter(Boolean);
// Skip the error message line (line 0); return the first "at ..." frame
return lines.find((l) => l.startsWith("at "));
}

View File

@ -22,10 +22,7 @@ import {
type ApiMockOverrides,
} from "../helpers/api-mocker";
import { WsMocker } from "../helpers/ws-mocker";
import {
installErrorCollector,
type ErrorCollector,
} from "./error-collector";
import { installErrorCollector, type ErrorCollector } from "./error-collector";
import { GLOBAL_ALLOWLIST } from "./error-allowlist";
export class FrigateApp {

View File

@ -21,9 +21,7 @@ export async function mockEmpty(
page: Page,
urlPattern: string | RegExp,
): Promise<void> {
await page.route(urlPattern, (route) =>
route.fulfill({ json: [] }),
);
await page.route(urlPattern, (route) => route.fulfill({ json: [] }));
}
/** Return an HTTP error for the matched endpoint. Default status 500. */

View File

@ -123,7 +123,7 @@ export class BasePage {
if (this.isDesktop) {
return this.pageRoot;
}
return this.page.locator('[vaul-drawer]').first();
return this.page.locator("[vaul-drawer]").first();
}
/** Close any currently-open mobile overlay (drawer, sheet, dialog). */

View File

@ -4,11 +4,7 @@
*/
import { test, expect } from "../../fixtures/frigate-test";
import {
mockEmpty,
mockError,
mockDelay,
} from "../../helpers/mock-overrides";
import { mockEmpty, mockError, mockDelay } from "../../helpers/mock-overrides";
test.describe("Mock Overrides — empty @meta", () => {
test("mockEmpty returns []", async ({ page, frigateApp }) => {