Skip to content

Commit

Permalink
test that dash-preview handles pages with iframes
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinerg committed May 20, 2020
1 parent f9958e2 commit 612fb80
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/unit/plotly-dash-preview_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,23 @@ tap.test('render:', t => {
})
})

t.test('should handle pages with iframes', t => {
// https://github.com/electron/electron/issues/20634
const win = createMockWindow()
sinon.stub(remote, 'createBrowserWindow').returns(win)
win.webContents.executeJavaScript.resolves(true)

fn({
url: 'https://stackoverflow.com/questions/909018/avoiding-initial-memory-heap-size-error',
timeOut: 1
}, {}, (errorCode, result) => {
t.ok(win.webContents.printToPDF.calledOnce)
t.ok(win.close.calledOnce)
t.equal(errorCode, 525, 'code')
t.equal(result.msg, 'dash preview generation failed', 'error msg')
t.end()
})
})

t.end()
})

0 comments on commit 612fb80

Please sign in to comment.