2021-12-02 22:35:31 +00:00
|
|
|
/*
|
2022-06-08 11:19:51 +00:00
|
|
|
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
2021-12-02 22:35:31 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
describe('Iframe capsule', () => {
|
|
|
|
beforeEach(() => {
|
2022-01-30 20:46:43 +00:00
|
|
|
cy.visitTestNote()
|
2021-12-02 22:35:31 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
it('shows a clickable click shield instead of the iframe', () => {
|
|
|
|
cy.setCodemirrorContent('<iframe src="https://example.org"></iframe>')
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getMarkdownBody().findByCypressId('iframe-capsule-click-shield').should('exist').click()
|
2021-12-02 22:35:31 +00:00
|
|
|
cy.getMarkdownBody().find('iframe').should('exist').should('have.attr', 'src', 'https://example.org')
|
|
|
|
})
|
|
|
|
})
|