test(e2e): refactor to benefit from WDIO Electron service types fixes

Related: webdriverio-community/wdio-electron-service#957
This commit is contained in:
Kirill Gavrilov 2025-03-06 02:30:36 +03:00
parent 4f0c0c5308
commit 5a511dee07

View file

@ -173,10 +173,9 @@ https://www.youtube.com/watch?v=k_ItB5btREU
// eslint-disable-next-line wdio/no-pause
await browser.pause(100)
// eslint-disable-next-line @typescript-eslint/await-thenable, @typescript-eslint/no-base-to-string
const textFromAllNoteParagraphs = await $$('.markdown-preview-section p:not(.mod-ui)')
const textLinesFromAllNoteParagraphs = $$('.markdown-preview-section p:not(.mod-ui)')
.map(p => p.getText())
.join('\n\n')
const textFromAllNoteParagraphs = (await textLinesFromAllNoteParagraphs).join('\n\n')
await expect(textFromAllNoteParagraphs).toBe(noteContent)
})
})