mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
Update dependency cypress to v10 (#2095)
* Update dependency cypress to v10 * Migrate cypress files Signed-off-by: Renovate Bot <bot@renovateapp.com> Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
e93607c96e
commit
040e11924f
34 changed files with 57 additions and 45 deletions
43
cypress/e2e/word-count.spec.ts
Normal file
43
cypress/e2e/word-count.spec.ts
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* 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.wait(500)
|
||||
cy.getByCypressId('sidebar-btn-document-info').click()
|
||||
cy.getByCypressId('document-info-modal').should('be.visible')
|
||||
cy.getByCypressId('document-info-word-count').should('have.text', '0')
|
||||
})
|
||||
|
||||
it('simple words', () => {
|
||||
cy.setCodemirrorContent('five words should be enough')
|
||||
cy.wait(500)
|
||||
cy.getByCypressId('sidebar-btn-document-info').click()
|
||||
cy.getByCypressId('document-info-modal').should('be.visible')
|
||||
cy.getByCypressId('document-info-word-count').should('have.text', '5')
|
||||
})
|
||||
|
||||
it('excluded codeblocks', () => {
|
||||
cy.setCodemirrorContent('```\nthis is should be ignored\n```\n\ntwo `words`')
|
||||
cy.wait(500)
|
||||
cy.getByCypressId('sidebar-btn-document-info').click()
|
||||
cy.getByCypressId('document-info-modal').should('be.visible')
|
||||
cy.getByCypressId('document-info-word-count').should('have.text', '2')
|
||||
})
|
||||
|
||||
it('excluded images', () => {
|
||||
cy.setCodemirrorContent(' not ignored text')
|
||||
cy.wait(500)
|
||||
cy.getByCypressId('sidebar-btn-document-info').click()
|
||||
cy.getByCypressId('document-info-modal').should('be.visible')
|
||||
cy.getByCypressId('document-info-word-count').should('have.text', '3')
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue