Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update image tests from placeholder.com to *.vercel.app #38081

Merged
merged 2 commits into from Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -14,7 +14,7 @@ const Page = () => {
<br />
<Image
id="external-image"
src="https://via.placeholder.com/800/000/FFF.png?text=test"
src="https://image-optimization-test.vercel.app/test.jpg"
width={400}
height={400}
/>
Expand Down
Expand Up @@ -61,23 +61,23 @@ function runTests() {
await check(
() =>
browser.eval(`document.getElementById("external-image").currentSrc`),
/placeholder.com/
'https://image-optimization-test.vercel.app/test.jpg'
)
await check(
() => browser.elementById('internal-image').getAttribute('src'),
/test\.png/
'/test.png'
)
await check(
() => browser.elementById('static-image').getAttribute('src'),
/test(.*)jpg/
)
await check(
() => browser.elementById('external-image').getAttribute('src'),
/https:\/\/via\.placeholder\.com\/800\/000\/FFF\.png\?text=test/
'https://image-optimization-test.vercel.app/test.jpg'
)
await check(
() => browser.elementById('eager-image').getAttribute('src'),
/test\.webp/
'/test.webp'
)

expect(
Expand Down
2 changes: 1 addition & 1 deletion test/integration/image-future/unoptimized/pages/index.js
Expand Up @@ -14,7 +14,7 @@ const Page = () => {
<br />
<Image
id="external-image"
src="https://via.placeholder.com/800/000/FFF.png?text=test"
src="https://image-optimization-test.vercel.app/test.jpg"
width={400}
height={400}
/>
Expand Down
Expand Up @@ -27,7 +27,7 @@ function runTests() {
).toMatch(/test(.*)jpg/)
expect(
await browser.elementById('external-image').getAttribute('src')
).toBe('https://via.placeholder.com/800/000/FFF.png?text=test')
).toBe('https://image-optimization-test.vercel.app/test.jpg')
expect(await browser.elementById('eager-image').getAttribute('src')).toBe(
'/test.webp'
)
Expand Down Expand Up @@ -61,7 +61,7 @@ function runTests() {
await check(
() =>
browser.eval(`document.getElementById("external-image").currentSrc`),
/placeholder.com/
'https://image-optimization-test.vercel.app/test.jpg'
)

expect(
Expand All @@ -72,7 +72,7 @@ function runTests() {
).toMatch(/test(.*)jpg/)
expect(
await browser.elementById('external-image').getAttribute('src')
).toBe('https://via.placeholder.com/800/000/FFF.png?text=test')
).toBe('https://image-optimization-test.vercel.app/test.jpg')
expect(await browser.elementById('eager-image').getAttribute('src')).toBe(
'/test.webp'
)
Expand Down