Skip to content

Commit

Permalink
Added a test to ensure proper handling of font-family values that inc…
Browse files Browse the repository at this point in the history
…lude both spaces and numbers, such as "Exo 2".
  • Loading branch information
Sander committed Nov 12, 2024
1 parent 2220c22 commit 4ec1f9d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions demos/src/Extensions/FontFamily/React/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,12 @@ context('/src/Extensions/FontFamily/React/', () => {

cy.get('.tiptap').find('span').should('have.attr', 'style', 'font-family: var(--title-font-family)')
})
it('should allow fonts containing a space and number as a font-family', () => {
cy.get('[data-test-id="exo2"]')
.should('not.have.class', 'is-active')
.click()
.should('have.class', 'is-active')

cy.get('.tiptap').find('span').should('have.attr', 'style', 'font-family: "Exo 2"')
})
})

0 comments on commit 4ec1f9d

Please sign in to comment.