File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff 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
384383export async function clickContinue ( ) : Promise < void > {
385- await debugMovement ( "#continue-debug" )
384+ await debugMovement ( "#continue-debug" ) ;
386385}
387386
388387export async function clickNext ( ) : Promise < void > {
389- await debugMovement ( "#next-debug" )
388+ await debugMovement ( "#next-debug" ) ;
390389}
391390
392391export 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}
Original file line number Diff line number Diff line change 1+ /* eslint-disable @typescript-eslint/no-magic-numbers */
2+
13import { test , expect } from "@playwright/test" ;
24import {
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
1416ctRun ( "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} ) ;
You can’t perform that action at this time.
0 commit comments