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(() => {
|
2022-01-30 20:46:43 +00:00
|
|
|
cy.visitTestNote()
|
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---')
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getIframeBody().findByCypressId('yamlArrayDeprecationAlert').should('be.visible')
|
2021-01-11 22:22:11 +00:00
|
|
|
})
|
|
|
|
|
2021-11-19 17:04:04 +00:00
|
|
|
it("isn't shown when using inline yaml-array", () => {
|
|
|
|
cy.setCodemirrorContent("---\ntags: ['a', 'b', 'c']\n---")
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getIframeBody().findByCypressId('yamlArrayDeprecationAlert').should('not.exist')
|
2021-01-11 22:22:11 +00:00
|
|
|
})
|
|
|
|
|
2021-11-19 17:04:04 +00:00
|
|
|
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---')
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getIframeBody().findByCypressId('yamlArrayDeprecationAlert').should('not.exist')
|
2021-01-11 22:22:11 +00:00
|
|
|
})
|
|
|
|
})
|