mirror of https://github.com/statping/statping
whats going on cypress
parent
6b1e545339
commit
e1d0d08de8
|
@ -27,8 +27,25 @@ context('Setup Process', () => {
|
|||
|
||||
it('should be completely setup', () => {
|
||||
cy.request(`/api`).then((response) => {
|
||||
expect(response.body).to.have.property('setup', true)
|
||||
expect(response.body).to.have.property('domain', 'http://localhost:8888')
|
||||
expect(response.body).to.have.property('setup', true)
|
||||
expect(response.body).to.have.property('domain', 'http://localhost:8888')
|
||||
})
|
||||
})
|
||||
|
||||
it('should be able to Login', () => {
|
||||
cy.visit('/login')
|
||||
cy.get('#username').clear().type('admin')
|
||||
cy.get('#password').clear().type('admin')
|
||||
cy.get('button[type="submit"]').click()
|
||||
|
||||
cy.get('.navbar-brand').should('contain', 'Statping')
|
||||
cy.getCookies()
|
||||
|
||||
cy.getCookies().should('have.length', 1)
|
||||
|
||||
cy.request(`/api`).then((response) => {
|
||||
expect(response.body).to.have.property('admin', true)
|
||||
expect(response.body).to.have.property('logged_in', true)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
"backend-test": "newman run -e ../dev/postman_environment.json --delay-request 500 ../dev/postman.json",
|
||||
"cypress:open": "cypress open",
|
||||
"cypress:test": "cypress run --browser chrome --record --key $CYPRESS_KEY",
|
||||
"test": "start-server-and-test start http://localhost:8888/api cypress:test",
|
||||
"start": "statping -port 8888 > /dev/null 2>&1"
|
||||
"test": "start-server-and-test start http://localhost:8080/api cypress:test",
|
||||
"start": "statping -port 8080 > /dev/null 2>&1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free-solid": "^5.1.0-3",
|
||||
|
|
Loading…
Reference in New Issue