fix tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
context('/examples/basic', () => {
|
context('/examples/default', () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.visit('/examples/basic')
|
cy.visit('/examples/default')
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: Write tests
|
// TODO: Write tests
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/examples/default', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<h1>Example Text</h1>')
|
editor.commands.setContent('<h1>Example Text</h1>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/marks/bold', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/marks/code', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/marks/italic', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/marks/link', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/marks/strike', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/marks/underline', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/nodes/blockquote', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ context('/api/nodes/blockquote', () => {
|
|||||||
it('the button should wrap all nodes in one blockquote', () => {
|
it('the button should wrap all nodes in one blockquote', () => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p><p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p><p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
|
|
||||||
cy.get('.demo__preview button:first')
|
cy.get('.demo__preview button:first')
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/nodes/bullet-list', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/nodes/code-block', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/nodes/heading', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/nodes/image', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/nodes/ordered-list', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ context('/api/nodes/task-list', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p>Example Text</p>')
|
editor.commands.setContent('<p>Example Text</p>')
|
||||||
editor.commands.selectAll()
|
cy.get('.ProseMirror').type('{selectall}')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Extensions are the way to add functionality to tiptap. By default tiptap comes b
|
|||||||
| [TextAlign](/api/extensions/text-align) | – | [GitHub](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-text-align/) |
|
| [TextAlign](/api/extensions/text-align) | – | [GitHub](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-text-align/) |
|
||||||
| [Typography](/api/extensions/typography) | – | [GitHub](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-typography/) |
|
| [Typography](/api/extensions/typography) | – | [GitHub](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-typography/) |
|
||||||
|
|
||||||
You don’t have to use it, but we prepared a `@tiptap/vue-starter-kit` which includes the most common extensions. Learn [how you can use the `defaultExtensions()`](/examples/basic).
|
You don’t have to use it, but we prepared a `@tiptap/vue-starter-kit` which includes the most common extensions. Learn [how you can use the `defaultExtensions()`](/examples/default).
|
||||||
|
|
||||||
## How extensions work
|
## How extensions work
|
||||||
Although tiptap tries to hide most of the complexity of ProseMirror, it’s built on top of its APIs and we recommend you to read through the [ProseMirror Guide](https://ProseMirror.net/docs/guide/) for advanced usage. You’ll have a better understanding of how everything works under the hood and get more familiar with many terms and jargon used by tiptap.
|
Although tiptap tries to hide most of the complexity of ProseMirror, it’s built on top of its APIs and we recommend you to read through the [ProseMirror Guide](https://ProseMirror.net/docs/guide/) for advanced usage. You’ll have a better understanding of how everything works under the hood and get more familiar with many terms and jargon used by tiptap.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
context('clearContent', () => {
|
context('clearContent', () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.visit('/examples/basic')
|
cy.visit('/examples/default')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns true for the clearContent command', () => {
|
it('returns true for the clearContent command', () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
context('insertHTML', () => {
|
context('insertHTML', () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.visit('/examples/basic')
|
cy.visit('/examples/default')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns true for the insertHTML command', () => {
|
it('returns true for the insertHTML command', () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
context('setContent', () => {
|
context('setContent', () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.visit('/examples/basic')
|
cy.visit('/examples/default')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns true for the setContent command', () => {
|
it('returns true for the setContent command', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user