diff --git a/cypress/integration/autocompletion.spec.ts b/cypress/integration/autocompletion.spec.ts index 37e79e83a..8785e1ee9 100644 --- a/cypress/integration/autocompletion.spec.ts +++ b/cypress/integration/autocompletion.spec.ts @@ -93,8 +93,6 @@ describe('Autocompletion', () => { .should('not.exist') cy.get('.CodeMirror-activeline > .CodeMirror-line > span') .should('have.text', ':hedgehog:') - cy.getMarkdownBody() - .should('have.text', '🦔') }) it('via doubleclick', () => { cy.codemirrorFill(':hedg') @@ -105,8 +103,6 @@ describe('Autocompletion', () => { .should('not.exist') cy.get('.CodeMirror-activeline > .CodeMirror-line > span') .should('have.text', ':hedgehog:') - cy.getMarkdownBody() - .should('have.text', '🦔') }) }) @@ -121,9 +117,6 @@ describe('Autocompletion', () => { .should('not.exist') cy.get('.CodeMirror-activeline > .CodeMirror-line > span') .should('have.text', ':fa-facebook:') - cy.getMarkdownBody() - .find('p > i.fa.fa-facebook') - .should('exist') }) it('via doubleclick', () => { cy.codemirrorFill(':fa-face') @@ -134,9 +127,6 @@ describe('Autocompletion', () => { .should('not.exist') cy.get('.CodeMirror-activeline > .CodeMirror-line > span') .should('have.text', ':fa-facebook:') - cy.getMarkdownBody() - .find('p > i.fa.fa-facebook') - .should('exist') }) }) }) diff --git a/cypress/integration/emoji.spec.ts b/cypress/integration/emoji.spec.ts new file mode 100644 index 000000000..becd42f49 --- /dev/null +++ b/cypress/integration/emoji.spec.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +describe('emojis', () => { + + const HEDGEHOG_UNICODE_CHARACTER = '🦔' + + beforeEach(() => { + cy.visitTestEditor() + }) + + it('renders an emoji shortcode', () => { + cy.codemirrorFill(':hedgehog:') + cy.getMarkdownBody() + .should('have.text', HEDGEHOG_UNICODE_CHARACTER) + }) + + it('renders an emoji unicode character', () => { + cy.codemirrorFill(HEDGEHOG_UNICODE_CHARACTER) + cy.getMarkdownBody() + .should('have.text', HEDGEHOG_UNICODE_CHARACTER) + }) + + it('renders an fork awesome icon', () => { + cy.codemirrorFill(':fa-matrix-org:') + cy.getMarkdownBody() + .find('i.fa.fa-matrix-org') + .should('be.visible') + }) +})