mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 23:15:15 +08:00
test: add savvy example tests (#2043)
This commit is contained in:
parent
ddc9ca8d4f
commit
57a5bed495
@ -3,5 +3,36 @@ context('/src/Examples/Savvy/Vue/', () => {
|
||||
cy.visit('/src/Examples/Savvy/Vue/')
|
||||
})
|
||||
|
||||
// TODO: Write tests
|
||||
beforeEach(() => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.commands.clearContent()
|
||||
})
|
||||
})
|
||||
|
||||
const tests = [
|
||||
['(c)', '©'],
|
||||
['->', '→'],
|
||||
['>>', '»'],
|
||||
['1/2', '½'],
|
||||
['!=', '≠'],
|
||||
['--', '—'],
|
||||
['1x1', '1×1'],
|
||||
[':-) ', '🙂'],
|
||||
['<3 ', '❤️'],
|
||||
['>:P ', '😜'],
|
||||
]
|
||||
|
||||
tests.forEach(test => {
|
||||
it(`should parse ${test[0]} correctly`, () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type(test[0])
|
||||
.should('contain', test[1])
|
||||
})
|
||||
})
|
||||
|
||||
it('should parse hex colors correctly', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('#FD9170')
|
||||
.find('.color')
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user