Skip to content

Commit

Permalink
Add Cypress integration & initial test
Browse files Browse the repository at this point in the history
  • Loading branch information
andyvesel committed Jun 3, 2019
1 parent 24418ae commit bd2316f
Show file tree
Hide file tree
Showing 10 changed files with 14,437 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ yarn-error.log
config/config.dev.json
.yalc/
yalc.lock
lib/
lib/
cypress/fixtures
6 changes: 6 additions & 0 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"baseUrl": "http://localhost:9000",
"video": false,
"pluginsFile": false,
"supportFile": false
}
24 changes: 24 additions & 0 deletions cypress/integration/cluster_spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
describe('Cluster functionality test', () => {
it('adds cluster with valid data', () => {
cy.visit('/');
cy.get('#add-cluster-btn').then(() => {
cy.get('#add-cluster-btn')
.first()
.click()
.then(() => {
cy.get('#cluster-name-input')
.type('test cluster')
cy.get('#url-input')
.type('example.com')
cy.get('#token-input')
.type('123456')
cy.get('#check-connection-btn')
.click()
cy.get('#submit-cluster-btn')
.click()
})
});
cy.contains('Add cluster')
cy.contains('test cluster')
});
});
Loading

0 comments on commit bd2316f

Please sign in to comment.