mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 10:45:20 -04:00
fix: Move content into to frontend directory
Doing this BEFORE the merge prevents a lot of merge conflicts. Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
4e18ce38f3
commit
762a0a850e
1051 changed files with 0 additions and 35 deletions
42
frontend/cypress/e2e/word-count.spec.ts
Normal file
42
frontend/cypress/e2e/word-count.spec.ts
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
describe('Test word count with', () => {
|
||||
beforeEach(() => {
|
||||
cy.visitTestNote()
|
||||
})
|
||||
|
||||
it('empty note', () => {
|
||||
cy.setCodemirrorContent('')
|
||||
cy.getByCypressId('sidebar-btn-document-info').click()
|
||||
cy.getByCypressId('document-info-modal').should('be.visible')
|
||||
cy.getByCypressId('document-info-word-count').contains('0')
|
||||
})
|
||||
|
||||
it('simple words', () => {
|
||||
cy.setCodemirrorContent('five words should be enough')
|
||||
cy.getMarkdownBody().contains('five words should be enough')
|
||||
cy.getByCypressId('sidebar-btn-document-info').click()
|
||||
cy.getByCypressId('document-info-modal').should('be.visible')
|
||||
cy.getByCypressId('document-info-word-count').contains('5')
|
||||
})
|
||||
|
||||
it('excluded codeblocks', () => {
|
||||
cy.setCodemirrorContent('```\nthis is should be ignored\n```\n\ntwo `words`')
|
||||
cy.getMarkdownBody().contains('two words')
|
||||
cy.getByCypressId('sidebar-btn-document-info').click()
|
||||
cy.getByCypressId('document-info-modal').should('be.visible')
|
||||
cy.getByCypressId('document-info-word-count').contains('2')
|
||||
})
|
||||
|
||||
it('excluded images', () => {
|
||||
cy.setCodemirrorContent(' not ignored text')
|
||||
cy.getMarkdownBody().contains('not ignored text')
|
||||
cy.getByCypressId('sidebar-btn-document-info').click()
|
||||
cy.getByCypressId('document-info-modal').should('be.visible')
|
||||
cy.getByCypressId('document-info-word-count').contains('3')
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue