mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -04:00
Adjust editor config (#976)
* Adjust editor config Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
0180c75e55
commit
e12dc523f8
301 changed files with 4393 additions and 3741 deletions
|
@ -16,73 +16,73 @@ describe('Document Title', () => {
|
|||
|
||||
describe('title should be yaml metadata title', () => {
|
||||
it('just yaml metadata title', () => {
|
||||
cy.codemirrorFill(`---\ntitle: ${title}\n---`)
|
||||
cy.codemirrorFill(`---\ntitle: ${ title }\n---`)
|
||||
cy.title()
|
||||
.should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `${ title } - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('yaml metadata title and opengraph title', () => {
|
||||
cy.codemirrorFill(`---\ntitle: ${title}\nopengraph:\n title: False title\n---`)
|
||||
cy.codemirrorFill(`---\ntitle: ${ title }\nopengraph:\n title: False title\n---`)
|
||||
cy.title()
|
||||
.should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `${ title } - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('yaml metadata title, opengraph title and first heading', () => {
|
||||
cy.codemirrorFill(`---\ntitle: ${title}\nopengraph:\n title: False title\n---\n# a first title`)
|
||||
cy.codemirrorFill(`---\ntitle: ${ title }\nopengraph:\n title: False title\n---\n# a first title`)
|
||||
cy.title()
|
||||
.should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `${ title } - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
})
|
||||
|
||||
describe('title should be opengraph title', () => {
|
||||
it('just opengraph title', () => {
|
||||
cy.codemirrorFill(`---\nopengraph:\n title: ${title}\n---`)
|
||||
cy.codemirrorFill(`---\nopengraph:\n title: ${ title }\n---`)
|
||||
cy.title()
|
||||
.should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `${ title } - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('opengraph title and first heading', () => {
|
||||
cy.codemirrorFill(`---\nopengraph:\n title: ${title}\n---\n# a first title`)
|
||||
cy.codemirrorFill(`---\nopengraph:\n title: ${ title }\n---\n# a first title`)
|
||||
cy.title()
|
||||
.should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `${ title } - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
})
|
||||
|
||||
describe('title should be first heading', () => {
|
||||
it('just first heading', () => {
|
||||
cy.codemirrorFill(`# ${title}`)
|
||||
cy.codemirrorFill(`# ${ title }`)
|
||||
cy.title()
|
||||
.should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `${ title } - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('just first heading with alt-text instead of image', () => {
|
||||
cy.codemirrorFill(`# ${title} `)
|
||||
cy.codemirrorFill(`# ${ title } `)
|
||||
cy.title()
|
||||
.should('eq', `${title} abc - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `${ title } abc - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('just first heading without link syntax', () => {
|
||||
cy.codemirrorFill(`# ${title} [link](https://hedgedoc.org)`)
|
||||
cy.codemirrorFill(`# ${ title } [link](https://hedgedoc.org)`)
|
||||
cy.title()
|
||||
.should('eq', `${title} link - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `${ title } link - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('markdown syntax removed first', () => {
|
||||
cy.codemirrorFill(`# ${title} 1*2*3 4*5**`)
|
||||
cy.codemirrorFill(`# ${ title } 1*2*3 4*5**`)
|
||||
cy.title()
|
||||
.should('eq', `${title} 123 4*5** - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `${ title } 123 4*5** - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('markdown syntax removed second', () => {
|
||||
cy.codemirrorFill(`# ${title} **1 2*`)
|
||||
cy.codemirrorFill(`# ${ title } **1 2*`)
|
||||
cy.title()
|
||||
.should('eq', `${title} *1 2 - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `${ title } *1 2 - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('markdown syntax removed third', () => {
|
||||
cy.codemirrorFill(`# ${title} _asd_`)
|
||||
cy.codemirrorFill(`# ${ title } _asd_`)
|
||||
cy.title()
|
||||
.should('eq', `${title} asd - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `${ title } asd - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('katex code looks right', () => {
|
||||
|
@ -93,7 +93,7 @@ describe('Document Title', () => {
|
|||
cy.get('.CodeMirror textarea')
|
||||
.type('{Enter}{Enter}{Enter}{Enter}{Enter}') //This is a workaround because I don't know how to make sure, that the title gets updated in time.
|
||||
cy.title()
|
||||
.should('eq', `α-foo - HedgeDoc @ ${branding.name}`)
|
||||
.should('eq', `α-foo - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue