Add extra test suite for emojis (#1322)

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2021-06-17 21:19:05 +02:00 committed by GitHub
parent f4e5d795e6
commit 4b3990d0db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 10 deletions

View file

@ -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')
})
})
})

View file

@ -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')
})
})