2021-01-11 17:22:11 -05:00
|
|
|
/*
|
2022-06-08 07:19:51 -04:00
|
|
|
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
2021-01-11 17:22:11 -05:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
describe('YAML Array for deprecated syntax of document tags in frontmatter', () => {
|
|
|
|
beforeEach(() => {
|
2022-01-30 15:46:43 -05:00
|
|
|
cy.visitTestNote()
|
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---')
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getIframeBody().findByCypressId('yamlArrayDeprecationAlert').should('be.visible')
|
2021-01-11 17:22:11 -05:00
|
|
|
})
|
|
|
|
|
2021-11-19 12:04:04 -05:00
|
|
|
it("isn't shown when using inline yaml-array", () => {
|
|
|
|
cy.setCodemirrorContent("---\ntags: ['a', 'b', 'c']\n---")
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getIframeBody().findByCypressId('yamlArrayDeprecationAlert').should('not.exist')
|
2021-01-11 17:22:11 -05:00
|
|
|
})
|
|
|
|
|
2021-11-19 12:04:04 -05:00
|
|
|
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---')
|
2021-12-25 10:44:24 -05:00
|
|
|
cy.getIframeBody().findByCypressId('yamlArrayDeprecationAlert').should('not.exist')
|
2021-01-11 17:22:11 -05:00
|
|
|
})
|
|
|
|
})
|