Skip to content

Commit 61dcb64

Browse files
committed
test(desktop): match the desktop anchor without depending on its element tag
The site hero moved the desktop anchor from a section to the hero header, so the packaging-config test extracted a null block. Bind the Windows assertion to the desktop download entry instead, so it cannot pass on the CLI install rows.
1 parent 5784e40 commit 61dcb64

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ describe('desktop packaging configuration', () => {
8686
expect(siteSource).toContain('releases/download/v${DESKTOP_VERSION}')
8787
expect(siteSource).not.toContain('releases/download/v0.1.0')
8888

89-
const desktopShowcaseMatch = siteSource.match(/<section id="desktop"[\s\S]*?<\/section>/)
90-
expect(desktopShowcaseMatch).not.toBeNull()
91-
expect(desktopShowcaseMatch![0]).toContain('/brand/windows11.svg')
89+
expect(siteSource).toContain('id="desktop"')
90+
expect(siteSource).toMatch(
91+
/\{[^}]*icon: '\/brand\/windows11\.svg', href: desktopDownloads\.windows[^}]*\}/,
92+
)
9293
})
9394

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

0 commit comments

Comments
 (0)