Skip to content

Commit

Permalink
Adding an e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
tnicola committed Dec 9, 2018
1 parent 91099ff commit 58f89d9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
28 changes: 20 additions & 8 deletions cypress/integration/actions.spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
/// <reference types="Cypress" />

context('Actions', () => {
beforeEach(() => {
cy.visit('http://localhost:8080')
})

it.only('smoke test', () => {
cy.get('button').should('exist');
});
})
beforeEach(() => {
cy.visit('http://localhost:8080');
});

it('should find the start button', () => {
cy.get('.app__start-button').should('exist');
});

it('should complete the tour with all the steps', () => {
cy.get('.app__start-button').click();
cy.get('.joyride-step__container').should('be.visible');

for (let i = 0; i < 10; i++) {
cy.get('.joyride-step__next-container').click();
cy.get('.joyride-step__container').should('be.visible');
}

cy.get('.joyride-step__done-container').click();
});
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"webpack": "webpack --display-error-details",
"test": "karma start",
"codecov": "cat coverage/lcov.info | codecov",
"cy:run": "./node_modules/.bin/cypress run",
"cy:run:record": "./node_modules/.bin/cypress run --record --key b9998b75-1f8c-4168-92a8-b149d0444e6e",
"build": "rimraf dist && webpack --config config/webpack.dev.js --progress --profile --bail",
"build:aot": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail",
Expand Down

0 comments on commit 58f89d9

Please sign in to comment.