Skip to content

Commit 511c149

Browse files
fix: 🐛 gift-guide link
1 parent 3735308 commit 511c149

File tree

4 files changed

+29
-10
lines changed

4 files changed

+29
-10
lines changed

src/lib/components/Svg/GiftGuide.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<a
66
data-sveltekit-preload-data
7-
href="/gift-guide"
7+
href="/shop/category/CXWG77NR7TPXXQSZD3QVPLHS"
88
class="guide"
99
data-test-id="guide"
1010
>

src/routes/+page.svelte

+4-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@
102102
alt="online shop button"
103103
/>
104104
</a>
105-
<a data-sveltekit-preload-data href="/gift-guide">
105+
<a
106+
data-sveltekit-preload-data
107+
href="/shop/category/CXWG77NR7TPXXQSZD3QVPLHS"
108+
>
106109
<img
107110
class="mobile-gift-guide-img"
108111
src={isAvifSupported ? mobileGiftGuideAvif : mobileGiftGuidePng}

tests/components/header.spec.js

+18-6
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ test.describe("Header", () => {
2525

2626
await expect(page.locator("button>> nth=1")).toHaveText("gift guide");
2727
await page.locator("button>> nth=1").click();
28-
await page.waitForURL("http://localhost:4000/gift-guide");
29-
expect(page.url()).toBe("http://localhost:4000/gift-guide");
28+
await page.waitForURL(
29+
"http://localhost:4000/shop/category/CXWG77NR7TPXXQSZD3QVPLHS"
30+
);
31+
expect(page.url()).toBe(
32+
"http://localhost:4000/shop/category/CXWG77NR7TPXXQSZD3QVPLHS"
33+
);
3034
await page.locator("img.enki-logo").click();
3135
await page.waitForURL("http://localhost:4000/");
3236
expect(page.url()).toBe("http://localhost:4000/");
@@ -97,8 +101,12 @@ test.describe("Header", () => {
97101

98102
await expect(page.locator("a >> nth=1")).toHaveText("gift guide");
99103
await page.locator("a >> nth=1").click();
100-
await page.waitForURL("http://localhost:4000/gift-guide");
101-
expect(page.url()).toBe("http://localhost:4000/gift-guide");
104+
await page.waitForURL(
105+
"http://localhost:4000/shop/category/CXWG77NR7TPXXQSZD3QVPLHS"
106+
);
107+
expect(page.url()).toBe(
108+
"http://localhost:4000/shop/category/CXWG77NR7TPXXQSZD3QVPLHS"
109+
);
102110
await page.keyboard.press("Escape");
103111
await page.locator("img.enki-logo").click();
104112
await page.waitForURL("http://localhost:4000/");
@@ -147,8 +155,12 @@ test.describe("Header", () => {
147155
await page.waitForURL("http://localhost:4000/shop");
148156
expect(page.url()).toBe("http://localhost:4000/shop");
149157
await page.locator("a >> nth=1").click();
150-
await page.waitForURL("http://localhost:4000/gift-guide");
151-
expect(page.url()).toBe("http://localhost:4000/gift-guide");
158+
await page.waitForURL(
159+
"http://localhost:4000/shop/category/CXWG77NR7TPXXQSZD3QVPLHS"
160+
);
161+
expect(page.url()).toBe(
162+
"http://localhost:4000/shop/category/CXWG77NR7TPXXQSZD3QVPLHS"
163+
);
152164
await page.locator("a >> nth=2").click();
153165
await page.waitForURL("http://localhost:4000/repairs");
154166
expect(page.url()).toBe("http://localhost:4000/repairs");

tests/routes/index.spec.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ test.describe("Desktop Home Page", () => {
3939
await page.goBack();
4040
expect(page.url()).toBe("http://localhost:4000/");
4141
await page.locator("data-test-id=guide").click();
42-
await page.waitForURL("http://localhost:4000/gift-guide");
43-
expect(page.url()).toBe("http://localhost:4000/gift-guide");
42+
await page.waitForURL(
43+
"http://localhost:4000/shop/category/CXWG77NR7TPXXQSZD3QVPLHS"
44+
);
45+
expect(page.url()).toBe(
46+
"http://localhost:4000/shop/category/CXWG77NR7TPXXQSZD3QVPLHS"
47+
);
4448
await page.goBack();
4549
expect(page.url()).toBe("http://localhost:4000/");
4650
});

0 commit comments

Comments
 (0)