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(() => {
|
|
|
|
cy.visit('/n/features')
|
|
|
|
})
|
|
|
|
|
|
|
|
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')
|
|
|
|
})
|
|
|
|
})
|