2021-01-11 17:22:11 -05:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
describe('YAML Array for deprecated syntax of document tags in frontmatter', () => {
|
|
|
|
beforeEach(() => {
|
2021-02-01 16:55:49 -05:00
|
|
|
cy.visitTestEditor()
|
2021-01-11 17:22:11 -05:00
|
|
|
})
|
|
|
|
|
|
|
|
it('is shown when using old syntax', () => {
|
2021-01-15 16:54:43 -05:00
|
|
|
cy.codemirrorFill('---\ntags: a, b, c\n---')
|
2021-01-24 14:50:51 -05:00
|
|
|
cy.getMarkdownRenderer()
|
|
|
|
.find('[data-cy="yamlArrayDeprecationAlert"]')
|
2021-01-11 17:22:11 -05:00
|
|
|
.should('be.visible')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('isn\'t shown when using inline yaml-array', () => {
|
2021-01-15 16:54:43 -05:00
|
|
|
cy.codemirrorFill('---\ntags: [\'a\', \'b\', \'c\']\n---')
|
2021-01-24 14:50:51 -05:00
|
|
|
cy.getMarkdownRenderer()
|
|
|
|
.find('[data-cy="yamlArrayDeprecationAlert"]')
|
2021-01-11 17:22:11 -05:00
|
|
|
.should('not.exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('isn\'t shown when using multi line yaml-array', () => {
|
2021-01-15 16:54:43 -05:00
|
|
|
cy.codemirrorFill('---\ntags:\n - a\n - b\n - c\n---')
|
2021-01-24 14:50:51 -05:00
|
|
|
cy.getMarkdownRenderer()
|
|
|
|
.find('[data-cy="yamlArrayDeprecationAlert"]')
|
2021-01-11 17:22:11 -05:00
|
|
|
.should('not.exist')
|
|
|
|
})
|
|
|
|
})
|