Skip to content

Instantly share code, notes, and snippets.

@samlucax
Forked from GergKllai1/commands.js
Created February 21, 2020 21:55
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 samlucax/0ece02c792e8e69d183b7998b4eba9a0 to your computer and use it in GitHub Desktop.
Save samlucax/0ece02c792e8e69d183b7998b4eba9a0 to your computer and use it in GitHub Desktop.
Cypress.Commands.add("loggedInAs", uid => {
window.localStorage.setItem("access-token", "jVUfYw92zjFCtGMTZilctw");
window.localStorage.setItem("client", "e_1a0iMA4uG52JMl9f8uog");
window.localStorage.setItem("expiry", "1558352526");
window.localStorage.setItem("token-type", "Bearer");
window.localStorage.setItem("uid", uid);
cy.visit("http://localhost:3001");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment