mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-24 02:23:18 +08:00
fix: remove unused spec for font family extension (#5886)
Some checks are pending
build / lint (20) (push) Waiting to run
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Waiting to run
build / build (20) (push) Blocked by required conditions
Publish / Release (20) (push) Waiting to run
Some checks are pending
build / lint (20) (push) Waiting to run
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Waiting to run
build / build (20) (push) Blocked by required conditions
Publish / Release (20) (push) Waiting to run
* fix: add new spec to check for multiple font families and fix the demo --------- Co-authored-by: Alex Casillas <alexvcasilas@gmail.com>
This commit is contained in:
parent
a8c8db60b6
commit
f49ef7cabb
@ -41,7 +41,7 @@ export default () => {
|
||||
Inter
|
||||
</button>
|
||||
<button
|
||||
onClick={() => editor.chain().focus().setFontFamily('Comic Sans MS, Comic Sans').run()}
|
||||
onClick={() => editor.chain().focus().setFontFamily('"Comic Sans MS", "Comic Sans"').run()}
|
||||
className={
|
||||
editor.isActive('textStyle', { fontFamily: '"Comic Sans MS", "Comic Sans"' })
|
||||
? 'is-active'
|
||||
|
@ -29,15 +29,6 @@ context('/src/Extensions/FontFamily/React/', () => {
|
||||
cy.get('.tiptap span').should('not.exist')
|
||||
})
|
||||
|
||||
it('should work with font-family that have spaces in them', () => {
|
||||
cy.get('[data-test-id="comic-sans"]')
|
||||
.should('not.have.class', 'is-active')
|
||||
.click()
|
||||
.should('have.class', 'is-active')
|
||||
|
||||
cy.get('.tiptap').find('span').should('have.attr', 'style', 'font-family: Comic Sans MS, Comic Sans')
|
||||
})
|
||||
|
||||
it('should allow CSS variables as a font-family', () => {
|
||||
cy.get('[data-test-id="css-variable"]')
|
||||
.should('not.have.class', 'is-active')
|
||||
@ -46,6 +37,16 @@ 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 multiple font families', () => {
|
||||
cy.get('[data-test-id="comic-sans"]')
|
||||
.should('not.have.class', 'is-active')
|
||||
.click()
|
||||
.should('have.class', 'is-active')
|
||||
|
||||
cy.get('.tiptap').find('span').should('have.attr', 'style', 'font-family: "Comic Sans MS", "Comic Sans"')
|
||||
})
|
||||
|
||||
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')
|
||||
|
Loading…
Reference in New Issue
Block a user