Unverified Commit 417a7120 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update next/image test (#20986)

This ensures the page has transitioned fully before testing which should resolve the random failure seen in a couple of runs. 
 
x-ref: https://github.com/vercel/next.js/pull/20918#issuecomment-758155230
parent 334ce64c
...@@ -12,7 +12,7 @@ const MyImage = (props) => { ...@@ -12,7 +12,7 @@ const MyImage = (props) => {
const Page = () => { const Page = () => {
return ( return (
<div> <div>
<p>Image Client Side Test</p> <p id="client-side">Image Client Side Test</p>
<MyImage <MyImage
id="basic-image" id="basic-image"
src="foo.jpg" src="foo.jpg"
......
...@@ -13,7 +13,7 @@ const MyImage = (props) => { ...@@ -13,7 +13,7 @@ const MyImage = (props) => {
const Page = () => { const Page = () => {
return ( return (
<div> <div>
<p>Image SSR Test</p> <p id="ssr">Image SSR Test</p>
<MyImage <MyImage
id="basic-image" id="basic-image"
src="foo.jpg" src="foo.jpg"
......
...@@ -50,7 +50,10 @@ describe('Custom Resolver Tests', () => { ...@@ -50,7 +50,10 @@ describe('Custom Resolver Tests', () => {
describe('Client-side Custom Loader Tests', () => { describe('Client-side Custom Loader Tests', () => {
beforeAll(async () => { beforeAll(async () => {
browser = await webdriver(appPort, '/') browser = await webdriver(appPort, '/')
await browser.waitForElementByCss('#clientlink').click() await browser
.elementByCss('#clientlink')
.click()
.waitForElementByCss('#client-side')
}) })
afterAll(async () => { afterAll(async () => {
browser = null browser = null
......
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