- Timestamp:
- 08/20/2026 12:59:45 AM (3 weeks ago)
- Branches:
- main
- Children:
- 4989294
- Parents:
- e46ebaa
- git-author:
- Robin <roboburr@…> (08/20/2026 12:57:38 AM)
- git-committer:
- Robin <roboburr@…> (08/20/2026 12:59:45 AM)
- File:
-
- 1 edited
-
test/apple-music-embed.test.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
test/apple-music-embed.test.js
re46ebaa r48481cd 53 53 } 54 54 }); 55 56 // ── De hoogte hoort bij wat je insluit (Bart, 20-8) ───────────────────────── 57 // Op boiert.eu/the-mixtape stond een afspeellijst in een venster van 175px: de 58 // maat van een LOS NUMMER. Je zag ongeveer een derde, en `overflow:hidden` 59 // maakte de rest ook nog onbereikbaar. 60 // 61 // 450 is niet uit de documentatie overgenomen maar nagemeten: de embed-pagina 62 // van pl.u-LdbqzVvI3go5g geeft zijn <main> en <body> allebei precies 450px. 63 test('een afspeellijst krijgt 450px, niet de hoogte van een los nummer', () => { 64 const html = AudioEmbedService.generateIframe('applemusic', 65 { url: 'https://music.apple.com/nl/playlist/romance/pl.u-LdbqzVvI3go5g' }); 66 assert.match(html, /height:450px/, 'een lijst is 450 hoog'); 67 assert.ok(!/height:175px/.test(html), 'en zeker niet 175'); 68 }); 69 70 test('een album ook: dat is dezelfde speler met een lijst erin', () => { 71 const html = AudioEmbedService.generateIframe('applemusic', 72 { url: 'https://music.apple.com/nl/album/blue/1440857781' }); 73 assert.match(html, /height:450px/); 74 }); 75 76 test('een los nummer blijft klein', () => { 77 const html = AudioEmbedService.generateIframe('applemusic', 78 { url: 'https://music.apple.com/nl/song/blue/1440857785' }); 79 assert.match(html, /height:175px/, 'een enkel nummer heeft geen lijst te tonen'); 80 }); 81 82 test('en de soort wordt uit de URL gelezen, niet geraden', () => { 83 // Dezelfde id-vorm, ander soort: alleen het woord in het pad mag beslissen. 84 const lijst = AudioEmbedService.generateIframe('applemusic', 85 { url: 'https://music.apple.com/us/playlist/x/pl.abc123def456' }); 86 const nummer = AudioEmbedService.generateIframe('applemusic', 87 { url: 'https://music.apple.com/us/song/x/123456789' }); 88 assert.match(lijst, /height:450px/); 89 assert.match(nummer, /height:175px/); 90 });
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)