mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-27 13:34:28 -04:00
Adjust editor config (#976)
* Adjust editor config Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
0180c75e55
commit
e12dc523f8
301 changed files with 4393 additions and 3741 deletions
|
@ -11,8 +11,9 @@ declare namespace Cypress {
|
|||
* Custom command to fill an input field with text and trigger a change event.
|
||||
* @example cy.get(input).fill('content')
|
||||
*/
|
||||
fill (value: string): Chainable<Element>
|
||||
codemirrorFill (value: string): Chainable<Element>
|
||||
fill(value: string): Chainable<Element>
|
||||
|
||||
codemirrorFill(value: string): Chainable<Element>
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,17 +21,18 @@ Cypress.Commands.add('fill', {
|
|||
prevSubject: 'element'
|
||||
}, (subject, value) => {
|
||||
return cy.wrap(subject)
|
||||
.invoke('val', value)
|
||||
.trigger('change', { force: true })
|
||||
.invoke('val', value)
|
||||
.trigger('change', { force: true })
|
||||
})
|
||||
|
||||
Cypress.Commands.add('codemirrorFill', (content: string) => {
|
||||
const line = content.split("\n").find(value => value !== '');
|
||||
const line = content.split('\n')
|
||||
.find(value => value !== '')
|
||||
cy.get('.CodeMirror')
|
||||
.click()
|
||||
.get('textarea')
|
||||
.fill(content)
|
||||
if(line) {
|
||||
if (line) {
|
||||
cy.get('.CodeMirror')
|
||||
.contains('.CodeMirror-line', line)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue