wikijs-fork/dev/cypress/integration/setup.spec.js
Nicolas Giard ff31d252f9
feat: cypress E2E testing (#2002)
* feat: cypress

* dev: move cypress in dev + setup bash script

* fix: cypress docker network host

* fix: override cypress baseUrl

* fix: cypress ci-run.sh dir path

* fix: cypress ci-run vars

* fix: cypress missing group

* fix: cypress path config

* fix: cypress record key

* fix: remove cypress run file

* fix: cypress mssql delay

* misc: use current docker build for cypress tests
2020-06-05 14:13:29 -04:00

31 lines
1.1 KiB
JavaScript

/// <reference types="Cypress" />
describe('Setup', () => {
it('Load the setup page', () => {
cy.visit('/')
cy.contains('You are about to install Wiki.js').should('exist')
})
it('Enter administrator email address', () => {
cy.get('.v-input').contains('Administrator Email').next('input').click().type('test@example.com')
})
it('Enter a password', () => {
cy.get('.v-input').contains('Password').next('input').click().type('12345678')
cy.get('.v-input').contains('Confirm Password').next('input').click().type('12345678')
})
it('Enter a Site URL', () => {
cy.get('.v-input').contains('Site URL').next('input').click().clear().type('http://localhost:3000')
})
it('Disable Telemetry', () => {
cy.contains('Telemetry').next('.v-input').click()
})
it('Press Install', () => {
cy.get('.v-card__actions').find('button').click()
})
it('Wait for install success', () => {
cy.contains('Installation complete!', {timeout: 30000}).should('exist')
})
it('Redirect to login page', () => {
cy.location('pathname', {timeout: 10000}).should('include', '/login')
})
})