mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 16:14:43 -04:00
enhancement(sidebar): move note info modal into sidebar
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
e3a9f70965
commit
b454e3be03
23 changed files with 258 additions and 327 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
@ -11,32 +11,32 @@ describe('Test word count with', () => {
|
|||
|
||||
it('empty note', () => {
|
||||
cy.setCodemirrorContent('')
|
||||
cy.getByCypressId('sidebar-btn-document-info').click()
|
||||
cy.getByCypressId('document-info-modal').should('be.visible')
|
||||
cy.getByCypressId('sidebar-menu-info').click()
|
||||
cy.getByCypressId('document-info-word-count').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('sidebar-menu-info').click()
|
||||
cy.getByCypressId('document-info-word-count').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('sidebar-menu-info').click()
|
||||
cy.getByCypressId('document-info-word-count').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('sidebar-menu-info').click()
|
||||
cy.getByCypressId('document-info-word-count').should('be.visible')
|
||||
cy.getByCypressId('document-info-word-count').contains('3')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue