Skip to content

Commit

Permalink
Add e2e tests to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
almeida1492 committed Sep 28, 2020
1 parent 89fc0df commit 2137ee8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@ jobs:
run: npm i
- name: Building...
run: npm run build

e2e:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Cypress run
uses: cypress-io/github-action@v1
with:
record: false
start: npm run serve
working-directory: src
22 changes: 13 additions & 9 deletions cypress/integration/login_activity_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,28 @@ describe("LoginActivity spec", () => {
cy.get("[class=login__panel]").contains("LOG IN");
});

// it("should have username input field and a submit button when on resetPassword mode", () => {
// cy.contains("Forgot the password?").click();
// cy.get("[id=username]");
// cy.get("[id=password]").should("not.exist");
// cy.get("[class=send-request]");
// });
// Waiting to be implemented
it.skip("should have username input field and a submit button when on resetPassword mode", () => {
cy.contains("Forgot the password?").click();
cy.get("[id=username]");
cy.get("[id=password]").should("not.exist");
cy.get("[class=send-request]");
});

it("should have a link that toggles the central panel to the resetPassword mode", () => {
// Waiting to be implemented
it.skip("should have a link that toggles the central panel to the resetPassword mode", () => {
cy.get("[class=password-reset]").click();
cy.get("[class=login__panel]").contains("RESET PASSWORD");
});

it("should have a “back” button that toggles the central panel to the login mode", () => {
// Waiting to be implemented
it.skip("should have a “back” button that toggles the central panel to the login mode", () => {
cy.get("[class=back]").click();
cy.get("[class=login__panel]").contains("SIGN IN");
});

it("should reset the activity state to login mode after submitting the resetPassword’s email input", () => {
// Waiting to be implemented
it.skip("should reset the activity state to login mode after submitting the resetPassword’s email input", () => {
cy.get("[class=password-reset]").click();
cy.get("[id=username]").focus().type("username").blur();
cy.get("[class=send-request]").click();
Expand Down

0 comments on commit 2137ee8

Please sign in to comment.