mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
apply prettier fixes to new e2e files
This commit is contained in:
parent
91c5b1b785
commit
741c5abdc3
@ -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 "));
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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. */
|
||||
|
||||
@ -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). */
|
||||
|
||||
@ -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 }) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user