Skip to content

Commit

Permalink
Update next/image test (#20986)
Browse files Browse the repository at this point in the history
This ensures the page has transitioned fully before testing which should resolve the random failure seen in a couple of runs. 
 
x-ref: #20918 (comment)
  • Loading branch information
ijjk committed Jan 13, 2021
1 parent 334ce64 commit 417a712
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Expand Up @@ -12,7 +12,7 @@ const MyImage = (props) => {
const Page = () => {
return (
<div>
<p>Image Client Side Test</p>
<p id="client-side">Image Client Side Test</p>
<MyImage
id="basic-image"
src="foo.jpg"
Expand Down
Expand Up @@ -13,7 +13,7 @@ const MyImage = (props) => {
const Page = () => {
return (
<div>
<p>Image SSR Test</p>
<p id="ssr">Image SSR Test</p>
<MyImage
id="basic-image"
src="foo.jpg"
Expand Down
Expand Up @@ -50,7 +50,10 @@ describe('Custom Resolver Tests', () => {
describe('Client-side Custom Loader Tests', () => {
beforeAll(async () => {
browser = await webdriver(appPort, '/')
await browser.waitForElementByCss('#clientlink').click()
await browser
.elementByCss('#clientlink')
.click()
.waitForElementByCss('#client-side')
})
afterAll(async () => {
browser = null
Expand Down

0 comments on commit 417a712

Please sign in to comment.