Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions e2e-tests/contentful/src/pages/gatsby-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ const GatsbyImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
{node.fluid ? (
<GatsbyImage fluid={node.fluid} />
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand All @@ -35,14 +35,14 @@ const GatsbyImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
{node.fixed ? (
<GatsbyImage fixed={node.fixed} />
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand All @@ -54,14 +54,14 @@ const GatsbyImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
{node.webp ? (
<GatsbyImage fixed={node.webp} />
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand All @@ -73,14 +73,14 @@ const GatsbyImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
{node.traced ? (
<GatsbyImage fixed={node.traced} />
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand All @@ -92,7 +92,7 @@ const GatsbyImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
Expand All @@ -104,7 +104,7 @@ const GatsbyImagePage = ({ data }) => {
}}
/>
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand Down Expand Up @@ -134,10 +134,8 @@ export const pageQuery = graphql`
nodes {
title
description
file {
fileName
url
}
fileName
url
fluid(maxWidth: 420) {
...GatsbyContentfulFluid
}
Expand Down
34 changes: 16 additions & 18 deletions e2e-tests/contentful/src/pages/gatsby-plugin-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ const GatsbyPluginImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
{node.constrained ? (
<GatsbyImage image={node.constrained} />
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand All @@ -34,14 +34,14 @@ const GatsbyPluginImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
{node.fullWidth ? (
<GatsbyImage image={node.fullWidth} />
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand All @@ -53,14 +53,14 @@ const GatsbyPluginImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
{node.fixed ? (
<GatsbyImage image={node.fixed} />
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand All @@ -72,14 +72,14 @@ const GatsbyPluginImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
{node.dominantColor ? (
<GatsbyImage image={node.dominantColor} />
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand All @@ -91,14 +91,14 @@ const GatsbyPluginImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
{node.traced ? (
<GatsbyImage image={node.traced} />
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand All @@ -110,14 +110,14 @@ const GatsbyPluginImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
{node.blurred ? (
<GatsbyImage image={node.blurred} />
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand All @@ -129,7 +129,7 @@ const GatsbyPluginImagePage = ({ data }) => {
<div>
<p>
<strong>
{node.title} ({node.file.fileName.split(".").pop()})
{node.title} ({node.fileName.split(".").pop()})
</strong>
</p>
{node.description && <p>{node.description}</p>}
Expand All @@ -143,7 +143,7 @@ const GatsbyPluginImagePage = ({ data }) => {
}}
/>
) : (
<SvgImage src={node.file.url} />
<SvgImage src={node.url} />
)}
</div>
))}
Expand Down Expand Up @@ -173,10 +173,8 @@ export const pageQuery = graphql`
nodes {
title
description
file {
fileName
url
}
fileName
url
constrained: gatsbyImageData(width: 420)
fullWidth: gatsbyImageData(width: 200, layout: FIXED)
fixed: gatsbyImageData(width: 200, layout: FIXED)
Expand Down
Loading