Skip to content

Commit b269e8d

Browse files
thomaspblockWintermute
andauthored
fix(desktop): route compact preview geometry fixture through media proxy (#5799)
**Category:** fix (CI) **User Impact:** None — test-only change that unblocks `main` and every open PR. **Problem:** `main` has been red since #5629 landed on `45f4b91a3`: `Desktop Smoke E2E (3)` fails `compact link preview image geometry truncates long titles to one line` on every build (main run 31727837133, and e.g. #5792, #5790). Two independently-green PRs raced: #5629 added the test stubbing its preview image at the raw relay origin (`http://localhost:3000/media/*.png`), while #5627 rewrites sent snapshot media through the authenticated local media proxy (`http://127.0.0.1:54321` in the E2E mock bridge). Merged together, the image request goes to the proxy origin, the stub never matches, and `naturalWidth` stays `0`. **Solution:** Point the route stub at the mock proxy origin, matching the existing `sent link preview media uses the authenticated proxy in compact and rich cards` test in the same spec. **Testing:** Reproduced the failure locally on `45f4b91a3`, then with this fix: targeted test passes, and the full `messaging.spec.ts` smoke suite passes 58/58. Signed-off-by: Thomas Petersen <[email protected]> Co-authored-by: Wintermute <3f1797424fd9ad6653a83665c660517777cd7f8c228c0d5907f49e01537f3ca5@buzz.block.builderlab.xyz>
1 parent 2693e0d commit b269e8d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎desktop/tests/e2e/messaging.spec.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,10 @@ test("compact link preview image geometry truncates long titles to one line", as
13121312
page,
13131313
}) => {
13141314
const previewUrl = "https://github.com/block/buzz/pull/3246?geometry=1";
1315-
await page.route("http://localhost:3000/media/*.png", (route) =>
1315+
// Sent snapshot media is relay-hosted and rewritten through the
1316+
// authenticated media proxy (#5627), so serve the fixture from the mock
1317+
// proxy origin rather than the raw relay origin.
1318+
await page.route("http://127.0.0.1:54321/media/**", (route) =>
13161319
route.fulfill({
13171320
body: LINK_PREVIEW_IMAGE,
13181321
contentType: "image/png",

0 commit comments

Comments
 (0)