Guest User

Untitled

a guest
Nov 13th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Cypress.Commands.add('login', (overrides = {}) => {
  2. Cypress.log({
  3. name: 'loginViaAuth0',
  4. });
  5.  
  6. const options = {
  7. method: 'POST',
  8. url: Cypress.env('auth_url'),
  9. body: {
  10. grant_type: 'password',
  11. username: Cypress.env('auth_username'),
  12. password: Cypress.env('auth_password'),
  13. audience: Cypress.env('auth_audience'),
  14. scope: 'openid profile email',
  15. client_id: Cypress.env('auth_client_id'),
  16. client_secret: Cypress.env('auth_client_secret'),
  17. },
  18. };
  19. cy.request(options);
  20. });
Add Comment
Please, Sign In to add comment