2021-01-11 22:22:11 +00: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-03-09 22:00:14 +00:00
|
|
|
cy.loadConfig()
|
2021-02-01 21:55:49 +00:00
|
|
|
cy.visitTestEditor()
|
2021-01-11 22:22:11 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
it('is shown when using old syntax', () => {
|
2021-01-15 21:54:43 +00:00
|
|
|
cy.codemirrorFill('---\ntags: a, b, c\n---')
|
2021-01-24 19:50:51 +00:00
|
|
|
cy.getMarkdownRenderer()
|
|
|
|
.find('[data-cy="yamlArrayDeprecationAlert"]')
|
2021-01-11 22:22:11 +00:00
|
|
|
.should('be.visible')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('isn\'t shown when using inline yaml-array', () => {
|
2021-01-15 21:54:43 +00:00
|
|
|
cy.codemirrorFill('---\ntags: [\'a\', \'b\', \'c\']\n---')
|
2021-01-24 19:50:51 +00:00
|
|
|
cy.getMarkdownRenderer()
|
|
|
|
.find('[data-cy="yamlArrayDeprecationAlert"]')
|
2021-01-11 22:22:11 +00:00
|
|
|
.should('not.exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('isn\'t shown when using multi line yaml-array', () => {
|
2021-01-15 21:54:43 +00:00
|
|
|
cy.codemirrorFill('---\ntags:\n - a\n - b\n - c\n---')
|
2021-01-24 19:50:51 +00:00
|
|
|
cy.getMarkdownRenderer()
|
|
|
|
.find('[data-cy="yamlArrayDeprecationAlert"]')
|
2021-01-11 22:22:11 +00:00
|
|
|
.should('not.exist')
|
|
|
|
})
|
|
|
|
})
|