Skip to content

Commit 587f438

Browse files
committed
test(desktop): scope the Windows download check to the desktop section
The Windows assertion searched the whole file, so it matched the hero download array in the script block while the desktop section itself could carry no Windows link at all. Match the section and assert inside it. Also drop the translucency claim from the dark-mode changeset, since the desktop window is now opaque on every platform.
1 parent 9fc7847 commit 587f438

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

.changeset/dark-sidebar-contrast.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"@pymodel/pythinker-desktop": patch
44
---
55

6-
Make the workspace header, session timestamps, and the settings row legible in dark mode on the translucent desktop sidebar.
6+
Make the workspace header, session timestamps, and the settings row legible in dark mode on the desktop sidebar.

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ 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-
expect(siteSource).toContain('id="desktop"')
90-
expect(siteSource).toMatch(
91-
/\{[^}]*icon: '\/brand\/windows11\.svg', href: desktopDownloads\.windows[^}]*\}/u,
92-
)
89+
const desktopSection = siteSource.match(/<section id="desktop"[\s\S]*?<\/section>/u)
90+
91+
expect(desktopSection).not.toBeNull()
92+
expect(desktopSection![0]).toContain(':href="desktopDownloads.windows"')
93+
expect(desktopSection![0]).toContain('/brand/windows11.svg')
9394
})
9495

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

0 commit comments

Comments
 (0)