defaults to force: true for type and click

This commit is contained in:
Philipp Kühn
2020-09-15 09:03:08 +02:00
parent 71cc626b0a
commit 00506e359b
14 changed files with 94 additions and 63 deletions

View File

@@ -12,7 +12,7 @@ context('/api/extensions/code-block', () => {
it('the button should make the selected line a code block', () => {
cy.get('.demo__preview button:first')
.click({ force: true })
.click()
cy.get('.ProseMirror')
.find('pre')
@@ -21,17 +21,17 @@ context('/api/extensions/code-block', () => {
it('the button should toggle the code block', () => {
cy.get('.demo__preview button:first')
.click({ force: true })
.click()
cy.get('.ProseMirror')
.find('pre')
.should('contain', 'Example Text')
cy.get('.ProseMirror')
.type('{selectall}', { force: true })
.type('{selectall}')
cy.get('.demo__preview button:first')
.click({ force: true })
.click()
cy.get('.ProseMirror pre')
.should('not.exist')
@@ -51,7 +51,7 @@ context('/api/extensions/code-block', () => {
.should('contain', 'Example Text')
cy.get('.ProseMirror')
.type('{selectall}', { force: true })
.type('{selectall}')
.trigger('keydown', { shiftKey: true, ctrlKey: true, key: '\\' })
cy.get('.ProseMirror pre')
@@ -60,7 +60,7 @@ context('/api/extensions/code-block', () => {
it('should make a code block from markdown shortcuts', () => {
cy.get('.ProseMirror')
.type('``` {enter}Code', { force: true })
.type('``` {enter}Code')
.find('pre')
.should('contain', 'Code')
})