Skip to content

Commit 71507a1

Browse files
committed
cleanup: run prettier, address eslint warnings
1 parent ec5510b commit 71507a1

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

ui-tests/tests/lib/ct_helpers.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,27 +378,26 @@ async function debugMovement(selector: string): Promise<void> {
378378

379379
await page.locator(selector).click();
380380
await readyOnCompleteMove(initialValue);
381-
382381
}
383382

384383
export async function clickContinue(): Promise<void> {
385-
await debugMovement("#continue-debug")
384+
await debugMovement("#continue-debug");
386385
}
387386

388387
export async function clickNext(): Promise<void> {
389-
await debugMovement("#next-debug")
388+
await debugMovement("#next-debug");
390389
}
391390

392391
export async function readyOnCompleteMove(initialValue: number): Promise<void> {
393392
const movement = page.locator(".test-movement");
394393
const elementHandle = await movement.elementHandle();
395-
if (!elementHandle) throw new Error("Element not found");
394+
if (elementHandle === null) throw new Error("Element not found");
396395

397396
await page.waitForFunction(
398397
({ el, expected }) => {
399398
const current = parseInt(el.textContent ?? "", 10);
400399
return !isNaN(current) && current !== expected;
401400
},
402-
{ el: await movement.evaluateHandle(el => el), expected: initialValue } // pass both in an object
401+
{ el: await movement.evaluateHandle((el) => el), expected: initialValue }, // pass both in an object
403402
);
404403
}
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1+
/* eslint-disable @typescript-eslint/no-magic-numbers */
2+
13
import { test, expect } from "@playwright/test";
24
import {
3-
window,
4-
page,
5-
// wait,
5+
// window,
6+
// page,
7+
wait,
68
// debugCodetracer,
79
readyOnEntryTest as readyOnEntry,
810
clickNext,
911
clickContinue,
1012
ctRun,
1113
} from "../lib/ct_helpers";
12-
import { StatusBar } from "../page_objects/status_bar";
14+
// import { StatusBar } from "../page_objects/status_bar";
1315

1416
ctRun("noir_example/");
1517

16-
const ENTRY_LINE = 17;
17-
18-
test("continue", async() => {
19-
await readyOnEntry();
20-
await clickContinue();
18+
test("continue", async () => {
19+
await readyOnEntry();
20+
await wait(5_000);
21+
await clickContinue();
22+
expect(true);
2123
});
2224

23-
test("next", async() => {
24-
await readyOnEntry();
25-
await clickNext();
25+
test("next", async () => {
26+
await readyOnEntry();
27+
await clickNext();
2628
});

0 commit comments

Comments
 (0)