Unverified Commit ad3296b9 authored by Mitul Shah's avatar Mitul Shah Committed by GitHub

Update default error pages (#90469)

Redesign the https://github.com/vercel/next.js/pull/87988 error pages to
be more aligned with Next.js aesthetic, along with copy to be sharper.

| Client | Server |
|--------|--------|
| <img width="4992" height="2830" alt="CleanShot 2026-03-03 at 17 26
07@2x"
src="https://github.com/user-attachments/assets/f42bee3e-2ce8-44dc-9e26-79b81cf965d8"
/> | <img width="4992" height="2830" alt="CleanShot 2026-03-03 at 17 23
38@2x"
src="https://github.com/user-attachments/assets/19a596c6-6da7-4a42-9b53-16e3c2e6f867"
/> |
| <img width="4992" height="2830" alt="CleanShot 2026-03-03 at 17 25
22@2x"
src="https://github.com/user-attachments/assets/a3075d79-c76a-4fbf-af6e-d4a44f1434eb"
/> | <img width="4992" height="2830" alt="CleanShot 2026-03-03 at 17 24
17@2x"
src="https://github.com/user-attachments/assets/5811cc98-f8e4-4451-bf9c-501548292245"
/> |

---------
Co-authored-by: 's avatarJimmy Lai <laijimmy0@gmail.com>
Co-authored-by: 's avatarTim Neutkens <tim@timneutkens.nl>
parent 11c906a7
import React from 'react' import React from 'react'
import { errorStyles, errorThemeCss, ErrorIcon } from './error-styles' import { errorStyles, errorThemeCss, WarningIcon } from './error-styles'
// This is the static 500.html page for App Router apps. // This is the static 500.html page for App Router apps.
// Always a server error, rendered at build time. // Always a server error, rendered at build time.
...@@ -7,23 +7,20 @@ function AppError() { ...@@ -7,23 +7,20 @@ function AppError() {
return ( return (
<html id="__next_error__"> <html id="__next_error__">
<head> <head>
<title>500: This page failed to load</title> <title>500: This page couldn&#x2019;t load</title>
<style dangerouslySetInnerHTML={{ __html: errorThemeCss }} /> <style dangerouslySetInnerHTML={{ __html: errorThemeCss }} />
</head> </head>
<body> <body>
<div style={errorStyles.container}> <div style={errorStyles.container}>
<div style={errorStyles.card}> <div style={errorStyles.card}>
<ErrorIcon /> <WarningIcon />
<h1 style={errorStyles.title}>This page failed to load</h1> <h1 style={errorStyles.title}>This page couldn&#x2019;t load</h1>
<p style={errorStyles.message}> <p style={errorStyles.message}>
Something went wrong while loading this page. A server error occurred. Reload to try again.
</p> </p>
<p style={errorStyles.messageHint}> <form style={errorStyles.form}>
If this keeps happening, it may be a server issue.
</p>
<form>
<button type="submit" style={errorStyles.button}> <button type="submit" style={errorStyles.button}>
Reload page Reload
</button> </button>
</form> </form>
</div> </div>
......
...@@ -10,44 +10,46 @@ export const errorStyles = { ...@@ -10,44 +10,46 @@ export const errorStyles = {
justifyContent: 'center', justifyContent: 'center',
}, },
card: { card: {
maxWidth: '420px', marginTop: '-32px',
maxWidth: '325px',
padding: '32px 28px', padding: '32px 28px',
textAlign: 'left' as const, textAlign: 'left' as const,
}, },
icon: { icon: {
marginBottom: '16px', marginBottom: '24px',
}, },
title: { title: {
fontSize: '17px', fontSize: '24px',
fontWeight: 600, fontWeight: 500,
letterSpacing: '-0.01em', letterSpacing: '-0.02em',
margin: '0 0 8px 0', lineHeight: '32px',
margin: '0 0 12px 0',
color: 'var(--next-error-title)', color: 'var(--next-error-title)',
}, },
message: { message: {
fontSize: '14px', fontSize: '14px',
fontWeight: 400, fontWeight: 400,
lineHeight: 1.6, lineHeight: '21px',
margin: '0 0 6px 0', margin: '0 0 20px 0',
color: 'var(--next-error-message)', color: 'var(--next-error-message)',
}, },
messageHint: { form: {
fontSize: '13px', margin: 0,
fontWeight: 400,
lineHeight: 1.5,
margin: '0 0 20px 0',
color: 'var(--next-error-hint)',
}, },
buttonGroup: { buttonGroup: {
display: 'flex', display: 'flex',
gap: '12px', gap: '8px',
alignItems: 'center', alignItems: 'center',
}, },
button: { button: {
padding: '10px 20px', display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
height: '32px',
padding: '0 12px',
fontSize: '14px', fontSize: '14px',
fontWeight: 500, fontWeight: 500,
letterSpacing: '0.01em', lineHeight: '20px',
borderRadius: '6px', borderRadius: '6px',
cursor: 'pointer', cursor: 'pointer',
color: 'var(--next-error-btn-text)', color: 'var(--next-error-btn-text)',
...@@ -55,34 +57,34 @@ export const errorStyles = { ...@@ -55,34 +57,34 @@ export const errorStyles = {
border: 'var(--next-error-btn-border)', border: 'var(--next-error-btn-border)',
}, },
buttonSecondary: { buttonSecondary: {
padding: '10px 20px', display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
height: '32px',
padding: '0 12px',
fontSize: '14px', fontSize: '14px',
fontWeight: 500, fontWeight: 500,
letterSpacing: '0.01em', lineHeight: '20px',
borderRadius: '6px', borderRadius: '6px',
cursor: 'pointer', cursor: 'pointer',
color: 'var(--next-error-btn-secondary-text)', color: 'var(--next-error-btn-secondary-text)',
background: 'transparent', background: 'var(--next-error-btn-secondary-bg)',
border: 'none', border: 'var(--next-error-btn-secondary-border)',
}, },
digestContainer: { digestFooter: {
marginTop: '20px', position: 'fixed' as const,
paddingTop: '16px', bottom: '32px',
borderTop: 'var(--next-error-digest-border)', left: '0',
}, right: '0',
digest: { textAlign: 'center' as const,
fontFamily:
'ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace',
fontSize: '12px', fontSize: '12px',
lineHeight: '18px',
fontWeight: 400, fontWeight: 400,
margin: '0', margin: '0',
color: 'var(--next-error-digest)', color: 'var(--next-error-digest)',
}, },
digestCode: {
fontFamily:
'ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace',
fontSize: '11px',
color: 'var(--next-error-digest-code)',
userSelect: 'all' as const,
},
} as const } as const
export const errorThemeCss = ` export const errorThemeCss = `
...@@ -90,63 +92,46 @@ export const errorThemeCss = ` ...@@ -90,63 +92,46 @@ export const errorThemeCss = `
--next-error-bg: #fff; --next-error-bg: #fff;
--next-error-text: #171717; --next-error-text: #171717;
--next-error-title: #171717; --next-error-title: #171717;
--next-error-message: #666; --next-error-message: #171717;
--next-error-hint: #888; --next-error-digest: #666666;
--next-error-digest: #999; --next-error-btn-text: #fff;
--next-error-digest-code: #888; --next-error-btn-bg: #171717;
--next-error-digest-border: 1px solid rgba(0,0,0,0.06); --next-error-btn-border: none;
--next-error-btn-text: #171717; --next-error-btn-secondary-text: #171717;
--next-error-btn-bg: #fff; --next-error-btn-secondary-bg: transparent;
--next-error-btn-border: 1px solid #e5e5e5; --next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);
--next-error-btn-secondary-text: #666;
--next-error-icon-ring: #fecaca;
--next-error-icon-fill: #fef2f2;
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--next-error-bg: #0a0a0a; --next-error-bg: #0a0a0a;
--next-error-text: #ededed; --next-error-text: #ededed;
--next-error-title: #ededed; --next-error-title: #ededed;
--next-error-message: #a0a0a0; --next-error-message: #ededed;
--next-error-hint: #707070; --next-error-digest: #a0a0a0;
--next-error-digest: #606060; --next-error-btn-text: #0a0a0a;
--next-error-digest-code: #707070; --next-error-btn-bg: #ededed;
--next-error-digest-border: 1px solid rgba(255,255,255,0.08); --next-error-btn-border: none;
--next-error-btn-text: #ededed; --next-error-btn-secondary-text: #ededed;
--next-error-btn-bg: #1a1a1a; --next-error-btn-secondary-bg: transparent;
--next-error-btn-border: 1px solid #333; --next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);
--next-error-btn-secondary-text: #a0a0a0;
--next-error-icon-ring: #5c2121;
--next-error-icon-fill: #2a1618;
} }
} }
body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); } body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }
`.replace(/\n\s*/g, '') `.replace(/\n\s*/g, '')
export function ErrorIcon() { export function WarningIcon() {
return ( return (
<svg <svg
width="40" width="32"
height="40" height="32"
viewBox="0 0 40 40" viewBox="-0.2 -1.5 32 32"
fill="none" fill="none"
style={errorStyles.icon} style={errorStyles.icon}
> >
<circle
cx="20"
cy="20"
r="19"
stroke="var(--next-error-icon-ring)"
strokeWidth="2"
/>
<circle cx="20" cy="20" r="16" fill="var(--next-error-icon-fill)" />
<path <path
d="M20 12v9" d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z"
stroke="#dc2626" fill="var(--next-error-title)"
strokeWidth="2.5"
strokeLinecap="round"
/> />
<circle cx="20" cy="27" r="1.5" fill="#dc2626" />
</svg> </svg>
) )
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import React from 'react' import React from 'react'
import { HandleISRError } from '../handle-isr-error' import { HandleISRError } from '../handle-isr-error'
import { errorStyles, errorThemeCss, ErrorIcon } from './error-styles' import { errorStyles, errorThemeCss, WarningIcon } from './error-styles'
export type GlobalErrorComponent = React.ComponentType<{ export type GlobalErrorComponent = React.ComponentType<{
error: any error: any
...@@ -14,15 +14,9 @@ function DefaultGlobalError({ error }: { error: any }) { ...@@ -14,15 +14,9 @@ function DefaultGlobalError({ error }: { error: any }) {
const digest: string | undefined = error?.digest const digest: string | undefined = error?.digest
const isServerError = !!digest const isServerError = !!digest
// Server error: "This page failed to load"
// Client error: "This page crashed"
const title = isServerError ? 'This page failed to load' : 'This page crashed'
const message = isServerError const message = isServerError
? 'Something went wrong while loading this page.' ? 'A server error occurred. Reload to try again.'
: 'An error occurred while running this page.' : 'Reload to try again, or go back.'
const hint = isServerError
? 'If this keeps happening, it may be a server issue.'
: null
return ( return (
<html id="__next_error__"> <html id="__next_error__">
...@@ -33,19 +27,13 @@ function DefaultGlobalError({ error }: { error: any }) { ...@@ -33,19 +27,13 @@ function DefaultGlobalError({ error }: { error: any }) {
<HandleISRError error={error} /> <HandleISRError error={error} />
<div style={errorStyles.container}> <div style={errorStyles.container}>
<div style={errorStyles.card}> <div style={errorStyles.card}>
<ErrorIcon /> <WarningIcon />
<h1 style={errorStyles.title}>{title}</h1> <h1 style={errorStyles.title}>This page couldn&#x2019;t load</h1>
<p style={errorStyles.message}>{message}</p> <p style={errorStyles.message}>{message}</p>
{hint && <p style={errorStyles.messageHint}>{hint}</p>}
{!isServerError && (
<p style={errorStyles.messageHint}>
Reloading usually fixes this.
</p>
)}
<div style={errorStyles.buttonGroup}> <div style={errorStyles.buttonGroup}>
<form> <form style={errorStyles.form}>
<button type="submit" style={errorStyles.button}> <button type="submit" style={errorStyles.button}>
Reload page Reload
</button> </button>
</form> </form>
{!isServerError && ( {!isServerError && (
...@@ -60,20 +48,13 @@ function DefaultGlobalError({ error }: { error: any }) { ...@@ -60,20 +48,13 @@ function DefaultGlobalError({ error }: { error: any }) {
} }
}} }}
> >
Go back Back
</button> </button>
)} )}
</div> </div>
{digest && (
<div style={errorStyles.digestContainer}>
<p style={errorStyles.digest}>
Error reference:{' '}
<code style={errorStyles.digestCode}>{digest}</code>
</p>
</div>
)}
</div> </div>
</div> </div>
{digest && <p style={errorStyles.digestFooter}>ERROR {digest}</p>}
</body> </body>
</html> </html>
) )
......
...@@ -40,7 +40,7 @@ describe('serialize-circular-error', () => { ...@@ -40,7 +40,7 @@ describe('serialize-circular-error', () => {
`) `)
const bodyText = await browser.elementByCss('body').text() const bodyText = await browser.elementByCss('body').text()
expect(bodyText).toContain('This page crashed') expect(bodyText).toContain('This page couldn\u2019t load')
const output = next.cliOutput const output = next.cliOutput
expect(output).toContain( expect(output).toContain(
......
...@@ -31,29 +31,25 @@ describe('app dir - default error page UI', () => { ...@@ -31,29 +31,25 @@ describe('app dir - default error page UI', () => {
// In production mode, verify the client error page UI elements // In production mode, verify the client error page UI elements
// Check that the SVG icon is present (40x40 size) // Check that the SVG icon is present (32x32 size)
const svgIcon = await browser.elementByCss('svg') const svgIcon = await browser.elementByCss('svg')
expect(await svgIcon.getAttribute('width')).toBe('40') expect(await svgIcon.getAttribute('width')).toBe('32')
expect(await svgIcon.getAttribute('height')).toBe('40') expect(await svgIcon.getAttribute('height')).toBe('32')
// Check the error title - client errors show "This page crashed" // Check the error title
const title = await browser.elementByCss('h1') const title = await browser.elementByCss('h1')
expect(await title.text()).toBe('This page crashed') expect(await title.text()).toBe('This page couldn\u2019t load')
// Check the error message - client errors show "An error occurred while running this page." // Check the error message - client errors show "Reload to try again, or go back."
const message = await browser.elementByCss('p') const message = await browser.elementByCss('p')
expect(await message.text()).toContain('An error occurred while running') expect(await message.text()).toContain('Reload to try again, or go back')
// Check the "Reload page" button exists // Check the "Reload" button exists
const buttons = await browser.elementsByCss('button') const buttons = await browser.elementsByCss('button')
expect(await buttons[0].innerText()).toBe('Reload page') expect(await buttons[0].innerText()).toBe('Reload')
// Check "Go back" button exists for client errors // Check "Back" button exists for client errors
expect(await buttons[1].innerText()).toBe('Go back') expect(await buttons[1].innerText()).toBe('Back')
// Check the hint text about reloading
const html = await browser.eval('document.documentElement.innerHTML')
expect(html).toContain('Reloading usually fixes this')
}) })
it('should reload the page when Reload page button is clicked', async () => { it('should reload the page when Reload page button is clicked', async () => {
...@@ -102,11 +98,11 @@ describe('app dir - default error page UI', () => { ...@@ -102,11 +98,11 @@ describe('app dir - default error page UI', () => {
// In light mode: #171717 = rgb(23, 23, 23) // In light mode: #171717 = rgb(23, 23, 23)
expect(titleColor).toContain('23') expect(titleColor).toContain('23')
// Check that the button has neutral styling (white background with border) // Check that the primary button has dark background
const button = await browser.elementByCss('button') const button = await browser.elementByCss('button')
const buttonBg = await button.getComputedCss('background-color') const buttonBg = await button.getComputedCss('background-color')
// White = rgb(255, 255, 255) // Dark = rgb(23, 23, 23) (#171717)
expect(buttonBg).toContain('255') expect(buttonBg).toContain('23')
}) })
it('should display server error page with Error reference', async () => { it('should display server error page with Error reference', async () => {
...@@ -133,14 +129,14 @@ describe('app dir - default error page UI', () => { ...@@ -133,14 +129,14 @@ describe('app dir - default error page UI', () => {
// In production mode, verify the server error page // In production mode, verify the server error page
const html = await browser.eval('document.documentElement.innerHTML') const html = await browser.eval('document.documentElement.innerHTML')
// Server errors show "This page failed to load" // Server errors show "This page couldn\u2019t load"
expect(html).toContain('This page failed to load') expect(html).toContain('This page couldn\u2019t load')
// Server errors show "Error reference:" with digest // Server errors show "A server error occurred"
expect(html).toContain('Error reference:') expect(html).toContain('A server error occurred')
// Server errors show hint about server issue // Server errors show "ERROR" with digest
expect(html).toContain('it may be a server issue') expect(html).toMatch(/ERROR \w+/)
}) })
it('should have left-aligned text in error page', async () => { it('should have left-aligned text in error page', async () => {
......
...@@ -190,7 +190,7 @@ describe('app-dir - errors', () => { ...@@ -190,7 +190,7 @@ describe('app-dir - errors', () => {
} else { } else {
expect( expect(
await browser.waitForElementByCss('body').elementByCss('h1').text() await browser.waitForElementByCss('body').elementByCss('h1').text()
).toBe('This page crashed') ).toBe('This page couldn\u2019t load')
} }
expect(pageErrors).toEqual([ expect(pageErrors).toEqual([
...@@ -227,10 +227,10 @@ describe('app-dir - errors', () => { ...@@ -227,10 +227,10 @@ describe('app-dir - errors', () => {
} else { } else {
expect( expect(
await browser.waitForElementByCss('body').elementByCss('h1').text() await browser.waitForElementByCss('body').elementByCss('h1').text()
).toBe('This page failed to load') ).toBe('This page couldn\u2019t load')
// Check digest is displayed in error reference // Check digest is displayed
const bodyText = await browser.waitForElementByCss('body').text() const bodyText = await browser.waitForElementByCss('body').text()
expect(bodyText).toMatch(/Error reference:\s*\w+/) expect(bodyText).toMatch(/ERROR \w+/)
} }
expect(pageErrors).toEqual([ expect(pageErrors).toEqual([
......
...@@ -32,9 +32,9 @@ describe('app dir - global-error - error-in-global-error', () => { ...@@ -32,9 +32,9 @@ describe('app dir - global-error - error-in-global-error', () => {
it('should render fallback UI when error occurs in global-error', async () => { it('should render fallback UI when error occurs in global-error', async () => {
const browser = await next.browser('/?error-in-global-error=1') const browser = await next.browser('/?error-in-global-error=1')
// When the custom global-error throws, it falls back to the default global-error // When the custom global-error throws, it falls back to the default global-error
// Client errors show "This page crashed" // Client errors show "This page couldn\u2019t load"
const title = await browser.elementByCss('h1').text() const title = await browser.elementByCss('h1').text()
expect(title).toBe('This page crashed') expect(title).toBe('This page couldn\u2019t load')
if (isNextDev) { if (isNextDev) {
await waitForRedbox(browser) await waitForRedbox(browser)
......
...@@ -36,7 +36,7 @@ describe('revalidateTag-rsc', () => { ...@@ -36,7 +36,7 @@ describe('revalidateTag-rsc', () => {
await retry(async () => { await retry(async () => {
expect( expect(
await browser.eval('document.documentElement.innerHTML') await browser.eval('document.documentElement.innerHTML')
).toContain('This page failed to load') ).toContain('This page couldn\u2019t load')
}) })
} }
......
...@@ -29,9 +29,9 @@ describe('next-link', () => { ...@@ -29,9 +29,9 @@ describe('next-link', () => {
} }
`) `)
} }
// Client errors show "This page crashed" // Client errors show "This page couldn\u2019t load"
expect(await browser.elementByCss('body').text()).toContain( expect(await browser.elementByCss('body').text()).toContain(
'This page crashed' 'This page couldn\u2019t load'
) )
}) })
...@@ -54,9 +54,9 @@ describe('next-link', () => { ...@@ -54,9 +54,9 @@ describe('next-link', () => {
], ],
} }
`) `)
// Client errors show "This page crashed" // Client errors show "This page couldn\u2019t load"
expect(await browser.elementByCss('body').text()).toContain( expect(await browser.elementByCss('body').text()).toContain(
'This page crashed' 'This page couldn\u2019t load'
) )
} else { } else {
expect(await browser.elementByCss('body').text()).toMatchInlineSnapshot( expect(await browser.elementByCss('body').text()).toMatchInlineSnapshot(
......
...@@ -11,8 +11,8 @@ describe('500-page app-router-only', () => { ...@@ -11,8 +11,8 @@ describe('500-page app-router-only', () => {
it('should render app router 500 page when route error', async () => { it('should render app router 500 page when route error', async () => {
const $ = await next.render$('/route-error') const $ = await next.render$('/route-error')
expect($('html').attr('id')).toBe('__next_error__') expect($('html').attr('id')).toBe('__next_error__')
// Server errors show "This page failed to load" // Server errors show "This page couldn\u2019t load"
expect($('body').text()).toContain('This page failed to load') expect($('body').text()).toContain('This page couldn\u2019t load')
}) })
} }
...@@ -24,8 +24,8 @@ describe('500-page app-router-only', () => { ...@@ -24,8 +24,8 @@ describe('500-page app-router-only', () => {
) )
// Not use pages router to generate 500.html // Not use pages router to generate 500.html
expect(html).toContain('__next_error__') expect(html).toContain('__next_error__')
// Server errors show "This page failed to load" // Server errors show "This page couldn\u2019t load"
expect(html).toContain('This page failed to load') expect(html).toContain('This page couldn\u2019t load')
// global-error is not used in app router 500.html // global-error is not used in app router 500.html
expect(html).not.toContain('app-router-global-error') expect(html).not.toContain('app-router-global-error')
}) })
......
...@@ -32,8 +32,8 @@ describe('graceful-degrade - non bot', () => { ...@@ -32,8 +32,8 @@ describe('graceful-degrade - non bot', () => {
expect(await body.getAttribute('class')).not.toBe('body-cls') expect(await body.getAttribute('class')).not.toBe('body-cls')
const bodyText = await body.text() const bodyText = await body.text()
// Client errors show "This page crashed" // Client errors show "This page couldn\u2019t load"
expect(bodyText).toMatch(/This page crashed/) expect(bodyText).toMatch(/This page couldn\u2019t load/)
}) })
it('should show error boundary when browser errors when error boundary is defined', async () => { it('should show error boundary when browser errors when error boundary is defined', async () => {
......
...@@ -31,7 +31,7 @@ describe('graceful-degrade', () => { ...@@ -31,7 +31,7 @@ describe('graceful-degrade', () => {
// Do not contain the global error boundary text // Do not contain the global error boundary text
const bodyText = await originBody.text() const bodyText = await originBody.text()
expect(bodyText).not.toMatch(/This page crashed/) expect(bodyText).not.toMatch(/This page couldn\u2019t load/)
}) })
it('should preserve the ssr html when browser errors for bot', async () => { it('should preserve the ssr html when browser errors for bot', async () => {
...@@ -48,7 +48,7 @@ describe('graceful-degrade', () => { ...@@ -48,7 +48,7 @@ describe('graceful-degrade', () => {
expect(errors).toMatch(/Error: boom/) expect(errors).toMatch(/Error: boom/)
const bodyText = await browser.elementByCss('body').text() const bodyText = await browser.elementByCss('body').text()
expect(bodyText).not.toMatch(/This page crashed/) expect(bodyText).not.toMatch(/This page couldn\u2019t load/)
expect(bodyText).toMatch(/fine/) expect(bodyText).toMatch(/fine/)
}) })
}) })
...@@ -41,8 +41,8 @@ describe('chunk-load-failure', () => { ...@@ -41,8 +41,8 @@ describe('chunk-load-failure', () => {
await retry(async () => { await retry(async () => {
const body = await browser.elementByCss('body') const body = await browser.elementByCss('body')
// Client errors show "This page crashed" // Client errors show "This page couldn\u2019t load"
expect(await body.text()).toMatch(/This page crashed/) expect(await body.text()).toMatch(/This page couldn\u2019t load/)
}) })
expect(pageError).toBeDefined() expect(pageError).toBeDefined()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment