mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
added e2e tests (#298)
- added e2e tests for - banner - history - intro - language - link - added e2e workflow - added cypress badge to README
This commit is contained in:
parent
1a5d4f6db8
commit
f0fe7f5ac2
26 changed files with 1332 additions and 77 deletions
58
cypress/integration/intro.spec.ts
Normal file
58
cypress/integration/intro.spec.ts
Normal file
|
@ -0,0 +1,58 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
describe('Intro', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/')
|
||||
})
|
||||
|
||||
describe('Cover Button are hidden when logged in', () => {
|
||||
it('Sign in Cover Button', () => {
|
||||
cy.get('.cover-button.btn-success')
|
||||
.should('not.exist')
|
||||
})
|
||||
|
||||
it('Features Cover Button', () => {
|
||||
cy.get('.cover-button.btn-primary')
|
||||
.should('not.exist')
|
||||
})
|
||||
})
|
||||
|
||||
describe('Cover Button are shown when logged out', () => {
|
||||
beforeEach(() => {
|
||||
cy.logout()
|
||||
})
|
||||
|
||||
it('Sign in Cover Button', () => {
|
||||
cy.get('.cover-button.btn-success')
|
||||
.should('exist')
|
||||
})
|
||||
|
||||
it('Features Cover Button', () => {
|
||||
cy.get('.cover-button.btn-primary')
|
||||
.should('exist')
|
||||
})
|
||||
})
|
||||
|
||||
describe('Version', () => {
|
||||
it('can be opened', () => {
|
||||
cy.get('#versionModal')
|
||||
.should('not.be.visible')
|
||||
cy.get('#version')
|
||||
.click()
|
||||
cy.get('#versionModal')
|
||||
.should('be.visible')
|
||||
})
|
||||
|
||||
it('can be closed', () => {
|
||||
cy.get('#versionModal')
|
||||
.should('not.be.visible')
|
||||
cy.get('#version')
|
||||
.click()
|
||||
cy.get('#versionModal')
|
||||
.should('be.visible')
|
||||
cy.get('body')
|
||||
.click()
|
||||
cy.get('#versionModal')
|
||||
.should('not.be.visible')
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue