Files
windmill/frontend/cypress/integration/authentication.spec.ts
Faton Ramadani fc8b078101 Setup Cypress e2e tests (#91)
* Setup Cypress e2e tests

* Add login function

* Cypress github action setup

* Fix CI github action

* Properly setup node and install dependencies

* Wait on localhost to respond before running the tests

* Install missing dependencies

* Remove rust setup

* Stop caddy after installation

* Remove Caddy from CI

* Properly connect to DB

* CI clean up

* Run cypress after build

* Testing CI

* Restore commented code

* Fix docker image tag

* Fix tags

* Fix tag

* Fix tag

* Fix node_modules

* Fix postgres host name

* Bind

* Fix port

* Logs

* Fix DB Host

* Test GA

* Create docker network

* Get IP from container

* Try removing custom wait-on

* Correctly run cypress tests

* Print IP

* Add logs

* Debug docker

* Add logs

* Logs

* logs

* Fix DB hostname

* tring my way

* tring my way

* tring my way

* tring my way

* works

Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2022-06-03 20:22:12 +02:00

19 lines
532 B
TypeScript

// TODO: Should correctly handle exceptions
Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false
})
describe('Authentication', () => {
it('can login using email and password', () => {
cy.login('admin@windmill.dev', 'changeme')
cy.contains('Select a workspace')
})
it('should redirect to login page if user is not logged in', () => {
cy.visit(`${Cypress.env('baseUrl')}/user/workspaces`)
cy.url().should('include', '/user/login')
})
})