mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
parent
3a0e35a9f3
commit
0e912d64dd
39 changed files with 87 additions and 84 deletions
|
@ -15,19 +15,19 @@ describe('Document Title', () => {
|
|||
it('just yaml metadata title', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`---\ntitle: ${title}\n---`)
|
||||
cy.title().should('eq', `${title} - CodiMD @ ${branding.name}`)
|
||||
cy.title().should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
})
|
||||
|
||||
it('yaml metadata title and opengraph title', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`---\ntitle: ${title}\nopengraph:\n title: False title\n{backspace}{backspace}---`)
|
||||
cy.title().should('eq', `${title} - CodiMD @ ${branding.name}`)
|
||||
cy.title().should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
})
|
||||
|
||||
it('yaml metadata title, opengraph title and first heading', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`---\ntitle: ${title}\nopengraph:\n title: False title\n{backspace}{backspace}---\n# a first title`)
|
||||
cy.title().should('eq', `${title} - CodiMD @ ${branding.name}`)
|
||||
cy.title().should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -35,13 +35,13 @@ describe('Document Title', () => {
|
|||
it('just opengraph title', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`---\nopengraph:\n title: ${title}\n{backspace}{backspace}---`)
|
||||
cy.title().should('eq', `${title} - CodiMD @ ${branding.name}`)
|
||||
cy.title().should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
})
|
||||
|
||||
it('opengraph title and first heading', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`---\nopengraph:\n title: ${title}\n{backspace}{backspace}---\n# a first title`)
|
||||
cy.title().should('eq', `${title} - CodiMD @ ${branding.name}`)
|
||||
cy.title().should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -49,19 +49,19 @@ describe('Document Title', () => {
|
|||
it('just first heading', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`# ${title}`)
|
||||
cy.title().should('eq', `${title} - CodiMD @ ${branding.name}`)
|
||||
cy.title().should('eq', `${title} - HedgeDoc @ ${branding.name}`)
|
||||
})
|
||||
|
||||
it('just first heading with alt-text instead of image', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`# ${title} `)
|
||||
cy.title().should('eq', `${title} abc - CodiMD @ ${branding.name}`)
|
||||
cy.title().should('eq', `${title} abc - HedgeDoc @ ${branding.name}`)
|
||||
})
|
||||
|
||||
it('just first heading without link syntax', () => {
|
||||
cy.get('.CodeMirror textarea')
|
||||
.type(`# ${title} [link](https://hedgedoc.org)`)
|
||||
cy.title().should('eq', `${title} link - CodiMD @ ${branding.name}`)
|
||||
.type(`# ${title} [link](https://codimd.org)`)
|
||||
cy.title().should('eq', `${title} link - HedgeDoc @ ${branding.name}`)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue