mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 03:39:01 +08:00
ci: fix code style linting errors
This commit is contained in:
parent
61e14c0465
commit
bee9f2bf7e
@ -1,9 +1,9 @@
|
||||
import React from "react";
|
||||
import { useEditor, EditorContent } from "@tiptap/react";
|
||||
import Document from "@tiptap/extension-document";
|
||||
import Paragraph from "@tiptap/extension-paragraph";
|
||||
import Text from "@tiptap/extension-text";
|
||||
import Typography from "@tiptap/extension-typography";
|
||||
import React from 'react'
|
||||
import { useEditor, EditorContent } from '@tiptap/react'
|
||||
import Document from '@tiptap/extension-document'
|
||||
import Paragraph from '@tiptap/extension-paragraph'
|
||||
import Text from '@tiptap/extension-text'
|
||||
import Typography from '@tiptap/extension-typography'
|
||||
|
||||
export default () => {
|
||||
const editor = useEditor({
|
||||
@ -12,7 +12,7 @@ export default () => {
|
||||
<p>“I have been suffering from Typomania all my life, a sickness that is incurable but not lethal.”</p>
|
||||
<p>— Erik Spiekermann, December 2008</p>
|
||||
`,
|
||||
});
|
||||
})
|
||||
|
||||
return <EditorContent editor={editor} />;
|
||||
};
|
||||
return <EditorContent editor={editor} />
|
||||
}
|
||||
|
@ -1,93 +1,93 @@
|
||||
context("/src/Extensions/Typography/React/", () => {
|
||||
context('/src/Extensions/Typography/React/', () => {
|
||||
before(() => {
|
||||
cy.visit("/src/Extensions/Typography/React/");
|
||||
});
|
||||
cy.visit('/src/Extensions/Typography/React/')
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
cy.get(".ProseMirror").then(([{ editor }]) => {
|
||||
editor.commands.clearContent();
|
||||
});
|
||||
});
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.commands.clearContent()
|
||||
})
|
||||
})
|
||||
|
||||
it("should make an em dash from two dashes", () => {
|
||||
cy.get(".ProseMirror").type("-- emDash").should("contain", "— emDash");
|
||||
});
|
||||
it('should make an em dash from two dashes', () => {
|
||||
cy.get('.ProseMirror').type('-- emDash').should('contain', '— emDash')
|
||||
})
|
||||
|
||||
it("should make an ellipsis from three dots", () => {
|
||||
cy.get(".ProseMirror").type("... ellipsis").should("contain", "… ellipsis");
|
||||
});
|
||||
it('should make an ellipsis from three dots', () => {
|
||||
cy.get('.ProseMirror').type('... ellipsis').should('contain', '… ellipsis')
|
||||
})
|
||||
|
||||
it("should make a correct open double quote", () => {
|
||||
cy.get(".ProseMirror").type('"openDoubleQuote"').should("contain", "“openDoubleQuote");
|
||||
});
|
||||
it('should make a correct open double quote', () => {
|
||||
cy.get('.ProseMirror').type('"openDoubleQuote"').should('contain', '“openDoubleQuote')
|
||||
})
|
||||
|
||||
it("should make a correct close double quote", () => {
|
||||
cy.get(".ProseMirror").type('"closeDoubleQuote"').should("contain", "closeDoubleQuote”");
|
||||
});
|
||||
it('should make a correct close double quote', () => {
|
||||
cy.get('.ProseMirror').type('"closeDoubleQuote"').should('contain', 'closeDoubleQuote”')
|
||||
})
|
||||
|
||||
it("should make a correct open single quote", () => {
|
||||
cy.get(".ProseMirror").type("'openSingleQuote'").should("contain", "‘openSingleQuote’");
|
||||
});
|
||||
it('should make a correct open single quote', () => {
|
||||
cy.get('.ProseMirror').type("'openSingleQuote'").should('contain', '‘openSingleQuote’')
|
||||
})
|
||||
|
||||
it("should make a correct close single quote", () => {
|
||||
cy.get(".ProseMirror").type("'closeSingleQuote'").should("contain", "closeSingleQuote’");
|
||||
});
|
||||
it('should make a correct close single quote', () => {
|
||||
cy.get('.ProseMirror').type("'closeSingleQuote'").should('contain', 'closeSingleQuote’')
|
||||
})
|
||||
|
||||
it("should make a left arrow", () => {
|
||||
cy.get(".ProseMirror").type("<- leftArrow").should("contain", "← leftArrow");
|
||||
});
|
||||
it('should make a left arrow', () => {
|
||||
cy.get('.ProseMirror').type('<- leftArrow').should('contain', '← leftArrow')
|
||||
})
|
||||
|
||||
it("should make a right arrow", () => {
|
||||
cy.get(".ProseMirror").type("-> rightArrow").should("contain", "→ rightArrow");
|
||||
});
|
||||
it('should make a right arrow', () => {
|
||||
cy.get('.ProseMirror').type('-> rightArrow').should('contain', '→ rightArrow')
|
||||
})
|
||||
|
||||
it("should make a copyright sign", () => {
|
||||
cy.get(".ProseMirror").type("(c) copyright").should("contain", "© copyright");
|
||||
});
|
||||
it('should make a copyright sign', () => {
|
||||
cy.get('.ProseMirror').type('(c) copyright').should('contain', '© copyright')
|
||||
})
|
||||
|
||||
it("should make a registered trademark sign", () => {
|
||||
cy.get(".ProseMirror")
|
||||
.type("(r) registeredTrademark")
|
||||
.should("contain", "® registeredTrademark");
|
||||
});
|
||||
it('should make a registered trademark sign', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('(r) registeredTrademark')
|
||||
.should('contain', '® registeredTrademark')
|
||||
})
|
||||
|
||||
it("should make a trademark sign", () => {
|
||||
cy.get(".ProseMirror").type("(tm) trademark").should("contain", "™ trademark");
|
||||
});
|
||||
it('should make a trademark sign', () => {
|
||||
cy.get('.ProseMirror').type('(tm) trademark').should('contain', '™ trademark')
|
||||
})
|
||||
|
||||
it("should make a one half", () => {
|
||||
cy.get(".ProseMirror").type("1/2 oneHalf").should("contain", "½ oneHalf");
|
||||
});
|
||||
it('should make a one half', () => {
|
||||
cy.get('.ProseMirror').type('1/2 oneHalf').should('contain', '½ oneHalf')
|
||||
})
|
||||
|
||||
it("should make a plus/minus sign", () => {
|
||||
cy.get(".ProseMirror").type("+/- plusMinus").should("contain", "± plusMinus");
|
||||
});
|
||||
it('should make a plus/minus sign', () => {
|
||||
cy.get('.ProseMirror').type('+/- plusMinus').should('contain', '± plusMinus')
|
||||
})
|
||||
|
||||
it("should make a not equal sign", () => {
|
||||
cy.get(".ProseMirror").type("!= notEqual").should("contain", "≠ notEqual");
|
||||
});
|
||||
it('should make a not equal sign', () => {
|
||||
cy.get('.ProseMirror').type('!= notEqual').should('contain', '≠ notEqual')
|
||||
})
|
||||
|
||||
it("should make a laquo", () => {
|
||||
cy.get(".ProseMirror").type("<< laquorow").should("contain", "« laquo");
|
||||
});
|
||||
it('should make a laquo', () => {
|
||||
cy.get('.ProseMirror').type('<< laquorow').should('contain', '« laquo')
|
||||
})
|
||||
|
||||
it("should make a raquo", () => {
|
||||
cy.get(".ProseMirror").type(">> raquorow").should("contain", "» raquo");
|
||||
});
|
||||
it('should make a raquo', () => {
|
||||
cy.get('.ProseMirror').type('>> raquorow').should('contain', '» raquo')
|
||||
})
|
||||
|
||||
it("should make a multiplication sign from an asterisk", () => {
|
||||
cy.get(".ProseMirror").type("1*1 multiplication").should("contain", "1×1 multiplication");
|
||||
});
|
||||
it('should make a multiplication sign from an asterisk', () => {
|
||||
cy.get('.ProseMirror').type('1*1 multiplication').should('contain', '1×1 multiplication')
|
||||
})
|
||||
|
||||
it("should make a multiplication sign from an x", () => {
|
||||
cy.get(".ProseMirror").type("1x1 multiplication").should("contain", "1×1 multiplication");
|
||||
});
|
||||
it('should make a multiplication sign from an x', () => {
|
||||
cy.get('.ProseMirror').type('1x1 multiplication').should('contain', '1×1 multiplication')
|
||||
})
|
||||
|
||||
it("should make a multiplication sign from an asterisk with spaces", () => {
|
||||
cy.get(".ProseMirror").type("1 * 1 multiplication").should("contain", "1 × 1 multiplication");
|
||||
});
|
||||
it('should make a multiplication sign from an asterisk with spaces', () => {
|
||||
cy.get('.ProseMirror').type('1 * 1 multiplication').should('contain', '1 × 1 multiplication')
|
||||
})
|
||||
|
||||
it("should make a multiplication sign from an x with spaces", () => {
|
||||
cy.get(".ProseMirror").type("1 x 1 multiplication").should("contain", "1 × 1 multiplication");
|
||||
});
|
||||
});
|
||||
it('should make a multiplication sign from an x with spaces', () => {
|
||||
cy.get('.ProseMirror').type('1 x 1 multiplication').should('contain', '1 × 1 multiplication')
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user