import * as SUT from './index' ; import { exists } from '..' ; import { Browser , webkit } from 'playwright' ; describe . skip ( 'show-mouse-position' , ( ) : void => { let browser = undefined ; beforeEach ( ( ) : void => { } ) ; afterEach ( async ( ) : Promise < void > => { if ( browser ) { await browser . close ( ) ; } } ) ; test ( 'should show cursor on the page on webkit' , async ( ) : Promise < void > => { const url = 'https://reactstrap.github.io/components/form' ; browser = await webkit . launch ( { headless : true } ) ; const context = await browser . newContext ( { viewport : null } ) ; const page = await context . newPage ( ) ; await SUT . showMousePosition ( page ) ; await page . goto ( url ) ; const cursorExists = await exists ( 'playwright-mouse-pointer' , page ) ; expect ( cursorExists ) . toBe ( true ) ; } ) ; test ( 'should show cursor on navigating to another page on webkit' , async ( ) : Promise < void > => { const url = 'https://reactstrap.github.io/components/form' ; browser = await webkit . launch ( { headless : true } ) ; const context = await browser . newContext ( { viewport : null } ) ; const page = await context . newPage ( ) ; await SUT . showMousePosition ( page ) ; await page . goto ( url ) ; await page . waitForTimeout ( 3000 ) ; await page . goto ( 'https://github.com/' ) ; const cursorExists = await exists ( 'playwright-mouse-pointer' , page ) ; expect ( cursorExists ) . toBe ( true ) ; } ) ; } ) ;