add a bunch of new tests and add empty test files where missing

This commit is contained in:
Hans Pagel
2020-11-24 16:54:25 +01:00
parent 37cc39b919
commit 098c83f964
33 changed files with 290 additions and 201 deletions

View File

@@ -2,4 +2,6 @@ context('/api/extensions/collaboration', () => {
before(() => {
cy.visit('/api/extensions/collaboration')
})
// TODO: Write tests
})

View File

@@ -2,4 +2,6 @@ context('/api/extensions/collaboration-cursor', () => {
before(() => {
cy.visit('/api/extensions/collaboration-cursor')
})
// TODO: Write tests
})

View File

@@ -2,4 +2,6 @@ context('/examples/dropcursor', () => {
before(() => {
cy.visit('/examples/dropcursor')
})
// TODO: Write tests
})

View File

@@ -2,4 +2,6 @@ context('/api/extensions/font-family', () => {
before(() => {
cy.visit('/api/extensions/font-family')
})
// TODO: Write tests
})

View File

@@ -2,4 +2,6 @@ context('/examples/gapcursor', () => {
before(() => {
cy.visit('/examples/gapcursor')
})
// TODO: Write tests
})

View File

@@ -81,4 +81,32 @@ context('/api/extensions/text-align', () => {
.find('p')
.should('have.css', 'text-align', 'left')
})
it('aligns the text left when pressing the keyboard shortcut', () => {
cy.get('.ProseMirror')
.trigger('keydown', { modKey: true, shiftKey: true, key: 'l' })
.find('p')
.should('have.css', 'text-align', 'left')
})
it('aligns the text center when pressing the keyboard shortcut', () => {
cy.get('.ProseMirror')
.trigger('keydown', { modKey: true, shiftKey: true, key: 'e' })
.find('p')
.should('have.css', 'text-align', 'center')
})
it('aligns the text right when pressing the keyboard shortcut', () => {
cy.get('.ProseMirror')
.trigger('keydown', { modKey: true, shiftKey: true, key: 'r' })
.find('p')
.should('have.css', 'text-align', 'right')
})
it('aligns the text justified when pressing the keyboard shortcut', () => {
cy.get('.ProseMirror')
.trigger('keydown', { modKey: true, shiftKey: true, key: 'j' })
.find('p')
.should('have.css', 'text-align', 'justify')
})
})