From 05ef28448ce22db1124d083033d19108029daee8 Mon Sep 17 00:00:00 2001 From: Olivier Gorzalka Date: Fri, 25 Sep 2026 07:33:15 +0200 Subject: [PATCH] test: expect theme-default's hero preview to match the page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit theme-default v1.4.5 gives hero an edit.jsx that mirrors save.jsx, in place of the scaffold placeholder "Hero – Block Editor". The preview test no longer needs to be marked as a known failure, and previewGap, which only existed for it, goes. --- tests/e2e/specs/blocks.spec.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/e2e/specs/blocks.spec.ts b/tests/e2e/specs/blocks.spec.ts index 40e85818..4bf95963 100644 --- a/tests/e2e/specs/blocks.spec.ts +++ b/tests/e2e/specs/blocks.spec.ts @@ -17,8 +17,6 @@ type BlockCase = { attributes?: Record; /** Text the block renders on the front end */ text: string; - /** Why the editor preview is known not to match the page yet */ - previewGap?: string; }; const pluginBlocks: BlockCase[] = [ @@ -31,7 +29,7 @@ const moduleBlocks: BlockCase[] = [{ name: 'e2e-module/module-card', text: 'Modu const generatedThemeBlocks: BlockCase[] = [{ name: 'default/theme-card', text: 'Theme Card' }]; const themeDefaultBlocks: BlockCase[] = [ - { name: 'default/hero', text: 'Hero', previewGap: 'theme-default ships the placeholder edit.jsx ("Hero – Block Editor")' }, + { name: 'default/hero', text: 'Hero' }, { name: 'default/call-to-action', attributes: { heading: `Call to action ${runId}` }, text: `Call to action ${runId}` }, ]; @@ -91,8 +89,6 @@ for (const { host, blocks, skip } of blockCases()) { }); test(`${block.name} previews in the editor what the page shows`, async ({ admin, editor }) => { - test.fail(block.previewGap !== undefined, block.previewGap); - await admin.createNewPost({ title: `E2E preview ${block.name} ${runId}` }); await editor.insertBlock({ name: block.name, attributes: block.attributes });