mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-01 15:48:32 -04:00
Feature/browserstack (#902)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
900affeac2
commit
887c3b9dd3
16 changed files with 404 additions and 86 deletions
23
cypress/support/fill.ts
Normal file
23
cypress/support/fill.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2020 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
declare namespace Cypress {
|
||||
interface Chainable {
|
||||
/**
|
||||
* 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>
|
||||
}
|
||||
}
|
||||
|
||||
Cypress.Commands.add('fill', {
|
||||
prevSubject: 'element'
|
||||
}, (subject, value) => {
|
||||
cy.wrap(subject).invoke('val', value)
|
||||
.trigger('change', { force: true })
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue