mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
Cypress-IDs and prettier for tests (#1634)
* Add cy.getById method and run prettier Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
8a8bacc0aa
commit
d725b65140
53 changed files with 758 additions and 1203 deletions
|
@ -21,26 +21,21 @@ describe('Short code gets replaced or rendered: ', () => {
|
|||
describe('slideshare', () => {
|
||||
it('renders a plain link', () => {
|
||||
cy.setCodemirrorContent(`{%slideshare example/123456789 %}`)
|
||||
cy.getMarkdownBody()
|
||||
.find('a')
|
||||
.should('have.attr', 'href', 'https://www.slideshare.net/example/123456789')
|
||||
cy.getMarkdownBody().find('a').should('have.attr', 'href', 'https://www.slideshare.net/example/123456789')
|
||||
})
|
||||
})
|
||||
|
||||
describe('speakerdeck', () => {
|
||||
it('renders a plain link', () => {
|
||||
cy.setCodemirrorContent(`{%speakerdeck example/123456789 %}`)
|
||||
cy.getMarkdownBody()
|
||||
.find('a')
|
||||
.should('have.attr', 'href', 'https://speakerdeck.com/example/123456789')
|
||||
cy.getMarkdownBody().find('a').should('have.attr', 'href', 'https://speakerdeck.com/example/123456789')
|
||||
})
|
||||
})
|
||||
|
||||
describe('youtube', () => {
|
||||
it('renders click-shield', () => {
|
||||
cy.setCodemirrorContent(`{%youtube YE7VzlLtp-4 %}`)
|
||||
cy.getMarkdownBody()
|
||||
.find('[data-cypress-id="click-shield-youtube"]')
|
||||
cy.getMarkdownBody().findById('click-shield-youtube')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue