Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nperez0111 committed Jan 10, 2025
1 parent f77cbac commit b69f500
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion demos/src/Marks/TextStyle/React/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ context('/src/Marks/TextStyle/React/', () => {
.should('exist')
cy.get('.tiptap > p:nth-child(9) > span:nth-child(3)')
.should('have.text', 'strong blue serif ')
.and('have.attr', 'style', 'color: rgb(0, 0, 255); font-family: serif')
.and('have.attr', 'style', 'color: rgb(0, 0, 255); font-family: serif; font-size: 24px')
.find('strong')
.should('exist')
cy.get('.tiptap > p:nth-child(9) > span:nth-child(4)')
Expand Down
2 changes: 1 addition & 1 deletion demos/src/Marks/TextStyle/Vue/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ context('/src/Marks/TextStyle/Vue/', () => {
.should('exist')
cy.get('.tiptap > p:nth-child(9) > span:nth-child(3)')
.should('have.text', 'strong blue serif ')
.and('have.attr', 'style', 'color: rgb(0, 0, 255); font-family: serif')
.and('have.attr', 'style', 'color: rgb(0, 0, 255); font-family: serif; font-size: 24px')
.find('strong')
.should('exist')
cy.get('.tiptap > p:nth-child(9) > span:nth-child(4)')
Expand Down
12 changes: 2 additions & 10 deletions demos/src/Marks/TextStyle/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Bold from '@tiptap/extension-bold'
import Document from '@tiptap/extension-document'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import { Color, FontFamily , TextStyle } from '@tiptap/extension-text-style'
import { TextStyleKit } from '@tiptap/extension-text-style'
import { Editor, EditorContent } from '@tiptap/vue-3'
export default {
Expand All @@ -25,15 +25,7 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document,
Paragraph,
Text,
TextStyle.configure({ mergeNestedSpanStyles: true }),
Color,
Bold,
FontFamily,
],
extensions: [Document, Paragraph, Text, TextStyleKit, Bold],
content: `
<p><span>This has a &lt;span&gt; tag without a style attribute, so it’s thrown away.</span></p>
<p><span style="">But this one is wrapped in a &lt;span&gt; tag with an inline style attribute, so it’s kept - even if it’s empty for now.</span></p>
Expand Down

0 comments on commit b69f500

Please sign in to comment.