mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 08:04:45 -04:00
fix: Move content into to frontend directory
Doing this BEFORE the merge prevents a lot of merge conflicts. Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
4e18ce38f3
commit
762a0a850e
1051 changed files with 0 additions and 35 deletions
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { RendererType } from '../../src/components/render-page/window-post-message-communicator/rendering-message'
|
||||
|
||||
declare namespace Cypress {
|
||||
interface Chainable<Subject = unknown> {
|
||||
getIframeBody(rendererType?: RendererType): Chainable<Element>
|
||||
|
||||
getReveal(): Chainable<Element>
|
||||
|
||||
getMarkdownBody(): Chainable<Element>
|
||||
|
||||
getIntroBody(): Chainable<Element>
|
||||
|
||||
getMotdBody(): Chainable<Element>
|
||||
}
|
||||
}
|
||||
|
||||
Cypress.Commands.add('getIframeBody', (rendererType?: RendererType) => {
|
||||
const renderTypeAttribute = rendererType ? `[data-cypress-renderer-type="${rendererType}"]` : ''
|
||||
return cy
|
||||
.get(`iframe[data-cypress-id="documentIframe"][data-cypress-renderer-ready="true"]${renderTypeAttribute}`)
|
||||
.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(RendererType.SLIDESHOW).find('.reveal')
|
||||
})
|
||||
|
||||
Cypress.Commands.add('getMarkdownBody', () => {
|
||||
return cy.getIframeBody(RendererType.DOCUMENT).findByCypressId('markdown-body')
|
||||
})
|
||||
|
||||
Cypress.Commands.add('getIntroBody', () => {
|
||||
return cy.getIframeBody(RendererType.INTRO).findByCypressId('markdown-body')
|
||||
})
|
||||
|
||||
Cypress.Commands.add('getMotdBody', () => {
|
||||
return cy.getIframeBody(RendererType.MOTD).findByCypressId('markdown-body')
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue