We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7143318 commit 80b4690Copy full SHA for 80b4690
src/routes/storage-test/+page.svelte
@@ -15,7 +15,7 @@
15
{#each list.items as item}
16
<li>
17
<DownloadLink ref={item} let:link let:ref>
18
- <a href="{link}" download>{ref?.name}</a>
+ <a data-testid="download-link" href="{link}" download>{ref?.name}</a>
19
</DownloadLink>
20
</li>
21
{/each}
tests/storage.test.ts
@@ -0,0 +1,10 @@
1
+import { expect, test } from '@playwright/test';
2
+
3
4
+test('Renders download links', async ({ page }) => {
5
+ await page.goto('/storage-test');
6
+ await page.waitForSelector('[data-testid="download-link"]');
7
+ const linksCount = await page.getByTestId('download-link').count()
8
+ expect( linksCount ).toBeGreaterThan(0);
9
+});
10
0 commit comments