import { expect } from 'chai' ; import * as path from 'path' ; import { InputBox , StatusBar , VSBrowser } from 'vscode-extension-tester' ; describe ( 'Example status bar tests' , ( ) => { let statusBar ; before ( async ( ) => { statusBar = new StatusBar ( ) ; await VSBrowser . instance . openResources ( path . join ( 'src' , 'ui-test' , 'resources' , 'problems.ts' ) ) ; } ) ; it ( 'Generic items' , async ( ) => { const item = await statusBar . getItem ( 'TypeScript' ) ; expect ( item ) . not . undefined ; const items = await statusBar . getItems ( ) ; expect ( items . length ) . greaterThan ( 2 ) ; } ) ; it ( 'Items bound to open file' , async ( ) => { await statusBar . openEncodingSelection ( ) ; await ( await InputBox . create ( ) ) . cancel ( ) ; } ) ; it ( 'Notifications' , async ( ) => { await statusBar . openNotificationsCenter ( ) ; await statusBar . closeNotificationsCenter ( ) ; } ) ; } ) ;