mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 01:10:02 +02:00
test(platform-download): add AppImage support and enhance Linux platform tests
- Updated the test for the Linux platform to include AppImage download options for both x86_64 and ARM64 architectures. - Added assertions to verify the presence of AppImage links and checksums in the rendered output. - Ensured consistency in platform naming and improved test coverage for Linux releases.
This commit is contained in:
parent
646fb03317
commit
14c88d32b3
1 changed files with 33 additions and 2 deletions
|
@ -71,8 +71,14 @@ describe('<PlatformDownload />', () => {
|
|||
it('renders linux platform with all branches', async () => {
|
||||
const linuxReleases = {
|
||||
flathub: { all: { label: 'Flathub', link: '/flathub' } },
|
||||
x86_64: { tarball: { label: 'Tarball x86_64', link: '/tarball-x86_64', checksum: 'sha256' } },
|
||||
aarch64: { tarball: { label: 'Tarball ARM64', link: '/tarball-arm64', checksum: 'sha256-arm64' } },
|
||||
x86_64: {
|
||||
tarball: { label: 'Tarball x86_64', link: '/tarball-x86_64', checksum: 'sha256' },
|
||||
appImage: { label: 'AppImage x86_64', link: '/appimage-x86_64', checksum: 'sha256-appimage' },
|
||||
},
|
||||
aarch64: {
|
||||
tarball: { label: 'Tarball ARM64', link: '/tarball-arm64', checksum: 'sha256-arm64' },
|
||||
appImage: { label: 'AppImage ARM64', link: '/appimage-arm64', checksum: 'sha256-appimage-arm64' },
|
||||
},
|
||||
}
|
||||
const result = await container.renderToString(PlatformDownload, {
|
||||
props: {
|
||||
|
@ -83,6 +89,31 @@ describe('<PlatformDownload />', () => {
|
|||
releases: linuxReleases,
|
||||
},
|
||||
})
|
||||
|
||||
// Test basic content
|
||||
expect(result).toContain('Linux Title')
|
||||
expect(result).toContain('Linux Desc')
|
||||
|
||||
// Test Flathub section
|
||||
expect(result).toContain('Flathub')
|
||||
expect(result).toContain('/flathub')
|
||||
|
||||
// Test x86_64 section
|
||||
expect(result).toContain('x86_64')
|
||||
expect(result).toContain('Tarball x86_64')
|
||||
expect(result).toContain('/tarball-x86_64')
|
||||
expect(result).toContain('sha256')
|
||||
expect(result).toContain('AppImage x86_64')
|
||||
expect(result).toContain('/appimage-x86_64')
|
||||
expect(result).toContain('sha256-appimage')
|
||||
|
||||
// Test ARM64 section
|
||||
expect(result).toContain('ARM64')
|
||||
expect(result).toContain('Tarball ARM64')
|
||||
expect(result).toContain('/tarball-arm64')
|
||||
expect(result).toContain('sha256-arm64')
|
||||
expect(result).toContain('AppImage ARM64')
|
||||
expect(result).toContain('/appimage-arm64')
|
||||
expect(result).toContain('sha256-appimage-arm64')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue