test: attempt to fix flaky webview.clearHistory test (#19083)

This commit is contained in:
Jeremy Apthorp 2019-07-02 13:48:26 -07:00 committed by GitHub
parent 39c4a5411d
commit c2d78deeca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -917,11 +917,12 @@ describe('<webview> tag', function () {
describe('<webview>.clearHistory()', () => {
it('should clear the navigation history', async () => {
loadWebView(webview, {
const message = waitForEvent(webview, 'ipc-message')
await loadWebView(webview, {
nodeintegration: 'on',
src: `file://${fixtures}/pages/history.html`
})
const event = await waitForEvent(webview, 'ipc-message')
const event = await message
expect(event.channel).to.equal('history')
expect(event.args[0]).to.equal(2)