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