mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -04:00
Add slide mode with reveal.js
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
29565f8f89
commit
36e445e631
70 changed files with 1225 additions and 323 deletions
|
@ -16,19 +16,19 @@ describe('Document Title', () => {
|
|||
|
||||
describe('title should be yaml metadata title', () => {
|
||||
it('just yaml metadata title', () => {
|
||||
cy.codemirrorFill(`---\ntitle: ${ title }\n---`)
|
||||
cy.setCodemirrorContent(`---\ntitle: ${ title }\n---`)
|
||||
cy.title()
|
||||
.should('eq', `${ title } - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('yaml metadata title and opengraph title', () => {
|
||||
cy.codemirrorFill(`---\ntitle: ${ title }\nopengraph:\n title: False title\n---`)
|
||||
cy.setCodemirrorContent(`---\ntitle: ${ title }\nopengraph:\n title: False title\n---`)
|
||||
cy.title()
|
||||
.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.setCodemirrorContent(`---\ntitle: ${ title }\nopengraph:\n title: False title\n---\n# a first title`)
|
||||
cy.title()
|
||||
.should('eq', `${ title } - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
@ -36,13 +36,13 @@ describe('Document Title', () => {
|
|||
|
||||
describe('title should be opengraph title', () => {
|
||||
it('just opengraph title', () => {
|
||||
cy.codemirrorFill(`---\nopengraph:\n title: ${ title }\n---`)
|
||||
cy.setCodemirrorContent(`---\nopengraph:\n title: ${ title }\n---`)
|
||||
cy.title()
|
||||
.should('eq', `${ title } - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('opengraph title and first heading', () => {
|
||||
cy.codemirrorFill(`---\nopengraph:\n title: ${ title }\n---\n# a first title`)
|
||||
cy.setCodemirrorContent(`---\nopengraph:\n title: ${ title }\n---\n# a first title`)
|
||||
cy.title()
|
||||
.should('eq', `${ title } - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
@ -50,44 +50,44 @@ describe('Document Title', () => {
|
|||
|
||||
describe('title should be first heading', () => {
|
||||
it('just first heading', () => {
|
||||
cy.codemirrorFill(`# ${ title }`)
|
||||
cy.setCodemirrorContent(`# ${ title }`)
|
||||
cy.title()
|
||||
.should('eq', `${ title } - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('just first heading with alt-text instead of image', () => {
|
||||
cy.codemirrorFill(`# ${ title } `)
|
||||
cy.setCodemirrorContent(`# ${ title } `)
|
||||
cy.title()
|
||||
.should('eq', `${ title } abc - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('just first heading without link syntax', () => {
|
||||
cy.codemirrorFill(`# ${ title } [link](https://hedgedoc.org)`)
|
||||
cy.setCodemirrorContent(`# ${ title } [link](https://hedgedoc.org)`)
|
||||
cy.title()
|
||||
.should('eq', `${ title } link - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('markdown syntax removed first', () => {
|
||||
cy.codemirrorFill(`# ${ title } 1*2*3 4*5**`)
|
||||
cy.setCodemirrorContent(`# ${ title } 1*2*3 4*5**`)
|
||||
cy.title()
|
||||
.should('eq', `${ title } 123 4*5** - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('markdown syntax removed second', () => {
|
||||
cy.codemirrorFill(`# ${ title } **1 2*`)
|
||||
cy.setCodemirrorContent(`# ${ title } **1 2*`)
|
||||
cy.title()
|
||||
.should('eq', `${ title } *1 2 - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('markdown syntax removed third', () => {
|
||||
cy.codemirrorFill(`# ${ title } _asd_`)
|
||||
cy.setCodemirrorContent(`# ${ title } _asd_`)
|
||||
cy.title()
|
||||
.should('eq', `${ title } asd - HedgeDoc @ ${ branding.name }`)
|
||||
})
|
||||
|
||||
it('katex code looks right', () => {
|
||||
cy.codemirrorFill(`# $\\alpha$-foo`)
|
||||
cy.getMarkdownRenderer()
|
||||
cy.setCodemirrorContent(`# $\\alpha$-foo`)
|
||||
cy.getIframeBody()
|
||||
.find('h1')
|
||||
.should('contain', 'α')
|
||||
cy.get('.CodeMirror textarea')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue