Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 497 Bytes

File metadata and controls

13 lines (7 loc) · 497 Bytes

Stubbing window.print

This is an example showing how to stub window.print method call

The application

The page index.html calls window.print on button click. Without stubbing, the test would click and then a system print dialog would block the rest of the test.

System print dialog

By stubbing the window.print the spec.cy.js can confirm the call has happened.

Stub window print test