File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9494 } ,
9595 async hasExpectedLog ( workbench : Workbench , expectedLog : RegExp | string ) {
9696 const bottomBar = workbench . getBottomBar ( )
97+ await bottomBar . toggle ( true )
98+ let action
99+ try {
100+ action = await bottomBar . elem
101+ . $ ( bottomBar . locators . globalActions )
102+ . $ ( `.//a[contains(@aria-label, '${ bottomBar . locators . maximize } ') and @role='checkbox']` )
103+ } catch {
104+ // the panel is already maximized
105+ }
106+ if ( action ) {
107+ await action . click ( )
108+ }
97109 const outputView = await bottomBar . openOutputView ( )
98110 await outputView . selectChannel ( 'WebdriverIO' )
99111 const logs = await outputView . getText ( )
@@ -102,7 +114,7 @@ try {
102114
103115 const pass = logs . some ( ( log ) => regexp . test ( log ) )
104116 const message = pass ? 'The log outputs include expected text.' : 'The expected text is not included'
105- return { pass, message }
117+ return { pass, message : ( ) => message }
106118 } ,
107119 } )
108120 }
You can’t perform that action at this time.
0 commit comments