Skip to content

Instantly share code, notes, and snippets.

@Robdel12
Created July 15, 2019 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Robdel12/a499045edf454e95355344bab895bae7 to your computer and use it in GitHub Desktop.
Save Robdel12/a499045edf454e95355344bab895bae7 to your computer and use it in GitHub Desktop.
Interactor.js + Cypress
beforeEach(function() {
// Tell Interactor where the applications DOM is
// since Cypress runs the test specs in an isolated iframe (away from the app DOM)
cy.window().then(remoteWindow => {
Object.defineProperty(Interactor.prototype, "$dom", {
get() {
return remoteWindow;
}
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment