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