From ed768f69e18325b1a889e9bc0dedb3a97d43606f Mon Sep 17 00:00:00 2001 From: David Langley Date: Fri, 26 Jun 2026 15:09:53 +0100 Subject: [PATCH] Fix ImageReplyBodyView test flake (#33974) * Fix aspect ratio in ImageReplyBodyView story * De-flake blurhash story via per-story failureThreshold Revert the aspectRatio change (it produced byte-identical blurhash output, so it did not address the flake, and only churned the with-banner baseline) and instead allow a small per-story failureThreshold on LoadingWithBlurhash. The blurhash rasterizes to one of two ~33px-apart variants per run; this tolerates that benign jitter while keeping the strict 3px elsewhere. --- .../MImageReplyBodyView/ImageReplyBodyView.stories.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/shared-components/src/room/timeline/event-tile/body/MImageReplyBodyView/ImageReplyBodyView.stories.tsx b/packages/shared-components/src/room/timeline/event-tile/body/MImageReplyBodyView/ImageReplyBodyView.stories.tsx index be54397237..15bf8205c6 100644 --- a/packages/shared-components/src/room/timeline/event-tile/body/MImageReplyBodyView/ImageReplyBodyView.stories.tsx +++ b/packages/shared-components/src/room/timeline/event-tile/body/MImageReplyBodyView/ImageReplyBodyView.stories.tsx @@ -75,6 +75,13 @@ export const LoadingWithBlurhash: Story = { args: { placeholder: ImageReplyBodyViewPlaceholder.BLURHASH, }, + // The blurhash rasterizes to one of two ~33px-apart variants per run; + // tolerate that benign jitter rather than flake against the strict 3px default. + parameters: { + snapshot: { + failureThreshold: 100, + }, + }, }; export const AnimatedPreview: Story = {