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

fix: image with flex #3436

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion packages/react/src/blocks/Image.tsx
Original file line number Diff line number Diff line change
@@ -365,7 +365,7 @@ class ImageComponent extends React.Component<any, { imageLoaded: boolean; load:
{amp ? (
imageContents
) : (
<picture ref={ref => (this.pictureRef = ref)}>
<picture css={{display: 'contents'}} ref={ref => (this.pictureRef = ref)}>
{srcset && srcset.match(/builder\.io/) && !this.props.noWebp && (
<source srcSet={srcset.replace(/\?/g, '?format=webp&')} type="image/webp" />
)}

Unchanged files with check annotations Beta

const image = imageLocator.nth(i);
const expected = val;
for (const property of Object.keys(expected)) {
await expect(image).toHaveCSS(property, expected[property]);

Check failure on line 129 in packages/sdks-tests/src/e2e-tests/blocks.spec.ts

GitHub Actions / Gen 1 React SDK (gen1-react)

[gen1-react] › blocks.spec.ts:66:5 › Blocks › Image › Image size

1) [gen1-react] › blocks.spec.ts:66:5 › Blocks › Image › Image size ────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveCSS(expected) Locator: locator('.builder-image').nth(3) Expected string: "600px" Received string: "604px" Call log: - expect.toHaveCSS with timeout 5000ms - waiting for locator('.builder-image').nth(3) - locator resolved to <img loading="lazy" role="presentation" fetchpriority…/> - unexpected value "604px" - locator resolved to <img loading="lazy" role="presentation" fetchpriority…/> - unexpected value "604px" - locator resolved to <img loading="lazy" role="presentation" fetchpriority…/> - unexpected value "604px" - locator resolved to <img loading="lazy" role="presentation" fetchpriority…/> - unexpected value "604px" - locator resolved to <img loading="lazy" role="presentation" fetchpriority…/> - unexpected value "604px" - locator resolved to <img loading="lazy" role="presentation" fetchpriority…/> - unexpected value "604px" - locator resolved to <img loading="lazy" role="presentation" fetchpriority…/> - unexpected value "604px" - locator resolved to <img loading="lazy" role="presentation" fetchpriority…/> - unexpected value "604px" - locator resolved to <img loading="lazy" role="presentation" fetchpriority…/> - unexpected value "604px" 127 | const expected = val; 128 | for (const property of Object.keys(expected)) { > 129 | await expect(image).toHaveCSS(property, expected[property]); | ^ 130 | } 131 | } 132 | }); at /home/runner/work/builder/builder/packages/sdks-tests/src/e2e-tests/blocks.spec.ts:129:31
}
}
});