mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
These tests are copy/pasta from existing tests - from `test/integration/next-image-new/default` - to `test/integration/next-image-new/app-dir` There were a handful of changes need to migrate the fixture from `pages` to `app` but the test assertions are the same. There is one test assertion for preload that wasn't working so its marked as "skip" until it can be fixed in a future PR. fix NEXT-849 ([link](https://linear.app/vercel/issue/NEXT-849))
55 lines
1.1 KiB
JavaScript
55 lines
1.1 KiB
JavaScript
import React from 'react'
|
|
import Image from 'next/image'
|
|
|
|
const Page = () => {
|
|
return (
|
|
<div>
|
|
<p>Wrapper Div</p>
|
|
<div id="image-container1">
|
|
<Image
|
|
id="img1"
|
|
src="/wide.png"
|
|
width="1200"
|
|
height="700"
|
|
loading="eager"
|
|
/>
|
|
</div>
|
|
<div id="image-container2">
|
|
<Image
|
|
id="img2"
|
|
src="/wide.png"
|
|
width="1200"
|
|
height="700"
|
|
style={{
|
|
paddingLeft: '4rem',
|
|
width: '100%',
|
|
objectPosition: '30% 30%',
|
|
}}
|
|
sizes="50vh"
|
|
/>
|
|
</div>
|
|
<div id="image-container3">
|
|
<Image
|
|
id="img3"
|
|
src="/test.png"
|
|
width="400"
|
|
height="400"
|
|
loading="eager"
|
|
/>
|
|
</div>
|
|
<div id="image-container4">
|
|
<Image
|
|
id="img4"
|
|
src="/test.png"
|
|
width="400"
|
|
height="400"
|
|
loading="eager"
|
|
style={{ width: '50%', height: 'auto' }}
|
|
/>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Page
|