Added toolbar e2e tests (#409)

* added toolbar e2e test
changed addTable function

* fixed toolbar unit test

* added emoji to toolbar e2e tests
added selection with link to toolbar e2e tests
This commit is contained in:
Philip Molares 2020-08-15 01:39:48 +02:00 committed by GitHub
parent c15f0d9900
commit d15ab657a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 268 additions and 2 deletions

View file

@ -22,7 +22,7 @@ export const addImage = (editor: Editor): void => addLink(editor, '!')
export const addLine = (editor: Editor): void => changeLines(editor, line => `${line}\n----`)
export const addComment = (editor: Editor): void => changeLines(editor, line => `${line}\n> []`)
export const addTable = (editor: Editor): void => changeLines(editor, line => `${line}\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |`)
export const addTable = (editor: Editor): void => changeLines(editor, line => `${line}\n| # 1 | # 2 | # 3 |\n| ---- | ---- | ---- |\n| Text | Text | Text |`)
export const addEmoji = (emoji: EmojiData, editor: Editor): void => {
insertAtCursor(editor, getEmojiShortCode(emoji))