mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 08: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
26
cypress/integration/banner.spec.ts
Normal file
26
cypress/integration/banner.spec.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { banner } from '../support/config'
|
||||
|
||||
describe('Banner', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/')
|
||||
expect(localStorage.getItem('bannerTimeStamp')).to.be.null
|
||||
})
|
||||
|
||||
it('shows the correct alert banner text', () => {
|
||||
cy.get('.alert-primary.show')
|
||||
.contains(banner.text)
|
||||
})
|
||||
|
||||
it('can be dismissed', () => {
|
||||
cy.get('.alert-primary.show')
|
||||
.contains(banner.text)
|
||||
cy.get('.alert-primary.show')
|
||||
.find('.fa-times')
|
||||
.click()
|
||||
.then(() => {
|
||||
expect(localStorage.getItem('bannerTimeStamp')).to.equal(banner.timestamp)
|
||||
})
|
||||
cy.get('.alert-primary.show')
|
||||
.should('not.exist')
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue