import * as SUT from '../../playwright-fluent' ; describe ( 'Playwright Fluent - expect is unchecked' , ( ) : void => { let p ; beforeEach ( ( ) : void => { p = new SUT . PlaywrightFluent ( ) ; } ) ; afterEach ( async ( ) : Promise < void > => { await p . close ( ) ; } ) ; test ( 'should give back an error on expectThat.isUnchecked when browser has not been launched' , async ( ) : Promise < void > => { let result = undefined ; try { await p . expectThatSelector ( 'foobar' ) . isUnchecked ( ) ; } catch ( error ) { result = error as Error ; } expect ( result && result . message ) . toContain ( "Cannot get checked status of 'foobar' because no browser has been launched" ) ; } ) ; test ( 'should give back an error on expectThat(selector-fluent).isUnchecked when browser has not been launched' , async ( ) : Promise < void > => { const selector = p . selector ( 'foobar' ) ; let result = undefined ; try { await p . expectThatSelector ( selector ) . isUnchecked ( ) ; } catch ( error ) { result = error as Error ; } expect ( result && result . message ) . toContain ( "Cannot get checked status of 'selector(foobar)' because no browser has been launched" ) ; } ) ; } ) ;