mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 16:14:43 -04:00
Test multiple markdown extensions (#1886)
This commit adds multiple unit jest tests for components and removes e2e tests. Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> Signed-off-by: Philip Molares <philip.molares@udo.edu> Co-authored-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
dca541ea1a
commit
32c6bbb8e3
67 changed files with 2123 additions and 553 deletions
|
@ -16,41 +16,4 @@ describe('Link gets replaced with embedding: ', () => {
|
|||
cy.getMarkdownBody().findByCypressId('click-shield-gist').find('.preview-background').parent().click()
|
||||
cy.getMarkdownBody().findByCypressId('gh-gist').should('be.visible')
|
||||
})
|
||||
|
||||
it('YouTube', () => {
|
||||
cy.setCodemirrorContent('https://www.youtube.com/watch?v=YE7VzlLtp-4')
|
||||
cy.getMarkdownBody()
|
||||
.findByCypressId('click-shield-youtube')
|
||||
.find('.preview-background')
|
||||
.should('have.attr', 'src', 'https://i.ytimg.com/vi/YE7VzlLtp-4/maxresdefault.jpg')
|
||||
.parent()
|
||||
.click()
|
||||
cy.getMarkdownBody()
|
||||
.find('iframe')
|
||||
.should('have.attr', 'src', 'https://www.youtube-nocookie.com/embed/YE7VzlLtp-4?autoplay=1')
|
||||
})
|
||||
|
||||
it('Vimeo', () => {
|
||||
cy.intercept(
|
||||
{
|
||||
method: 'GET',
|
||||
url: 'https://vimeo.com/api/v2/video/23237102.json'
|
||||
},
|
||||
{
|
||||
statusCode: 200,
|
||||
headers: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
body: '[{"thumbnail_large": "https://i.vimeocdn.com/video/503631401_640.jpg"}]'
|
||||
}
|
||||
)
|
||||
cy.setCodemirrorContent('https://vimeo.com/23237102')
|
||||
cy.getMarkdownBody()
|
||||
.findByCypressId('click-shield-vimeo')
|
||||
.find('.preview-background')
|
||||
.should('have.attr', 'src', 'https://i.vimeocdn.com/video/503631401_640.jpg')
|
||||
.parent()
|
||||
.click()
|
||||
cy.getMarkdownBody().find('iframe').should('have.attr', 'src', 'https://player.vimeo.com/video/23237102?autoplay=1')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue