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:
Erik Michelson 2021-11-19 18:04:04 +01:00 committed by GitHub
parent 8a8bacc0aa
commit d725b65140
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 758 additions and 1203 deletions

View file

@ -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')