From 01e0b5db413667336b011cdef7b4589ef3c563ee Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 1 Jul 2026 09:06:57 +0000 Subject: [PATCH] host: block-editor card-type only renders direct children, so the dropdown was empty. A full-page load hid it (the browser's HTML parser hoists mis-nested options out of the select), but on a BOOSTED nav the DOM is built programmatically (no parser error-recovery), so the span stayed and the dropdown was empty. The card types are a fixed set — inline the options directly as — a wrapper (e.g. a span to splice + ;; a dynamic list) leaves the dropdown empty when the DOM is built programmatically + ;; on a boosted swap (a full-page HTML parse would hoist them out, masking it). The + ;; card types are a fixed set, so inline them. + (select :name "ctype" + (option :value "card-heading" "heading") + (option :value "card-text" "text") + (option :value "card-quote" "quote") + (option :value "card-code" "code") + (option :value "card-callout" "callout")) " " (input :name "text" :placeholder "text…" :style "width:50%") " " (button :type "submit" "+ add block")))))))) diff --git a/lib/host/playwright/boost-nav.spec.js b/lib/host/playwright/boost-nav.spec.js index b0a5b54d..c4daf196 100644 --- a/lib/host/playwright/boost-nav.spec.js +++ b/lib/host/playwright/boost-nav.spec.js @@ -88,4 +88,20 @@ test.describe('boosted navigation (browser-only)', () => { await expect(page.locator('body')).toContainText('Posts', { timeout: 12000 }); expect(new URL(page.url()).pathname).toBe('/'); }); + + test('LOGGED IN: the block-editor card-type dropdown populates after a boosted nav to edit', async ({ page }) => { + test.setTimeout(90000); + await login(page); + await page.goto(BASE + '/'); + await waitReady(page); + await page.locator('a[href="/compose-demo/"]').first().click(); + await expect(page.locator('body')).toContainText('composition object', { timeout: 15000 }); + await page.locator('a[href="/compose-demo/edit"]').last().click(); + await expect(page.locator('body')).toContainText('Edit:', { timeout: 15000 }); + // the ctype