mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -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
30
cypress/integration/language.spec.ts
Normal file
30
cypress/integration/language.spec.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import { languages } from '../fixtures/languages'
|
||||
|
||||
describe('Languages', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/')
|
||||
})
|
||||
|
||||
it('all languages are available', () => {
|
||||
cy.get('option')
|
||||
.as('languages')
|
||||
cy.get('@languages')
|
||||
.should('have.length', 28)
|
||||
languages.forEach(language => {
|
||||
cy.get('@languages').contains(language)
|
||||
})
|
||||
})
|
||||
|
||||
it('language changes affect the UI', () => {
|
||||
cy.get('select')
|
||||
.select('English')
|
||||
cy.get('.d-inline-flex.btn-primary')
|
||||
.find('span')
|
||||
.contains('New note')
|
||||
cy.get('select')
|
||||
.select('Deutsch')
|
||||
cy.get('.d-inline-flex.btn-primary')
|
||||
.find('span')
|
||||
.contains('Neue Notiz')
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue