Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow #411

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open

Workflow #411

wants to merge 25 commits into from

Conversation

martindyr
Copy link

No description provided.

Copy link
Member

@jaaneh jaaneh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall very good. I'd recommend you add tests for localStorage like noted below, though. Rest is well configured and tests make sense.

cypress.config.js Show resolved Hide resolved
cy.get("#loginPassword").type(password);
cy.get("button[type=submit]").contains("Login").wait(200).click();
cy.wait(500);
cy.url().should("include", "profile");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should have a check here for localStorage containing the token/user info that's stored on login.

"have.been.calledOnceWith",
"Either your username was not found or your password is incorrect",
);
cy.url().should("not.contain", "profile");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you can add a check to make sure nothing is saved to localStorage if login fails?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants