Skip to content

Sambego/cypress-auth0-spa

Repository files navigation

Setup

  • Add Auth0 credentials to src/config.js
  • Add Auth0 credentials to cypress.json
  • Compile and watch with npm run dev
  • Run dev server with npm run start
  • Run tests with npm run test

Optionally

  • When changing things in the code, run npm run dev to recompile the code.

Cypress task usage

describe("Auth0 cypress command test", () => {
    it("Navigates trough the website", () => {
        // Go to the homepage
        cy.visit("http://localhost:8080").then(() => {
            cy.loginWithAuth0(Cypress.env("username"), Cypress.env("password"));

            ...

            cy.logout();
        });
    });
});

The Cypress command assumes the Auth0 credentials, a username and password are set in the cypress.json file.

Screenshot

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published