2021-06-17 15:19:05 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
describe('emojis', () => {
|
2021-06-18 17:26:36 -04:00
|
|
|
const HEDGEHOG_UNICODE_CHARACTER = '\n🦔\n'
|
2021-06-17 15:19:05 -04:00
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.visitTestEditor()
|
|
|
|
})
|
|
|
|
|
|
|
|
it('renders an emoji shortcode', () => {
|
2021-10-04 06:50:39 -04:00
|
|
|
cy.setCodemirrorContent(':hedgehog:')
|
2021-11-19 12:04:04 -05:00
|
|
|
cy.getMarkdownBody().should('have.text', HEDGEHOG_UNICODE_CHARACTER)
|
2021-06-17 15:19:05 -04:00
|
|
|
})
|
|
|
|
|
|
|
|
it('renders an emoji unicode character', () => {
|
2021-10-04 06:50:39 -04:00
|
|
|
cy.setCodemirrorContent(HEDGEHOG_UNICODE_CHARACTER)
|
2021-11-19 12:04:04 -05:00
|
|
|
cy.getMarkdownBody().should('have.text', HEDGEHOG_UNICODE_CHARACTER)
|
2021-06-17 15:19:05 -04:00
|
|
|
})
|
|
|
|
|
|
|
|
it('renders an fork awesome icon', () => {
|
2021-10-04 06:50:39 -04:00
|
|
|
cy.setCodemirrorContent(':fa-matrix-org:')
|
2021-11-19 12:04:04 -05:00
|
|
|
cy.getMarkdownBody().find('i.fa.fa-matrix-org').should('be.visible')
|
2021-06-17 15:19:05 -04:00
|
|
|
})
|
|
|
|
})
|