Unverified Commit d8a58b5a authored by Steven's avatar Steven Committed by GitHub

chore(test): fix typo occured => occurred (#63287)

Closes https://github.com/vercel/next.js/pull/63276

Closes NEXT-2818
parent 6556a342
...@@ -6,7 +6,7 @@ const Page = () => { ...@@ -6,7 +6,7 @@ const Page = () => {
<div> <div>
<h1>Test onError</h1> <h1>Test onError</h1>
<p> <p>
If error occured while loading image, native onError should be called. If error occurred while loading image, native onError should be called.
</p> </p>
<ImageWithMessage id="1" src="/test.png" layout="fill" /> <ImageWithMessage id="1" src="/test.png" layout="fill" />
...@@ -17,7 +17,7 @@ const Page = () => { ...@@ -17,7 +17,7 @@ const Page = () => {
} }
function ImageWithMessage({ id, ...props }) { function ImageWithMessage({ id, ...props }) {
const [msg, setMsg] = useState('no error occured') const [msg, setMsg] = useState('no error occurred')
const style = const style =
props.layout === 'fill' props.layout === 'fill'
? { position: 'relative', width: '64px', height: '64px' } ? { position: 'relative', width: '64px', height: '64px' }
...@@ -29,7 +29,7 @@ function ImageWithMessage({ id, ...props }) { ...@@ -29,7 +29,7 @@ function ImageWithMessage({ id, ...props }) {
<Image <Image
id={`img${id}`} id={`img${id}`}
onError={(e) => { onError={(e) => {
const msg = `error occured while loading ${e.target.id}` const msg = `error occurred while loading ${e.target.id}`
setMsg(msg) setMsg(msg)
}} }}
{...props} {...props}
......
...@@ -398,7 +398,7 @@ function runTests(mode) { ...@@ -398,7 +398,7 @@ function runTests(mode) {
) )
}) })
it('should callback native onError when error occured while loading image', async () => { it('should callback native onError when error occurred while loading image', async () => {
let browser = await webdriver(appPort, '/on-error') let browser = await webdriver(appPort, '/on-error')
await check( await check(
...@@ -412,11 +412,11 @@ function runTests(mode) { ...@@ -412,11 +412,11 @@ function runTests(mode) {
) )
await check( await check(
() => browser.eval(`document.getElementById("msg1").textContent`), () => browser.eval(`document.getElementById("msg1").textContent`),
'no error occured' 'no error occurred'
) )
await check( await check(
() => browser.eval(`document.getElementById("msg2").textContent`), () => browser.eval(`document.getElementById("msg2").textContent`),
'error occured while loading img2' 'error occurred while loading img2'
) )
}) })
......
...@@ -9,7 +9,7 @@ const Page = () => { ...@@ -9,7 +9,7 @@ const Page = () => {
<div> <div>
<h1>Test onError</h1> <h1>Test onError</h1>
<p> <p>
If error occured while loading image, native onError should be called. If error occurred while loading image, native onError should be called.
</p> </p>
<button id="toggle" onClick={() => setClicked(!clicked)}> <button id="toggle" onClick={() => setClicked(!clicked)}>
Toggle Toggle
...@@ -28,7 +28,7 @@ const Page = () => { ...@@ -28,7 +28,7 @@ const Page = () => {
} }
function ImageWithMessage({ id, ...props }) { function ImageWithMessage({ id, ...props }) {
const [msg, setMsg] = useState(`no error occured for img${id}`) const [msg, setMsg] = useState(`no error occurred for img${id}`)
return ( return (
<> <>
...@@ -36,7 +36,7 @@ function ImageWithMessage({ id, ...props }) { ...@@ -36,7 +36,7 @@ function ImageWithMessage({ id, ...props }) {
<Image <Image
id={`img${id}`} id={`img${id}`}
onError={(e) => { onError={(e) => {
setMsg(`error occured while loading ${e.target.id}`) setMsg(`error occurred while loading ${e.target.id}`)
}} }}
{...props} {...props}
/> />
......
...@@ -460,14 +460,14 @@ function runTests(mode) { ...@@ -460,14 +460,14 @@ function runTests(mode) {
) )
}) })
it('should callback native onError when error occured while loading image', async () => { it('should callback native onError when error occurred while loading image', async () => {
let browser = await webdriver(appPort, '/on-error') let browser = await webdriver(appPort, '/on-error')
await browser.eval( await browser.eval(
`document.getElementById("img1").scrollIntoView({behavior: "smooth"})` `document.getElementById("img1").scrollIntoView({behavior: "smooth"})`
) )
await check( await check(
() => browser.eval(`document.getElementById("msg1").textContent`), () => browser.eval(`document.getElementById("msg1").textContent`),
'no error occured for img1' 'no error occurred for img1'
) )
await check( await check(
() => browser.eval(`document.getElementById("img1").style.color`), () => browser.eval(`document.getElementById("img1").style.color`),
...@@ -478,7 +478,7 @@ function runTests(mode) { ...@@ -478,7 +478,7 @@ function runTests(mode) {
) )
await check( await check(
() => browser.eval(`document.getElementById("msg2").textContent`), () => browser.eval(`document.getElementById("msg2").textContent`),
'no error occured for img2' 'no error occurred for img2'
) )
await check( await check(
() => browser.eval(`document.getElementById("img2").style.color`), () => browser.eval(`document.getElementById("img2").style.color`),
...@@ -487,7 +487,7 @@ function runTests(mode) { ...@@ -487,7 +487,7 @@ function runTests(mode) {
await browser.eval(`document.getElementById("toggle").click()`) await browser.eval(`document.getElementById("toggle").click()`)
await check( await check(
() => browser.eval(`document.getElementById("msg2").textContent`), () => browser.eval(`document.getElementById("msg2").textContent`),
'error occured while loading img2' 'error occurred while loading img2'
) )
await check( await check(
() => browser.eval(`document.getElementById("img2").style.color`), () => browser.eval(`document.getElementById("img2").style.color`),
......
...@@ -8,7 +8,7 @@ const Page = () => { ...@@ -8,7 +8,7 @@ const Page = () => {
<div> <div>
<h1>Test onError</h1> <h1>Test onError</h1>
<p> <p>
If error occured while loading image, native onError should be called. If error occurred while loading image, native onError should be called.
</p> </p>
<button id="toggle" onClick={() => setClicked(!clicked)}> <button id="toggle" onClick={() => setClicked(!clicked)}>
Toggle Toggle
...@@ -27,7 +27,7 @@ const Page = () => { ...@@ -27,7 +27,7 @@ const Page = () => {
} }
function ImageWithMessage({ id, ...props }) { function ImageWithMessage({ id, ...props }) {
const [msg, setMsg] = useState(`no error occured for img${id}`) const [msg, setMsg] = useState(`no error occurred for img${id}`)
return ( return (
<> <>
...@@ -35,7 +35,7 @@ function ImageWithMessage({ id, ...props }) { ...@@ -35,7 +35,7 @@ function ImageWithMessage({ id, ...props }) {
<Image <Image
id={`img${id}`} id={`img${id}`}
onError={(e) => { onError={(e) => {
setMsg(`error occured while loading ${e.target.id}`) setMsg(`error occurred while loading ${e.target.id}`)
}} }}
{...props} {...props}
/> />
......
...@@ -461,14 +461,14 @@ function runTests(mode) { ...@@ -461,14 +461,14 @@ function runTests(mode) {
) )
}) })
it('should callback native onError when error occured while loading image', async () => { it('should callback native onError when error occurred while loading image', async () => {
let browser = await webdriver(appPort, '/on-error') let browser = await webdriver(appPort, '/on-error')
await browser.eval( await browser.eval(
`document.getElementById("img1").scrollIntoView({behavior: "smooth"})` `document.getElementById("img1").scrollIntoView({behavior: "smooth"})`
) )
await check( await check(
() => browser.eval(`document.getElementById("msg1").textContent`), () => browser.eval(`document.getElementById("msg1").textContent`),
'no error occured for img1' 'no error occurred for img1'
) )
await check( await check(
() => browser.eval(`document.getElementById("img1").style.color`), () => browser.eval(`document.getElementById("img1").style.color`),
...@@ -479,7 +479,7 @@ function runTests(mode) { ...@@ -479,7 +479,7 @@ function runTests(mode) {
) )
await check( await check(
() => browser.eval(`document.getElementById("msg2").textContent`), () => browser.eval(`document.getElementById("msg2").textContent`),
'no error occured for img2' 'no error occurred for img2'
) )
await check( await check(
() => browser.eval(`document.getElementById("img2").style.color`), () => browser.eval(`document.getElementById("img2").style.color`),
...@@ -488,7 +488,7 @@ function runTests(mode) { ...@@ -488,7 +488,7 @@ function runTests(mode) {
await browser.eval(`document.getElementById("toggle").click()`) await browser.eval(`document.getElementById("toggle").click()`)
await check( await check(
() => browser.eval(`document.getElementById("msg2").textContent`), () => browser.eval(`document.getElementById("msg2").textContent`),
'error occured while loading img2' 'error occurred while loading img2'
) )
await check( await check(
() => browser.eval(`document.getElementById("img2").style.color`), () => browser.eval(`document.getElementById("img2").style.color`),
......
...@@ -13585,7 +13585,7 @@ ...@@ -13585,7 +13585,7 @@
"Image Component Tests dev mode should apply filter style after image loads", "Image Component Tests dev mode should apply filter style after image loads",
"Image Component Tests dev mode should apply style inheritance for img elements but not wrapper elements", "Image Component Tests dev mode should apply style inheritance for img elements but not wrapper elements",
"Image Component Tests dev mode should be valid HTML", "Image Component Tests dev mode should be valid HTML",
"Image Component Tests dev mode should callback native onError when error occured while loading image", "Image Component Tests dev mode should callback native onError when error occurred while loading image",
"Image Component Tests dev mode should callback native onLoad in most cases", "Image Component Tests dev mode should callback native onLoad in most cases",
"Image Component Tests dev mode should callback onLoadingComplete when image is fully loaded", "Image Component Tests dev mode should callback onLoadingComplete when image is fully loaded",
"Image Component Tests dev mode should correctly ignore prose styles", "Image Component Tests dev mode should correctly ignore prose styles",
...@@ -13629,7 +13629,7 @@ ...@@ -13629,7 +13629,7 @@
"Image Component Tests production mode should apply filter style after image loads", "Image Component Tests production mode should apply filter style after image loads",
"Image Component Tests production mode should apply style inheritance for img elements but not wrapper elements", "Image Component Tests production mode should apply style inheritance for img elements but not wrapper elements",
"Image Component Tests production mode should be valid HTML", "Image Component Tests production mode should be valid HTML",
"Image Component Tests production mode should callback native onError when error occured while loading image", "Image Component Tests production mode should callback native onError when error occurred while loading image",
"Image Component Tests production mode should callback native onLoad in most cases", "Image Component Tests production mode should callback native onLoad in most cases",
"Image Component Tests production mode should callback onLoadingComplete when image is fully loaded", "Image Component Tests production mode should callback onLoadingComplete when image is fully loaded",
"Image Component Tests production mode should correctly ignore prose styles", "Image Component Tests production mode should correctly ignore prose styles",
...@@ -13805,7 +13805,7 @@ ...@@ -13805,7 +13805,7 @@
"Image Component Default Tests dev mode should apply style inheritance for img elements but not wrapper elements", "Image Component Default Tests dev mode should apply style inheritance for img elements but not wrapper elements",
"Image Component Default Tests dev mode should be valid HTML", "Image Component Default Tests dev mode should be valid HTML",
"Image Component Default Tests dev mode should callback native onError even when error before hydration", "Image Component Default Tests dev mode should callback native onError even when error before hydration",
"Image Component Default Tests dev mode should callback native onError when error occured while loading image", "Image Component Default Tests dev mode should callback native onError when error occurred while loading image",
"Image Component Default Tests dev mode should callback native onLoad with sythetic event", "Image Component Default Tests dev mode should callback native onLoad with sythetic event",
"Image Component Default Tests dev mode should callback onLoadingComplete when image is fully loaded", "Image Component Default Tests dev mode should callback onLoadingComplete when image is fully loaded",
"Image Component Default Tests dev mode should correctly ignore prose styles", "Image Component Default Tests dev mode should correctly ignore prose styles",
...@@ -13861,7 +13861,7 @@ ...@@ -13861,7 +13861,7 @@
"Image Component Default Tests production mode should apply style inheritance for img elements but not wrapper elements", "Image Component Default Tests production mode should apply style inheritance for img elements but not wrapper elements",
"Image Component Default Tests production mode should be valid HTML", "Image Component Default Tests production mode should be valid HTML",
"Image Component Default Tests production mode should callback native onError even when error before hydration", "Image Component Default Tests production mode should callback native onError even when error before hydration",
"Image Component Default Tests production mode should callback native onError when error occured while loading image", "Image Component Default Tests production mode should callback native onError when error occurred while loading image",
"Image Component Default Tests production mode should callback native onLoad with sythetic event", "Image Component Default Tests production mode should callback native onLoad with sythetic event",
"Image Component Default Tests production mode should callback onLoadingComplete when image is fully loaded", "Image Component Default Tests production mode should callback onLoadingComplete when image is fully loaded",
"Image Component Default Tests production mode should correctly ignore prose styles", "Image Component Default Tests production mode should correctly ignore prose styles",
...@@ -14020,7 +14020,7 @@ ...@@ -14020,7 +14020,7 @@
"Image Component Default Tests dev mode should apply style inheritance for img elements but not wrapper elements", "Image Component Default Tests dev mode should apply style inheritance for img elements but not wrapper elements",
"Image Component Default Tests dev mode should be valid HTML", "Image Component Default Tests dev mode should be valid HTML",
"Image Component Default Tests dev mode should callback native onError even when error before hydration", "Image Component Default Tests dev mode should callback native onError even when error before hydration",
"Image Component Default Tests dev mode should callback native onError when error occured while loading image", "Image Component Default Tests dev mode should callback native onError when error occurred while loading image",
"Image Component Default Tests dev mode should callback native onLoad with sythetic event", "Image Component Default Tests dev mode should callback native onLoad with sythetic event",
"Image Component Default Tests dev mode should callback onLoadingComplete when image is fully loaded", "Image Component Default Tests dev mode should callback onLoadingComplete when image is fully loaded",
"Image Component Default Tests dev mode should correctly ignore prose styles", "Image Component Default Tests dev mode should correctly ignore prose styles",
...@@ -14076,7 +14076,7 @@ ...@@ -14076,7 +14076,7 @@
"Image Component Default Tests production mode should apply style inheritance for img elements but not wrapper elements", "Image Component Default Tests production mode should apply style inheritance for img elements but not wrapper elements",
"Image Component Default Tests production mode should be valid HTML", "Image Component Default Tests production mode should be valid HTML",
"Image Component Default Tests production mode should callback native onError even when error before hydration", "Image Component Default Tests production mode should callback native onError even when error before hydration",
"Image Component Default Tests production mode should callback native onError when error occured while loading image", "Image Component Default Tests production mode should callback native onError when error occurred while loading image",
"Image Component Default Tests production mode should callback native onLoad with sythetic event", "Image Component Default Tests production mode should callback native onLoad with sythetic event",
"Image Component Default Tests production mode should callback onLoadingComplete when image is fully loaded", "Image Component Default Tests production mode should callback onLoadingComplete when image is fully loaded",
"Image Component Default Tests production mode should correctly ignore prose styles", "Image Component Default Tests production mode should correctly ignore prose styles",
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