@@ -1479,10 +1479,15 @@ implementations.forEach((implementation) => {
14791479 throw redirect("/render-redirect/redirected");
14801480 }
14811481
1482+ if (id === "external") {
1483+ throw redirect("https://example.com/")
1484+ }
1485+
14821486 return (
14831487 <>
14841488 <h1>{id || "home"}</h1>
14851489 <Link to="/render-redirect/redirect">Redirect</Link>
1490+ <Link to="/render-redirect/external">External</Link>
14861491 </>
14871492 )
14881493 }
@@ -1506,10 +1511,15 @@ implementations.forEach((implementation) => {
15061511 throw redirect("/render-redirect/lazy/redirected");
15071512 }
15081513
1514+ if (id === "external") {
1515+ throw redirect("https://example.com/")
1516+ }
1517+
15091518 return (
15101519 <>
15111520 <h1>{id || "home"}</h1>
15121521 <Link to="/render-redirect/lazy/redirect">Redirect</Link>
1522+ <Link to="/render-redirect/external">External</Link>
15131523 </>
15141524 );
15151525 }
@@ -1798,24 +1808,44 @@ implementations.forEach((implementation) => {
17981808 } ) => {
17991809 await page . goto ( `http://localhost:${ port } /render-redirect` ) ;
18001810 await expect ( page . getByText ( "home" ) ) . toBeAttached ( ) ;
1801- await page . click ( "a" ) ;
1811+ await page . getByText ( "Redirect" ) . click ( ) ;
18021812 await page . waitForURL (
18031813 `http://localhost:${ port } /render-redirect/redirected` ,
18041814 ) ;
18051815 await expect ( page . getByText ( "redirected" ) ) . toBeAttached ( ) ;
18061816 } ) ;
18071817
1818+ test ( "Suppport throwing external redirect Response from render" , async ( {
1819+ page,
1820+ } ) => {
1821+ await page . goto ( `http://localhost:${ port } /render-redirect` ) ;
1822+ await expect ( page . getByText ( "home" ) ) . toBeAttached ( ) ;
1823+ await page . getByText ( "External" ) . click ( ) ;
1824+ await page . waitForURL ( `https://example.com/` ) ;
1825+ await expect ( page . getByText ( "Example Domain" ) ) . toBeAttached ( ) ;
1826+ } ) ;
1827+
18081828 test ( "Suppport throwing redirect Response from suspended render" , async ( {
18091829 page,
18101830 } ) => {
18111831 await page . goto ( `http://localhost:${ port } /render-redirect/lazy` ) ;
18121832 await expect ( page . getByText ( "home" ) ) . toBeAttached ( ) ;
1813- await page . click ( "a" ) ;
1833+ await page . getByText ( "Redirect" ) . click ( ) ;
18141834 await page . waitForURL (
18151835 `http://localhost:${ port } /render-redirect/lazy/redirected` ,
18161836 ) ;
18171837 await expect ( page . getByText ( "redirected" ) ) . toBeAttached ( ) ;
18181838 } ) ;
1839+
1840+ test ( "Suppport throwing external redirect Response from suspended render" , async ( {
1841+ page,
1842+ } ) => {
1843+ await page . goto ( `http://localhost:${ port } /render-redirect/lazy` ) ;
1844+ await expect ( page . getByText ( "home" ) ) . toBeAttached ( ) ;
1845+ await page . getByText ( "External" ) . click ( ) ;
1846+ await page . waitForURL ( `https://example.com/` ) ;
1847+ await expect ( page . getByText ( "Example Domain" ) ) . toBeAttached ( ) ;
1848+ } ) ;
18191849 } ) ;
18201850
18211851 test . describe ( "Server Actions" , ( ) => {
0 commit comments