fix: expose accordion contents and add clear insert actions (1.8.3)
CMS quality / php (8.2) (push) Canceled after 0s
CMS quality / php (8.4) (push) Canceled after 0s
CMS quality / browser (push) Canceled after 0s
CMS quality / mysql (push) Canceled after 0s

This commit is contained in:
kantarci committed 2026-09-14 12:53:16 +02:00
1 parent a108e7d143
commit a3029966cb
12 files changed
+257 -18

No files matched your search

+11
View File
@@ -224,6 +224,17 @@ test('v6 containers accept only their own children and an accordion starts with
assert.equal(canContain(block, { type: 'accordionitem' }), true);
assert.equal(canContain({ type: 'section', children: [] }, { type: 'accordionitem' }), false);
assert.equal(canContain(block.children[0], { type: 'text' }), true);
// Selecting the group must not silently put a text outside it. Choose the entry first.
assert.equal(insertionTarget(history.document, accordion, 'text'), null);
assert.equal(insertBlock(history.document, 'text', accordion), null);
const entry = block.children[0].id;
const text = history.change(doc => insertBlock(doc, 'text', entry));
assert.equal(locate(history.document.blocks, text).parent.id, entry);
history.undo();
assert.equal(locate(history.document.blocks, entry).block.children.length, 0);
history.redo();
assert.equal(locate(history.document.blocks, text).parent.id, entry);
history.undo();
// A logo strip takes images only, like a gallery.
const logos = history.change(doc => insertBlock(doc, 'logos', 's2'));