mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 20:14:35 -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
|
@ -13,16 +13,9 @@ describe('Quote extra tags', function () {
|
|||
it('renders correctly', () => {
|
||||
cy.setCodemirrorContent('[name=testy mctestface]')
|
||||
|
||||
cy.getMarkdownBody()
|
||||
.find('.blockquote-extra')
|
||||
.should('be.visible')
|
||||
.find('.fa-user')
|
||||
.should('be.visible')
|
||||
cy.getMarkdownBody().find('.blockquote-extra').should('be.visible').find('.fa-user').should('be.visible')
|
||||
|
||||
cy.getMarkdownBody()
|
||||
.find('.blockquote-extra')
|
||||
.should('be.visible')
|
||||
.contains('testy mctestface')
|
||||
cy.getMarkdownBody().find('.blockquote-extra').should('be.visible').contains('testy mctestface')
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -30,16 +23,9 @@ describe('Quote extra tags', function () {
|
|||
it('renders correctly', () => {
|
||||
cy.setCodemirrorContent(`[time=always]`)
|
||||
|
||||
cy.getMarkdownBody()
|
||||
.find('.blockquote-extra')
|
||||
.should('be.visible')
|
||||
.find('.fa-clock-o')
|
||||
.should('be.visible')
|
||||
cy.getMarkdownBody().find('.blockquote-extra').should('be.visible').find('.fa-clock-o').should('be.visible')
|
||||
|
||||
cy.getMarkdownBody()
|
||||
.find('.blockquote-extra')
|
||||
.should('be.visible')
|
||||
.contains('always')
|
||||
cy.getMarkdownBody().find('.blockquote-extra').should('be.visible').contains('always')
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -47,24 +33,15 @@ describe('Quote extra tags', function () {
|
|||
it('renders correctly', () => {
|
||||
cy.setCodemirrorContent(`[color=#b51f08]`)
|
||||
|
||||
cy.getMarkdownBody()
|
||||
.find('.blockquote-extra')
|
||||
.should('be.visible')
|
||||
.find('.fa-tag')
|
||||
.should('be.visible')
|
||||
cy.getMarkdownBody().find('.blockquote-extra').should('be.visible').find('.fa-tag').should('be.visible')
|
||||
|
||||
cy.getMarkdownBody()
|
||||
.find('.blockquote-extra')
|
||||
.should('be.visible')
|
||||
.should('have.css', 'color', 'rgb(181, 31, 8)')
|
||||
cy.getMarkdownBody().find('.blockquote-extra').should('be.visible').should('have.css', 'color', 'rgb(181, 31, 8)')
|
||||
})
|
||||
|
||||
it('doesn\'t render in a blockquote and dyes the blockquote border', () => {
|
||||
it("doesn't render in a blockquote and dyes the blockquote border", () => {
|
||||
cy.setCodemirrorContent(`> [color=#b51f08] HedgeDoc`)
|
||||
|
||||
cy.getMarkdownBody()
|
||||
.find('.blockquote-extra')
|
||||
.should('not.exist')
|
||||
cy.getMarkdownBody().find('.blockquote-extra').should('not.exist')
|
||||
|
||||
cy.getMarkdownBody()
|
||||
.find('blockquote')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue