-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
514 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
test/e2e/app-dir/app-client-cache/app/without-loading/[id]/page.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Link from 'next/link' | ||
|
||
export default async function Page({ searchParams: { timeout } }) { | ||
const randomNumber = await new Promise((resolve) => { | ||
setTimeout( | ||
() => { | ||
resolve(Math.random()) | ||
}, | ||
timeout !== undefined ? Number.parseInt(timeout, 10) : 0 | ||
) | ||
}) | ||
|
||
return ( | ||
<> | ||
<div> | ||
<Link href="/without-loading">Back to Home</Link> | ||
</div> | ||
<div id="random-number">{randomNumber}</div> | ||
</> | ||
) | ||
} |
36 changes: 36 additions & 0 deletions
36
test/e2e/app-dir/app-client-cache/app/without-loading/page.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import Link from 'next/link' | ||
|
||
export default function Page() { | ||
return ( | ||
<> | ||
<div> | ||
<Link href="/without-loading/0?timeout=0" prefetch={true}> | ||
To Random Number - prefetch: true | ||
</Link> | ||
</div> | ||
<div> | ||
<Link href="/without-loading/0?timeout=1000" prefetch={true}> | ||
To Random Number - prefetch: true, slow | ||
</Link> | ||
</div> | ||
<div> | ||
<Link href="/without-loading/1">To Random Number - prefetch: auto</Link> | ||
</div> | ||
<div> | ||
<Link href="/without-loading/2" prefetch={false}> | ||
To Random Number 2 - prefetch: false | ||
</Link> | ||
</div> | ||
<div> | ||
<Link href="/without-loading/2?timeout=1000" prefetch={false}> | ||
To Random Number 2 - prefetch: false, slow | ||
</Link> | ||
</div> | ||
<div> | ||
<Link href="/without-loading/1?timeout=1000"> | ||
To Random Number - prefetch: auto, slow | ||
</Link> | ||
</div> | ||
</> | ||
) | ||
} |
Oops, something went wrong.