feat(motd): use iframe renderer for motd

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-10-06 21:56:52 +02:00
parent 579919f142
commit ba96f07374
8 changed files with 47 additions and 120 deletions

View file

@ -7,12 +7,16 @@
import { RendererType } from '../../src/components/render-page/window-post-message-communicator/rendering-message'
declare namespace Cypress {
interface Chainable {
interface Chainable<Subject = unknown> {
getIframeBody(rendererType?: RendererType): Chainable<Element>
getReveal(): Chainable<Element>
getMarkdownBody(): Chainable<Element>
getIntroBody(): Chainable<Element>
getMotdBody(): Chainable<Element>
}
}
@ -39,3 +43,7 @@ Cypress.Commands.add('getMarkdownBody', () => {
Cypress.Commands.add('getIntroBody', () => {
return cy.getIframeBody(RendererType.INTRO).findByCypressId('markdown-body')
})
Cypress.Commands.add('getMotdBody', () => {
return cy.getIframeBody(RendererType.MOTD).findByCypressId('markdown-body')
})