hedgedoc/cypress/integration/metadata.spec.ts
Tilman Vatteroth 28600d6508
Change copyright year from 2020 to 2021 (#917)
* Change copyright year from 2020 to 2021

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Change copyright year in jetbrains copyright template

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-06 21:37:59 +01:00

37 lines
1.1 KiB
TypeScript

/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
describe('yaml-metadata: tags', () => {
beforeEach(() => {
cy.visit('/n/features')
cy.get('.CodeMirror textarea')
.type('{ctrl}a', { force: true })
.type('{backspace}')
})
it('show deprecation notice on old syntax', () => {
cy.get('.CodeMirror textarea')
.type('---\ntags: a, b, c\n---')
cy.get('.splitter.right .w-100.h-100 .alert.alert-warning')
.should('be.visible')
})
it('show no deprecation notice on yaml-array (1)', () => {
cy.get('.CodeMirror textarea')
.type('---\ntags: [\'a\', \'b\', \'c\']\n---')
cy.get('.splitter.right .w-100.h-100 .alert.alert-warning')
.should('not.exist')
})
it('show no deprecation notice on yaml-array (2)', () => {
cy.get('.CodeMirror textarea')
.type('---\ntags:\n - a\nb\nc\n')
.type('{backspace}{backspace}{backspace}{backspace}')
.type('---')
cy.get('.splitter.right .w-100.h-100 .alert.alert-warning')
.should('not.exist')
})
})