Skip to content

Commit fee4d07

Browse files
committed
ci: update assertions
1 parent 1457d6e commit fee4d07

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

e2e/assertions/index.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,18 @@ try {
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
}

0 commit comments

Comments
 (0)