mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
Add slide mode with reveal.js
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
29565f8f89
commit
36e445e631
70 changed files with 1225 additions and 323 deletions
32
cypress/support/get-iframe-content.ts
Normal file
32
cypress/support/get-iframe-content.ts
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
declare namespace Cypress {
|
||||
interface Chainable {
|
||||
getIframeBody(): Chainable<Element>
|
||||
getReveal(): Chainable<Element>
|
||||
getMarkdownBody(): Chainable<Element>
|
||||
}
|
||||
}
|
||||
|
||||
Cypress.Commands.add('getIframeBody', () => {
|
||||
return cy
|
||||
.get(`iframe[data-cy="documentIframe"][data-content-ready="true"]`)
|
||||
.should('be.visible')
|
||||
.its('0.contentDocument')
|
||||
.should('exist')
|
||||
.its('body')
|
||||
.should('not.be.undefined')
|
||||
.then(cy.wrap.bind(cy))
|
||||
})
|
||||
|
||||
Cypress.Commands.add('getReveal', () => {
|
||||
return cy.getIframeBody().find('.reveal')
|
||||
})
|
||||
|
||||
Cypress.Commands.add('getMarkdownBody', () => {
|
||||
return cy.getIframeBody().find('.markdown-body')
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue