From a233f53f28fcb4c3ea63d2faf156fba09a18456c Mon Sep 17 00:00:00 2001 From: Tee Ming Date: Wed, 25 Sep 2024 23:33:39 +0800 Subject: [PATCH] fix: allow native form submission for `
` and ` +
+ +
+ + diff --git a/packages/kit/test/apps/basics/test/cross-platform/client.test.js b/packages/kit/test/apps/basics/test/cross-platform/client.test.js index 6d367cf414c6..b8f485fc228d 100644 --- a/packages/kit/test/apps/basics/test/cross-platform/client.test.js +++ b/packages/kit/test/apps/basics/test/cross-platform/client.test.js @@ -769,6 +769,34 @@ test.describe('Routing', () => { expect(await page.textContent('h3')).toBe('bar'); }); + test('responds to
submission with new tab', async ({ page }) => { + await page.goto('/routing/form-target-blank'); + + let tabs = page.context().pages(); + expect(tabs.length === 1); + + const new_tab = page.waitForEvent('popup', { timeout: 1000 }); + await page.locator('button', { hasText: 'Inside form' }).click(); + await new_tab; + + tabs = page.context().pages(); + expect(tabs.length > 1); + }); + + test('responds to