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 { function firstStackFrame(stack: string | undefined): string | undefined {
if (!stack) return 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 // Skip the error message line (line 0); return the first "at ..." frame
return lines.find((l) => l.startsWith("at ")); return lines.find((l) => l.startsWith("at "));
} }

View File

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

View File

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

View File

@ -123,7 +123,7 @@ export class BasePage {
if (this.isDesktop) { if (this.isDesktop) {
return this.pageRoot; 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). */ /** Close any currently-open mobile overlay (drawer, sheet, dialog). */

View File

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