From f556ce5b94e2dc9e879a56abbcdea6be07282437 Mon Sep 17 00:00:00 2001
From: Yangshun
+ + Post to this page + +
+
Reload document
diff --git a/playground/solid-pages/pages/link-behavior.server.ts b/playground/solid-pages/pages/link-behavior.server.ts
index cd01192f7..80332db27 100644
--- a/playground/solid-pages/pages/link-behavior.server.ts
+++ b/playground/solid-pages/pages/link-behavior.server.ts
@@ -20,3 +20,6 @@ export const loader = defineHandler
+ + Post to this page + +
+
Reload document
diff --git a/playground/svelte-pages/pages/link-behavior.server.ts b/playground/svelte-pages/pages/link-behavior.server.ts
index cd01192f7..80332db27 100644
--- a/playground/svelte-pages/pages/link-behavior.server.ts
+++ b/playground/svelte-pages/pages/link-behavior.server.ts
@@ -20,3 +20,6 @@ export const loader = defineHandler
+ Post to this page +
+Reload document
diff --git a/playground/vue-pages/pages/link-behavior.server.ts b/playground/vue-pages/pages/link-behavior.server.ts index cd01192f7..80332db27 100644 --- a/playground/vue-pages/pages/link-behavior.server.ts +++ b/playground/vue-pages/pages/link-behavior.server.ts @@ -20,3 +20,6 @@ export const loader = defineHandler+ Post to this page +
+Reload document
diff --git a/test/pages-client-contract.ts b/test/pages-client-contract.ts index 4ce110c29..4291cdd62 100644 --- a/test/pages-client-contract.ts +++ b/test/pages-client-contract.ts @@ -1,4 +1,4 @@ -import type { Page } from 'playwright'; +import type { Page, Request } from 'playwright'; import { beforeAll, describe, expect, it } from 'vite-plus/test'; type TestWindow = Window & { @@ -229,6 +229,51 @@ export function registerSharedClientTests({ } }); + it('Link marks links to the page that is loading', async ({ expect }) => { + const page = await newPage(); + // Holds the matching requests, keeping the visit in flight until release(). + let release = () => {}; + const hold = (matches: (request: Request) => boolean) => { + const released = new Promise