Skip to content

Commit

Permalink
feat: cypress after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenGeo committed Mar 23, 2021
1 parent 019c426 commit 3507074
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
git-message: "chore(release): {version}"
release-count: 10
cypress-run:
needs: detect-changes
needs: bump-version
if: |
always() &&
github.event_name == 'push'
Expand Down
2 changes: 1 addition & 1 deletion cypress.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"baseUrl": "https://ibf-test.510.global"
"baseUrl": "http://localhost:4200"
}
9 changes: 6 additions & 3 deletions cypress/integration/IBF-dashboard/login.spec.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
describe('Login Page', () => {
beforeEach(() => {
// cy.setDashboard();
cy.server();
});

// Real API call
it('lets the user log in', function () {
cy.fixture('login').then((login) => {
cy.visit(login.portal);

cy.get('input[name="email"]').type(login.email);
cy.get('input[name="password"]').type(login.password);

cy.contains('Log In').click();
cy.get('[data-cy=logged-in-as]').contains('Logged In As:');

cy.get('[data-cy=logged-in-as]').contains('Logged In As:')
cy.url().should("include", "/", () => {
expect(localStorage.getItem("jwt")).to.exist()
})
});
});

Expand Down

0 comments on commit 3507074

Please sign in to comment.