diff --git a/packages/core/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts b/packages/core/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts index 50f8aa346c..2c397c153f 100644 --- a/packages/core/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts +++ b/packages/core/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts @@ -10,22 +10,24 @@ import { * Returns the block info from the parent block * or undefined if we're at the root */ -export const getParentBlockInfo = (doc: Node, beforePos: number) => { +export const getParentBlockInfo = (doc: Node, beforePos: number): BlockInfo | undefined => { const $pos = doc.resolve(beforePos); + const depth = $pos.depth - 1; + const parentBeforePos = $pos.before(depth); + const parentNode = doc.resolve(parentBeforePos).nodeAfter; - if ($pos.depth <= 1) { + if (!parentNode) { return undefined; } - // get start pos of parent - const parentBeforePos = $pos.posAtIndex( - $pos.index($pos.depth - 1), - $pos.depth - 1, - ); + if (!parentNode.type.spec.group?.includes("bnBlock")) { + return getParentBlockInfo(doc, parentBeforePos); + } const parentBlockInfo = getBlockInfoFromResolvedPos( doc.resolve(parentBeforePos), ); + return parentBlockInfo; }; @@ -50,6 +52,27 @@ export const getPrevBlockInfo = (doc: Node, beforePos: number) => { return prevBlockInfo; }; +/** + * Returns the block info from the sibling block after (below) the given block, + * or undefined if the given block is the last sibling. + */ +export const getNextBlockInfo = (doc: Node, beforePos: number) => { + const $pos = doc.resolve(beforePos); + + const indexInParent = $pos.index(); + + if (indexInParent === $pos.node().childCount - 1) { + return undefined; + } + + const nextBlockBeforePos = $pos.posAtIndex(indexInParent + 1); + + const nextBlockInfo = getBlockInfoFromResolvedPos( + doc.resolve(nextBlockBeforePos), + ); + return nextBlockInfo; +}; + /** * If a block has children like this: * A diff --git a/packages/core/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts b/packages/core/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts index 11c90d8435..d0c7751fa0 100644 --- a/packages/core/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +++ b/packages/core/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts @@ -1,8 +1,11 @@ import { Extension } from "@tiptap/core"; - +import { Fragment, Node } from "prosemirror-model"; import { TextSelection } from "prosemirror-state"; + import { getBottomNestedBlockInfo, + getNextBlockInfo, + getParentBlockInfo, getPrevBlockInfo, mergeBlocksCommand, } from "../../../api/blockManipulation/commands/mergeBlocks/mergeBlocks.js"; @@ -10,7 +13,10 @@ import { nestBlock } from "../../../api/blockManipulation/commands/nestBlock/nes import { fixColumnList } from "../../../api/blockManipulation/commands/replaceBlocks/util/fixColumnList.js"; import { splitBlockCommand } from "../../../api/blockManipulation/commands/splitBlock/splitBlock.js"; import { updateBlockCommand } from "../../../api/blockManipulation/commands/updateBlock/updateBlock.js"; -import { getBlockInfoFromSelection } from "../../../api/getBlockInfoFromPos.js"; +import { + getBlockInfoFromResolvedPos, + getBlockInfoFromSelection, +} from "../../../api/getBlockInfoFromPos.js"; import { BlockNoteEditor } from "../../../editor/BlockNoteEditor.js"; import { FormattingToolbarExtension } from "../../FormattingToolbar/FormattingToolbar.js"; import { FilePanelExtension } from "../../FilePanel/FilePanel.js"; @@ -83,6 +89,18 @@ export const KeyboardShortcutsExtension = Extension.create<{ } const { bnBlock: blockContainer, blockContent } = blockInfo; + const prevBlockInfo = getPrevBlockInfo( + state.doc, + blockInfo.bnBlock.beforePos, + ); + if ( + !prevBlockInfo || + !prevBlockInfo.isBlockContainer || + prevBlockInfo.blockContent.node.type.spec.content !== "inline*" + ) { + return false; + } + const selectionAtBlockStart = state.selection.from === blockContent.beforePos + 1; const selectionEmpty = state.selection.empty; @@ -98,9 +116,46 @@ export const KeyboardShortcutsExtension = Extension.create<{ return false; }), + // If the previous block is a columnList, moves the current block to + // the end of the last column in it. + () => + commands.command(({ state, tr, dispatch }) => { + const blockInfo = getBlockInfoFromSelection(state); + if (!blockInfo.isBlockContainer) { + return false; + } + + const prevBlockInfo = getPrevBlockInfo( + state.doc, + blockInfo.bnBlock.beforePos, + ); + if (!prevBlockInfo || prevBlockInfo.isBlockContainer) { + return false; + } + + if (dispatch) { + const columnAfterPos = prevBlockInfo.bnBlock.afterPos - 1; + const $blockAfterPos = tr.doc.resolve(columnAfterPos - 1); + + tr.delete( + blockInfo.bnBlock.beforePos, + blockInfo.bnBlock.afterPos, + ); + tr.insert($blockAfterPos.pos, blockInfo.bnBlock.node); + tr.setSelection( + TextSelection.near(tr.doc.resolve($blockAfterPos.pos + 1)), + ); + + return true; + } + + return false; + }), + // If the block is the first in a column, moves it to the end of the + // previous column. If there is no previous column, moves it above the + // columnList. () => commands.command(({ state, tr, dispatch }) => { - // when at the start of a first block in a column const blockInfo = getBlockInfoFromSelection(state); if (!blockInfo.isBlockContainer) { return false; @@ -116,7 +171,6 @@ export const KeyboardShortcutsExtension = Extension.create<{ const prevBlock = $pos.nodeBefore; if (prevBlock) { - // should be no previous block return false; } @@ -130,31 +184,22 @@ export const KeyboardShortcutsExtension = Extension.create<{ const columnListPos = $columnPos.before(); if (dispatch) { - const fragment = tr.doc.slice( - blockInfo.bnBlock.beforePos, - blockInfo.bnBlock.afterPos, - ).content; - tr.delete( blockInfo.bnBlock.beforePos, blockInfo.bnBlock.afterPos, ); + fixColumnList(tr, columnListPos); - if ($columnPos.index() === 0) { - // Fix `columnList` and insert the block before it. - fixColumnList(tr, columnListPos); - tr.insert(columnListPos, fragment); + if ($columnPos.pos === columnListPos + 1) { + tr.insert(columnListPos, blockInfo.bnBlock.node); tr.setSelection( TextSelection.near(tr.doc.resolve(columnListPos)), ); } else { - // Insert the block at the end of the first column and fix - // `columnList`. - tr.insert($columnPos.pos - 1, fragment); + tr.insert($columnPos.pos - 1, blockInfo.bnBlock.node); tr.setSelection( - TextSelection.near(tr.doc.resolve($columnPos.pos - 1)), + TextSelection.near(tr.doc.resolve($columnPos.pos)), ); - fixColumnList(tr, columnListPos); } } @@ -208,12 +253,8 @@ export const KeyboardShortcutsExtension = Extension.create<{ } else if ( prevBlockInfo.blockContent.node.type.spec.content === "" ) { - const nonEditableBlockContentStartPos = - prevBlockInfo.blockContent.afterPos - - prevBlockInfo.blockContent.node.nodeSize; - chainedCommands = chainedCommands.setNodeSelection( - nonEditableBlockContentStartPos, + prevBlockInfo.blockContent.beforePos, ); } else { const blockContentStartPos = @@ -242,8 +283,7 @@ export const KeyboardShortcutsExtension = Extension.create<{ const blockInfo = getBlockInfoFromSelection(state); if (!blockInfo.isBlockContainer) { - // TODO - throw new Error(`todo`); + return false; } const selectionAtBlockStart = @@ -262,8 +302,7 @@ export const KeyboardShortcutsExtension = Extension.create<{ ); if (!bottomBlock.isBlockContainer) { - // TODO - throw new Error(`todo`); + return false; } const prevBlockNotTableAndNoContent = @@ -294,50 +333,388 @@ export const KeyboardShortcutsExtension = Extension.create<{ ]); const handleDelete = () => - this.editor.commands.first(({ commands }) => [ + this.editor.commands.first(({ chain, commands }) => [ // Deletes the selection if it's not empty. () => commands.deleteSelection(), + // Deletes the first child block and un-nests its children, if the + // selection is empty and at the end of the current block. If both the + // parent and child blocks have inline content, the child block's + // content is appended to the parent's. The child block's own children + // are unindented before it's deleted. + () => + commands.command(({ state }) => { + const blockInfo = getBlockInfoFromSelection(state); + if (!blockInfo.isBlockContainer || !blockInfo.childContainer) { + return false; + } + const { blockContent, childContainer } = blockInfo; + + const selectionAtBlockEnd = + state.selection.from === blockContent.afterPos - 1; + const selectionEmpty = state.selection.empty; + + const firstChildBlockInfo = getBlockInfoFromResolvedPos( + state.doc.resolve(childContainer.beforePos + 1), + ); + if (!firstChildBlockInfo.isBlockContainer) { + return false; + } + + if (selectionAtBlockEnd && selectionEmpty) { + const firstChildBlockContent = + firstChildBlockInfo.blockContent.node; + const firstChildBlockHasInlineContent = + firstChildBlockContent.type.spec.content === "inline*"; + const blockHasInlineContent = + blockContent.node.type.spec.content === "inline*"; + + return ( + chain() + // Un-nests child block's children if necessary. + .insertContentAt( + firstChildBlockInfo.bnBlock.afterPos, + firstChildBlockInfo.childContainer?.node.content || + Fragment.empty, + ) + .deleteRange( + // Deletes whole child container if there's only one child. + childContainer.node.childCount === 1 + ? { + from: childContainer.beforePos, + to: childContainer.afterPos, + } + : { + from: firstChildBlockInfo.bnBlock.beforePos, + to: firstChildBlockInfo.bnBlock.afterPos, + }, + ) + // Appends inline content from child block if possible. + .insertContentAt( + state.selection.from, + firstChildBlockHasInlineContent && blockHasInlineContent + ? firstChildBlockContent.content + : null, + ) + .setTextSelection(state.selection.from) + .scrollIntoView() + .run() + ); + } + + return false; + }), // Merges block with the next one (at the same nesting level or lower), // if one exists, the block has no children, and the selection is at the // end of the block. () => commands.command(({ state }) => { - // TODO: Change this to not rely on offsets & schema assumptions const blockInfo = getBlockInfoFromSelection(state); if (!blockInfo.isBlockContainer) { return false; } - const { - bnBlock: blockContainer, - blockContent, - childContainer, - } = blockInfo; + const { bnBlock: blockContainer, blockContent } = blockInfo; + + const nextBlockInfo = getNextBlockInfo( + state.doc, + blockInfo.bnBlock.beforePos, + ); + if (!nextBlockInfo || !nextBlockInfo.isBlockContainer) { + return false; + } - const { depth } = state.doc.resolve(blockContainer.beforePos); - const blockAtDocEnd = - blockContainer.afterPos === state.doc.nodeSize - 3; const selectionAtBlockEnd = state.selection.from === blockContent.afterPos - 1; const selectionEmpty = state.selection.empty; - const hasChildBlocks = childContainer !== undefined; - if ( - !blockAtDocEnd && - selectionAtBlockEnd && - selectionEmpty && - !hasChildBlocks - ) { - let oldDepth = depth; - let newPos = blockContainer.afterPos + 1; - let newDepth = state.doc.resolve(newPos).depth; - - while (newDepth < oldDepth) { - oldDepth = newDepth; - newPos += 2; - newDepth = state.doc.resolve(newPos).depth; + const posBetweenBlocks = blockContainer.afterPos; + + if (selectionAtBlockEnd && selectionEmpty) { + return chain() + .command(mergeBlocksCommand(posBetweenBlocks)) + .scrollIntoView() + .run(); + } + + return false; + }), + // If the previous block is a columnList, moves the current block to + // the end of the last column in it. + () => + commands.command(({ state, tr, dispatch }) => { + const blockInfo = getBlockInfoFromSelection(state); + if (!blockInfo.isBlockContainer) { + return false; + } + + const nextBlockInfo = getNextBlockInfo( + state.doc, + blockInfo.bnBlock.beforePos, + ); + if (!nextBlockInfo || nextBlockInfo.isBlockContainer) { + return false; + } + + if (dispatch) { + const columnBeforePos = nextBlockInfo.bnBlock.beforePos + 1; + const $blockBeforePos = tr.doc.resolve(columnBeforePos + 1); + + tr.delete( + $blockBeforePos.pos, + $blockBeforePos.pos + $blockBeforePos.nodeAfter!.nodeSize, + ); + fixColumnList(tr, nextBlockInfo.bnBlock.beforePos); + tr.insert(blockInfo.bnBlock.afterPos, $blockBeforePos.nodeAfter!); + tr.setSelection( + TextSelection.near(tr.doc.resolve($blockBeforePos.pos)), + ); + + return true; + } + + return false; + }), + // If the block is the last in a column, moves it to the start of the + // next column. If there is no next column, moves it below the + // columnList. + () => + commands.command(({ state, tr, dispatch }) => { + const blockInfo = getBlockInfoFromSelection(state); + if (!blockInfo.isBlockContainer) { + return false; + } + + const selectionAtBlockEnd = + tr.selection.from === blockInfo.blockContent.afterPos - 1; + if (!selectionAtBlockEnd) { + return false; + } + + const $pos = tr.doc.resolve(blockInfo.bnBlock.afterPos); + + const nextBlock = $pos.nodeAfter; + if (nextBlock) { + return false; + } + + const parentBlock = $pos.node(); + if (parentBlock.type.name !== "column") { + return false; + } + + const $blockEndPos = tr.doc.resolve(blockInfo.bnBlock.afterPos); + const $columnEndPos = tr.doc.resolve($blockEndPos.after()); + const columnListEndPos = $columnEndPos.after(); + + if (dispatch) { + // Position before first block in next column, or first block + // after columnList if there is no next column. + const nextBlockBeforePos = + $columnEndPos.pos === columnListEndPos - 1 + ? columnListEndPos + : $columnEndPos.pos + 1; + const nextBlockInfo = getBlockInfoFromResolvedPos( + tr.doc.resolve(nextBlockBeforePos), + ); + + tr.delete( + nextBlockInfo.bnBlock.beforePos, + nextBlockInfo.bnBlock.afterPos, + ); + fixColumnList( + tr, + columnListEndPos - $columnEndPos.node().nodeSize, + ); + tr.insert($blockEndPos.pos, nextBlockInfo.bnBlock.node); + tr.setSelection( + TextSelection.near(tr.doc.resolve(nextBlockBeforePos)), + ); + } + + return true; + }), + // Deletes the next block at either the same or lower nesting level, if + // the selection is empty and at the end of the block. If both the + // current and next blocks have inline content, the next block's + // content is appended to the current block's. The next block's own + // children are unindented before it's deleted. + () => + commands.command(({ state }) => { + const blockInfo = getBlockInfoFromSelection(state); + if (!blockInfo.isBlockContainer) { + return false; + } + const { blockContent } = blockInfo; + + const selectionAtBlockEnd = + state.selection.from === blockContent.afterPos - 1; + const selectionEmpty = state.selection.empty; + + if (selectionAtBlockEnd && selectionEmpty) { + const getNextBlockInfoAtAnyLevel = ( + doc: Node, + beforePos: number, + ) => { + const nextBlockInfo = getNextBlockInfo(doc, beforePos); + if (nextBlockInfo) { + return nextBlockInfo; + } + + const parentBlockInfo = getParentBlockInfo(doc, beforePos); + if (!parentBlockInfo) { + return undefined; + } + + return getNextBlockInfoAtAnyLevel( + doc, + parentBlockInfo.bnBlock.beforePos, + ); + }; + + const nextBlockInfo = getNextBlockInfoAtAnyLevel( + state.doc, + blockInfo.bnBlock.beforePos, + ); + if (!nextBlockInfo || !nextBlockInfo.isBlockContainer) { + return false; } - return commands.command(mergeBlocksCommand(newPos - 1)); + const nextBlockContent = nextBlockInfo.blockContent.node; + const nextBlockHasInlineContent = + nextBlockContent.type.spec.content === "inline*"; + const blockHasInlineContent = + blockContent.node.type.spec.content === "inline*"; + + return ( + chain() + // Un-nests next block's children if necessary. + .insertContentAt( + nextBlockInfo.bnBlock.afterPos, + nextBlockInfo.childContainer?.node.content || + Fragment.empty, + ) + .deleteRange({ + from: nextBlockInfo.bnBlock.beforePos, + to: nextBlockInfo.bnBlock.afterPos, + }) + // Appends inline content from child block if possible. + .insertContentAt( + state.selection.from, + nextBlockHasInlineContent && blockHasInlineContent + ? nextBlockContent.content + : null, + ) + .setTextSelection(state.selection.from) + .scrollIntoView() + .run() + ); + } + + return false; + }), + // Deletes the current block if it's an empty block with inline content, + // and moves the selection to the next block. + () => + commands.command(({ state }) => { + const blockInfo = getBlockInfoFromSelection(state); + if (!blockInfo.isBlockContainer) { + return false; + } + + const blockEmpty = + blockInfo.blockContent.node.childCount === 0 && + blockInfo.blockContent.node.type.spec.content === "inline*"; + + if (blockEmpty) { + const nextBlockInfo = getNextBlockInfo( + state.doc, + blockInfo.bnBlock.beforePos, + ); + if (!nextBlockInfo || !nextBlockInfo.isBlockContainer) { + return false; + } + + let chainedCommands = chain(); + + if ( + nextBlockInfo.blockContent.node.type.spec.content === + "tableRow+" + ) { + const tableBlockStartPos = blockInfo.bnBlock.afterPos + 1; + const tableBlockContentStartPos = tableBlockStartPos + 1; + const firstRowStartPos = tableBlockContentStartPos + 1; + const firstCellStartPos = firstRowStartPos + 1; + const firstCellParagraphStartPos = firstCellStartPos + 1; + + chainedCommands = chainedCommands.setTextSelection( + firstCellParagraphStartPos, + ); + } else if ( + nextBlockInfo.blockContent.node.type.spec.content === "" + ) { + chainedCommands = chainedCommands.setNodeSelection( + nextBlockInfo.blockContent.beforePos, + ); + } else { + chainedCommands = chainedCommands.setTextSelection( + nextBlockInfo.blockContent.beforePos + 1, + ); + } + + return chainedCommands + .deleteRange({ + from: blockInfo.bnBlock.beforePos, + to: blockInfo.bnBlock.afterPos, + }) + .scrollIntoView() + .run(); + } + + return false; + }), + // Deletes next block if it contains no content and isn't a table, + // when the selection is empty and at the end of the block. Moves the + // current block into the deleted block's place. + () => + commands.command(({ state }) => { + const blockInfo = getBlockInfoFromSelection(state); + + if (!blockInfo.isBlockContainer) { + return false; + } + + const selectionAtBlockEnd = + state.selection.from === blockInfo.blockContent.afterPos - 1; + const selectionEmpty = state.selection.empty; + + const nextBlockInfo = getNextBlockInfo( + state.doc, + blockInfo.bnBlock.beforePos, + ); + if (!nextBlockInfo) { + return false; + } + if (!nextBlockInfo.isBlockContainer) { + return false; + } + + if (nextBlockInfo && selectionAtBlockEnd && selectionEmpty) { + const nextBlockNotTableAndNoContent = + nextBlockInfo.blockContent.node.type.spec.content === "" || + (nextBlockInfo.blockContent.node.type.spec.content === + "inline*" && + nextBlockInfo.blockContent.node.childCount === 0); + + if (nextBlockNotTableAndNoContent) { + const childBlocks = + nextBlockInfo.bnBlock.node.lastChild!.content; + return chain() + .deleteRange({ + from: nextBlockInfo.bnBlock.beforePos, + to: nextBlockInfo.bnBlock.afterPos, + }) + .insertContentAt(blockInfo.bnBlock.afterPos, nextBlockInfo.bnBlock.node.childCount === 2 ? childBlocks : null) + .run(); + } } return false; diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts index 2fb1fa10cf..a3b7b0df6f 100644 --- a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts @@ -6,6 +6,7 @@ import { } from "../../utils/const.js"; import { insertHeading, insertParagraph } from "../../utils/copypaste.js"; import { compareDocToSnapshot, focusOnEditor } from "../../utils/editor.js"; +import { executeSlashCommand } from "../../utils/slashmenu.js"; test.describe.configure({ mode: "serial" }); @@ -171,6 +172,169 @@ test.describe("Check Keyboard Handlers' Behaviour", () => { "backspacePreservesNestedBlocksEmpty.json", ); }); + test("Check Delete at the end of a block", async ({ page }) => { + await focusOnEditor(page); + await insertParagraph(page); + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteEndOfBlock.json"); + }); + test("Check Delete while selection not empty", async ({ page }) => { + await focusOnEditor(page); + await insertParagraph(page); + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Shift+ArrowLeft"); + await page.keyboard.press("Shift+ArrowLeft"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteSelection.json"); + }); + test("Check Delete before inline content block", async ({ page }) => { + await focusOnEditor(page); + await insertParagraph(page); + await insertParagraph(page); + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteInlineContent.json"); + }); + test("Check Delete before image block", async ({ page }) => { + await focusOnEditor(page); + await insertParagraph(page); + await executeSlashCommand(page, "image"); + await page.keyboard.press("Escape"); // Close file panel + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteImage.json"); + }); + test("Check Delete before table", async ({ page }) => { + await focusOnEditor(page); + await insertParagraph(page); + await executeSlashCommand(page, "table"); + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteTable.json"); + }); + test("Check Delete selected image block", async ({ page }) => { + await focusOnEditor(page); + await executeSlashCommand(page, "image"); + await page.keyboard.press("Escape"); // Close file panel + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteSelectedImage.json"); + }); + test("Check Delete end of block with inline content child", async ({ + page, + }) => { + await focusOnEditor(page); + await insertParagraph(page); + await page.keyboard.press("Tab"); + await insertParagraph(page); + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteInlineContentChild.json"); + }); + test("Check Delete end of block with image child", async ({ page }) => { + await focusOnEditor(page); + await insertParagraph(page); + await page.keyboard.press("Tab"); + await executeSlashCommand(page, "image"); + await page.keyboard.press("Escape"); // Close file panel + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteImageChild.json"); + }); + test("Check Delete end of block with table child", async ({ page }) => { + await focusOnEditor(page); + await insertParagraph(page); + await page.keyboard.press("Tab"); + await executeSlashCommand(page, "table"); + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteTableChild.json"); + }); + test("Check Delete end of block with multiple children", async ({ page }) => { + await focusOnEditor(page); + await insertParagraph(page); + await page.keyboard.press("Tab"); + await insertParagraph(page); + await page.keyboard.press("Tab"); + await insertParagraph(page); + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteMultipleChildren.json"); + }); + test("Check Delete end of block with nested children", async ({ page }) => { + await focusOnEditor(page); + await insertParagraph(page); + await page.keyboard.press("Tab"); + await insertParagraph(page); + await page.keyboard.press("Tab"); + await page.keyboard.press("Tab"); + await insertParagraph(page); + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteNestedChildren.json"); + }); + test("Check Delete before shallower block", async ({ page }) => { + await focusOnEditor(page); + await insertParagraph(page); + await page.keyboard.press("Tab"); + await insertParagraph(page); + await insertParagraph(page); + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("ControlOrMeta+ArrowRight"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteShallowerBlock.json"); + }); + test("Check Delete before shallower block with children", async ({ + page, + }) => { + await focusOnEditor(page); + await insertParagraph(page); + await page.keyboard.press("Tab"); + await insertParagraph(page); + await insertParagraph(page); + await page.keyboard.press("Tab"); + await insertParagraph(page); + + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("ArrowUp"); + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteShallowerBlockWithChildren.json"); + }); test("Check heading 1 shortcut", async ({ page }) => { await focusOnEditor(page); await page.keyboard.type("Paragraph"); diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-chromium-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-chromium-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-firefox-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-firefox-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-webkit-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteEndOfBlock-json-webkit-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-chromium-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-chromium-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-firefox-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-firefox-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-webkit-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImage-json-webkit-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-chromium-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-chromium-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-firefox-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-firefox-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-webkit-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteImageChild-json-webkit-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-chromium-linux.json new file mode 100644 index 0000000000..4438e21e1b --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-chromium-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-firefox-linux.json new file mode 100644 index 0000000000..4438e21e1b --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-firefox-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-webkit-linux.json new file mode 100644 index 0000000000..4438e21e1b --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContent-json-webkit-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-chromium-linux.json new file mode 100644 index 0000000000..4438e21e1b --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-chromium-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-firefox-linux.json new file mode 100644 index 0000000000..4438e21e1b --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-firefox-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-webkit-linux.json new file mode 100644 index 0000000000..4438e21e1b --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteInlineContentChild-json-webkit-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-chromium-linux.json new file mode 100644 index 0000000000..f72b0fbf4e --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-chromium-linux.json @@ -0,0 +1,75 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-firefox-linux.json new file mode 100644 index 0000000000..f72b0fbf4e --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-firefox-linux.json @@ -0,0 +1,75 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-webkit-linux.json new file mode 100644 index 0000000000..f72b0fbf4e --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteMultipleChildren-json-webkit-linux.json @@ -0,0 +1,75 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-chromium-linux.json new file mode 100644 index 0000000000..f72b0fbf4e --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-chromium-linux.json @@ -0,0 +1,75 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-firefox-linux.json new file mode 100644 index 0000000000..f72b0fbf4e --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-firefox-linux.json @@ -0,0 +1,75 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-webkit-linux.json new file mode 100644 index 0000000000..f72b0fbf4e --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteNestedChildren-json-webkit-linux.json @@ -0,0 +1,75 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-chromium-linux.json new file mode 100644 index 0000000000..f56b777a4c --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-chromium-linux.json @@ -0,0 +1,26 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-firefox-linux.json new file mode 100644 index 0000000000..f56b777a4c --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-firefox-linux.json @@ -0,0 +1,26 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-webkit-linux.json new file mode 100644 index 0000000000..f56b777a4c --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelectedImage-json-webkit-linux.json @@ -0,0 +1,26 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-chromium-linux.json new file mode 100644 index 0000000000..700034dfb4 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-chromium-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragra" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-firefox-linux.json new file mode 100644 index 0000000000..700034dfb4 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-firefox-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragra" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-webkit-linux.json new file mode 100644 index 0000000000..700034dfb4 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteSelection-json-webkit-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragra" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-chromium-linux.json new file mode 100644 index 0000000000..22781307e7 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-chromium-linux.json @@ -0,0 +1,75 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-firefox-linux.json new file mode 100644 index 0000000000..22781307e7 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-firefox-linux.json @@ -0,0 +1,75 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-webkit-linux.json new file mode 100644 index 0000000000..22781307e7 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlock-json-webkit-linux.json @@ -0,0 +1,75 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-chromium-linux.json new file mode 100644 index 0000000000..e59aeeca33 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-chromium-linux.json @@ -0,0 +1,97 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "4" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-firefox-linux.json new file mode 100644 index 0000000000..e59aeeca33 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-firefox-linux.json @@ -0,0 +1,97 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "4" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-webkit-linux.json new file mode 100644 index 0000000000..e59aeeca33 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteShallowerBlockWithChildren-json-webkit-linux.json @@ -0,0 +1,97 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + }, + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ParagraphParagraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "4" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-chromium-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-chromium-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-firefox-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-firefox-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-webkit-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTable-json-webkit-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-chromium-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-chromium-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-chromium-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-firefox-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-firefox-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-firefox-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-webkit-linux.json b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-webkit-linux.json new file mode 100644 index 0000000000..cb66bb0c92 --- /dev/null +++ b/tests/src/end-to-end/keyboardhandlers/keyboardhandlers.test.ts-snapshots/deleteTableChild-json-webkit-linux.json @@ -0,0 +1,48 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "2" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts b/tests/src/end-to-end/multicolumn/multicolumn.test.ts new file mode 100644 index 0000000000..945eafc3a0 --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts @@ -0,0 +1,59 @@ +import { test } from "../../setup/setupScript.js"; +import { + BULLET_LIST_SELECTOR, + H_ONE_BLOCK_SELECTOR, + MULTI_COLUMN_URL, +} from "../../utils/const.js"; +import { compareDocToSnapshot, focusOnEditor } from "../../utils/editor.js"; + +test.describe.configure({ mode: "serial" }); + +test.beforeEach(async ({ page }) => { + await page.goto(MULTI_COLUMN_URL); +}); + +test.describe("Check Multi-Column Behaviour", () => { + test("Check Delete before column", async ({ page }) => { + await focusOnEditor(page); + + await page.click(H_ONE_BLOCK_SELECTOR); + await page.keyboard.press("ArrowRight"); + await page.keyboard.press("ArrowRight"); + await page.keyboard.press("ArrowRight"); + + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteBeforeColumn.json"); + }); + test("Check Delete before column with single block", async ({ page }) => { + await focusOnEditor(page); + + await page.locator(".bn-block-column").first().click(); + + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteBeforeColumnWithSingleBlock.json"); + }); + test("Check Delete before column list", async ({ page }) => { + await focusOnEditor(page); + + await page.locator(".bn-block-content").first().click(); + + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteBeforeColumnList.json"); + }); + test("Check Delete end of column list", async ({ page }) => { + await focusOnEditor(page); + + await page.locator(BULLET_LIST_SELECTOR).last().click(); + await page.keyboard.press("ArrowDown"); + await page.keyboard.type("Paragraph"); + await page.keyboard.press("ControlOrMeta+ArrowLeft"); + await page.keyboard.press("ArrowLeft"); + + await page.keyboard.press("Delete"); + + await compareDocToSnapshot(page, "deleteEndOfColumnList.json"); + }); +}); diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-chromium-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-chromium-linux.json new file mode 100644 index 0000000000..119bed4892 --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-chromium-linux.json @@ -0,0 +1,217 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "2", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "4", + "width": 1.4 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-firefox-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-firefox-linux.json new file mode 100644 index 0000000000..119bed4892 --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-firefox-linux.json @@ -0,0 +1,217 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "2", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "4", + "width": 1.4 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-webkit-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-webkit-linux.json new file mode 100644 index 0000000000..119bed4892 --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumn-json-webkit-linux.json @@ -0,0 +1,217 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "2", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "4", + "width": 1.4 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-chromium-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-chromium-linux.json new file mode 100644 index 0000000000..339cc68dbc --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-chromium-linux.json @@ -0,0 +1,208 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "4", + "width": 1.4 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-firefox-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-firefox-linux.json new file mode 100644 index 0000000000..339cc68dbc --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-firefox-linux.json @@ -0,0 +1,208 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "4", + "width": 1.4 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-webkit-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-webkit-linux.json new file mode 100644 index 0000000000..339cc68dbc --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnList-json-webkit-linux.json @@ -0,0 +1,208 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "4", + "width": 1.4 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-chromium-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-chromium-linux.json new file mode 100644 index 0000000000..888b0d14fd --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-chromium-linux.json @@ -0,0 +1,208 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "2", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-firefox-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-firefox-linux.json new file mode 100644 index 0000000000..888b0d14fd --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-firefox-linux.json @@ -0,0 +1,208 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "2", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-webkit-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-webkit-linux.json new file mode 100644 index 0000000000..888b0d14fd --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteBeforeColumnWithSingleBlock-json-webkit-linux.json @@ -0,0 +1,208 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "2", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-chromium-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-chromium-linux.json new file mode 100644 index 0000000000..e41128a4b1 --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-chromium-linux.json @@ -0,0 +1,239 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "2", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "4", + "width": 1.4 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "12" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-firefox-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-firefox-linux.json new file mode 100644 index 0000000000..e41128a4b1 --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-firefox-linux.json @@ -0,0 +1,239 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "2", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "4", + "width": 1.4 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "12" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-webkit-linux.json b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-webkit-linux.json new file mode 100644 index 0000000000..e41128a4b1 --- /dev/null +++ b/tests/src/end-to-end/multicolumn/multicolumn.test.ts-snapshots/deleteEndOfColumnList-json-webkit-linux.json @@ -0,0 +1,239 @@ +{ + "type": "doc", + "content": [ + { + "type": "blockGroup", + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "0" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Welcome to this demo!" + } + ] + } + ] + }, + { + "type": "columnList", + "attrs": { + "id": "1" + }, + "content": [ + { + "type": "column", + "attrs": { + "id": "2", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "3" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "This paragraph is in a column!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "4", + "width": 1.4 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "5" + }, + "content": [ + { + "type": "heading", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left", + "level": 1, + "isToggleable": false + }, + "content": [ + { + "type": "text", + "text": "So is this heading!" + } + ] + } + ] + } + ] + }, + { + "type": "column", + "attrs": { + "id": "6", + "width": 0.8 + }, + "content": [ + { + "type": "blockContainer", + "attrs": { + "id": "7" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "You can have multiple blocks in a column too" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "8" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 1" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "9" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 2" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "10" + }, + "content": [ + { + "type": "bulletListItem", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Block 3" + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "11" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "blockContainer", + "attrs": { + "id": "12" + }, + "content": [ + { + "type": "paragraph", + "attrs": { + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/utils/const.ts b/tests/src/utils/const.ts index 8dc672aee1..04cca1cee6 100644 --- a/tests/src/utils/const.ts +++ b/tests/src/utils/const.ts @@ -15,6 +15,10 @@ export const AI_URL = !process.env.RUN_IN_DOCKER ? `http://localhost:${PORT}/ai/minimal?hideMenu` : `http://host.docker.internal:${PORT}/ai/minimal?hideMenu`; +export const MULTI_COLUMN_URL = !process.env.RUN_IN_DOCKER + ? `http://localhost:${PORT}/basic/multi-column?hideMenu` + : `http://host.docker.internal:${PORT}/basic/multi-column?hideMenu`; + export const STATIC_URL = !process.env.RUN_IN_DOCKER ? `http://localhost:${PORT}/backend/rendering-static-documents?hideMenu` : `http://host.docker.internal:${PORT}/backend/rendering-static-documents?hideMenu`;