mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-25 16:00:49 +00:00
28 lines
627 B
TypeScript
28 lines
627 B
TypeScript
|
/*
|
||
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||
|
*
|
||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||
|
*/
|
||
|
|
||
|
declare namespace Cypress {
|
||
|
interface Chainable {
|
||
|
getMarkdownRenderer (): Chainable<Element>
|
||
|
|
||
|
getMarkdownBody (): Chainable<Element>
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Cypress.Commands.add('getMarkdownRenderer', () => {
|
||
|
return cy.get(`iframe[data-cy="documentIframe"]`)
|
||
|
.its('0.contentDocument')
|
||
|
.should('exist')
|
||
|
.its('body')
|
||
|
.should('not.be.undefined')
|
||
|
.then(cy.wrap.bind(cy))
|
||
|
})
|
||
|
|
||
|
Cypress.Commands.add('getMarkdownBody', () => {
|
||
|
return cy.getMarkdownRenderer()
|
||
|
.find('.markdown-body')
|
||
|
})
|