Skip to content

Commit 02a0321

Browse files
committed
test(desktop): assert each download anchor carries its own platform icon
1 parent 61dcb64 commit 02a0321

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

apps/desktop/tests/packaging-config.spec.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,17 @@ describe('desktop packaging configuration', () => {
8787
expect(siteSource).not.toContain('releases/download/v0.1.0')
8888

8989
expect(siteSource).toContain('id="desktop"')
90-
expect(siteSource).toMatch(
91-
/\{[^}]*icon: '\/brand\/windows11\.svg', href: desktopDownloads\.windows[^}]*\}/,
90+
const macDownload = siteSource.match(
91+
/<a[^>]*:href="desktopDownloads\.mac"[^>]*>[\s\S]*?<\/a>/,
9292
)
93+
expect(macDownload).not.toBeNull()
94+
expect(macDownload![0]).toContain('/brand/apple.svg')
95+
96+
const windowsDownload = siteSource.match(
97+
/<a[^>]*:href="desktopDownloads\.windows"[^>]*>[\s\S]*?<\/a>/,
98+
)
99+
expect(windowsDownload).not.toBeNull()
100+
expect(windowsDownload![0]).toContain('/brand/windows11.svg')
93101
})
94102

95103
it('maps the staged Host node_modules directory as the copy root', () => {

0 commit comments

Comments
 (0)