mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
test(e2e): add cypress test for license frontmatter
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
cf34df21b7
commit
90ae3e2e75
1 changed files with 21 additions and 0 deletions
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
describe('Opengraph metadata', () => {
|
||||
beforeEach(() => {
|
||||
cy.visitTestNote()
|
||||
})
|
||||
|
||||
it('includes the note title if not overridden', () => {
|
||||
cy.setCodemirrorContent('---\ntitle: Test title\n---')
|
||||
cy.get('meta[property="og:title"]').should('have.attr', 'content', 'Test title')
|
||||
})
|
||||
|
||||
it('includes the note title if overridden', () => {
|
||||
cy.setCodemirrorContent('---\ntitle: Test title\nopengraph:\n title: Overridden title\n---')
|
||||
cy.get('meta[property="og:title"]').should('have.attr', 'content', 'Overridden title')
|
||||
})
|
||||
|
||||
it('includes custom opengraph tags', () => {
|
||||
cy.setCodemirrorContent('---\nopengraph:\n image: https://dummyimage.com/48\n---')
|
||||
cy.get('meta[property="og:image"]').should('have.attr', 'content', 'https://dummyimage.com/48')
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue