replace all contains
This commit is contained in:
@@ -3,89 +3,101 @@ context('/examples/markdown-shortcuts', () => {
|
||||
cy.visit('/examples/markdown-shortcuts')
|
||||
})
|
||||
|
||||
beforeEach(done => {
|
||||
beforeEach(() => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.focus()
|
||||
editor.clearContent()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('should make a h1', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('# Headline', { force: true })
|
||||
.contains('h1', 'Headline')
|
||||
.find('h1')
|
||||
.should('contain', 'Headline')
|
||||
})
|
||||
|
||||
it('should make a h2', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('## Headline', { force: true })
|
||||
.contains('h2', 'Headline')
|
||||
.find('h2')
|
||||
.should('contain', 'Headline')
|
||||
})
|
||||
|
||||
it('should make a h3', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('### Headline', { force: true })
|
||||
.contains('h3', 'Headline')
|
||||
.find('h3')
|
||||
.should('contain', 'Headline')
|
||||
})
|
||||
|
||||
it('should make a h4', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('#### Headline', { force: true })
|
||||
.contains('h4', 'Headline')
|
||||
.find('h4')
|
||||
.should('contain', 'Headline')
|
||||
})
|
||||
|
||||
it('should make a h5', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('##### Headline', { force: true })
|
||||
.contains('h5', 'Headline')
|
||||
.find('h5')
|
||||
.should('contain', 'Headline')
|
||||
})
|
||||
|
||||
it('should make a h6', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('###### Headline', { force: true })
|
||||
.contains('h6', 'Headline')
|
||||
.find('h6')
|
||||
.should('contain', 'Headline')
|
||||
})
|
||||
|
||||
it('should create inline code', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('`$foobar`', { force: true })
|
||||
.contains('code', '$foobar')
|
||||
.find('code')
|
||||
.should('contain', '$foobar')
|
||||
})
|
||||
|
||||
it.skip('should create a code block without language', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('``` {enter}const foo = bar{enter}```', { force: true })
|
||||
.contains('pre', 'const foo = bar')
|
||||
.find('pre')
|
||||
.should('contain', 'const foo = bar')
|
||||
})
|
||||
|
||||
it.skip('should create a bullet list from asteriks', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('* foobar', { force: true })
|
||||
.contains('ul', 'foobar')
|
||||
.find('ul')
|
||||
.should('contain', 'foobar')
|
||||
})
|
||||
|
||||
it.skip('should create a bullet list from dashes', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('- foobar', { force: true })
|
||||
.contains('ul', 'foobar')
|
||||
.find('ul')
|
||||
.should('contain', 'foobar')
|
||||
})
|
||||
|
||||
it.skip('should create a bullet list from pluses', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('+ foobar', { force: true })
|
||||
.contains('ul', 'foobar')
|
||||
.find('ul')
|
||||
.should('contain', 'foobar')
|
||||
})
|
||||
|
||||
it.skip('should create a ordered list', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('1. foobar', { force: true })
|
||||
.contains('ol', 'foobar')
|
||||
.find('ol')
|
||||
.should('contain', 'foobar')
|
||||
})
|
||||
|
||||
it.skip('should create a blockquote', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('> foobar', { force: true })
|
||||
.contains('blockquote', 'foobar')
|
||||
.find('blockquote')
|
||||
.should('contain', 'foobar')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user