Skip to content

Commit 88611c7

Browse files
billyvgmydea
andauthored
test(overhead): Stop loading api.lorem.space images (#8833)
This site is dead, lets remove the image loading from it. --------- Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
1 parent 4a4df0d commit 88611c7

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed
Loading
Loading
Loading

packages/overhead-metrics/test-apps/booking-app/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,15 @@ function generateResult() {
9999
const descriptionShort = description.slice(0, 200);
100100
const priceStr = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(price);
101101

102+
const imgSrc = `./img/house-${Math.floor(Math.random() * 3)}.jpg`;
103+
102104
const placeholders = {
103105
title,
104106
beds,
105107
description,
106108
descriptionShort,
107109
priceStr,
110+
imgSrc,
108111
};
109112

110113
return replacePlaceholders(template, placeholders);
@@ -124,7 +127,7 @@ function replacePlaceholders(str, placeholders) {
124127
}
125128

126129
const template = `<figure class="result-image">
127-
<img src="https://api.lorem.space/image/house?w=350&h=250" alt="{{title}}" data-image />
130+
<img src="{{imgSrc}}" alt="{{title}}" data-image />
128131
</figure>
129132
130133
<div class="result-content">

0 commit comments

Comments
 (0)