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-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-10-04 10:50:39 +00:00
|
|
|
cy.setCodemirrorContent('---\ntags: a, b, c\n---')
|
|
|
|
cy.getIframeBody()
|
2021-10-17 19:20:23 +00:00
|
|
|
.find('[data-cypress-id="yamlArrayDeprecationAlert"]')
|
2021-01-11 22:22:11 +00:00
|
|
|
.should('be.visible')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('isn\'t shown when using inline yaml-array', () => {
|
2021-10-04 10:50:39 +00:00
|
|
|
cy.setCodemirrorContent('---\ntags: [\'a\', \'b\', \'c\']\n---')
|
|
|
|
cy.getIframeBody()
|
2021-10-17 19:20:23 +00:00
|
|
|
.find('[data-cypress-id="yamlArrayDeprecationAlert"]')
|
2021-01-11 22:22:11 +00:00
|
|
|
.should('not.exist')
|
|
|
|
})
|
|
|
|
|
|
|
|
it('isn\'t shown when using multi line yaml-array', () => {
|
2021-10-04 10:50:39 +00:00
|
|
|
cy.setCodemirrorContent('---\ntags:\n - a\n - b\n - c\n---')
|
|
|
|
cy.getIframeBody()
|
2021-10-17 19:20:23 +00:00
|
|
|
.find('[data-cypress-id="yamlArrayDeprecationAlert"]')
|
2021-01-11 22:22:11 +00:00
|
|
|
.should('not.exist')
|
|
|
|
})
|
|
|
|
})
|