Skip to content
Snippets Groups Projects

Draft: Resolve "Implement user journey tests"

Open trantzas requested to merge 26-implement-user-journey-tests into develop
9 files
+ 176
27
Compare changes
  • Side-by-side
  • Inline
Files
9
+ 15
2
describe('user authentication', () => {
beforeEach(() => {
cy.visit(window.location.origin);
})
//edit profile bug
it('should block unauthenticated user from entering a protected route', () => {
cy.checkProtectedRoutes();
cy.fixture("routes.json").then((data) => {
cy.log(data.routes);
// cy.wrap(data.routes).as("protectedRoutes");
for(let route of data.routes) {
cy.intercept(route);
cy.log(route);
cy.visit(route);
cy.location("pathname").should("equal", "/");
}
});
});
it('should display login errors when nothing is typed', () => {
@@ -39,6 +51,7 @@ describe('user authentication', () => {
});
it('should login, logout', () => {
cy.loginPath(':nth-child(2) > .container > .row > :nth-child(2) > a > .btn', '/services');
cy.get('#navbarDropdown2').click();
cy.window().then((win) => {
@@ -49,7 +62,7 @@ describe('user authentication', () => {
cy.location("pathname").should("equal", "/");
});
it.skip('forget password should work', () => {
it('forget password should work', () => {
cy.get(':nth-child(1) > .nav-link').click();
cy.location("pathname").should("equal", '/services');
cy.get('.btn').should("contain", "Sign In").click();
Loading