hedgedoc/cypress/integration/iframe-capsule.ts
Tilman Vatteroth ca5dae3f82 Add new visit functions in e2e tests
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-01-30 22:13:41 +01:00

17 lines
567 B
TypeScript

/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
describe('Iframe capsule', () => {
beforeEach(() => {
cy.visitTestNote()
})
it('shows a clickable click shield instead of the iframe', () => {
cy.setCodemirrorContent('<iframe src="https://example.org"></iframe>')
cy.getMarkdownBody().findByCypressId('iframe-capsule-click-shield').should('exist').click()
cy.getMarkdownBody().find('iframe').should('exist').should('have.attr', 'src', 'https://example.org')
})
})