replace all contains
This commit is contained in:
@@ -3,18 +3,17 @@ context('/api/extensions/strike', () => {
|
||||
cy.visit('/api/extensions/strike')
|
||||
})
|
||||
|
||||
beforeEach(done => {
|
||||
beforeEach(() => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
editor.focus()
|
||||
editor.selectAll()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('the button should strike the selected text', () => {
|
||||
cy.get('.demo__preview button:first').click({ force: true })
|
||||
cy.get('.ProseMirror').contains('s', 'Example Text')
|
||||
cy.get('.ProseMirror').find('s').should('contain', 'Example Text')
|
||||
})
|
||||
|
||||
it('the button should toggle the selected text striked', () => {
|
||||
@@ -26,7 +25,7 @@ context('/api/extensions/strike', () => {
|
||||
|
||||
it('the keyboard shortcut should strike the selected text', () => {
|
||||
cy.get('.ProseMirror').type('{meta}d', { force: true })
|
||||
cy.get('.ProseMirror').contains('s', 'Example Text')
|
||||
cy.get('.ProseMirror').find('s').should('contain', 'Example Text')
|
||||
})
|
||||
|
||||
it('the keyboard shortcut should toggle the selected text striked', () => {
|
||||
@@ -37,6 +36,7 @@ context('/api/extensions/strike', () => {
|
||||
it('should make a striked text from the markdown shortcut', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.type('~Strike~', { force: true })
|
||||
.contains('s', 'Strike')
|
||||
.find('s')
|
||||
.should('contain', 'Strike')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user