From 4c3caa297be6f73f07821d2dab4071cf239712b4 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 31 Jul 2024 09:33:53 -0300 Subject: test: generateAlbumTrackList: track sections (snapshot) --- test/snapshot/generateAlbumTrackList.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test') diff --git a/test/snapshot/generateAlbumTrackList.js b/test/snapshot/generateAlbumTrackList.js index a7c3f591..e09f1c4a 100644 --- a/test/snapshot/generateAlbumTrackList.js +++ b/test/snapshot/generateAlbumTrackList.js @@ -6,6 +6,9 @@ testContentFunctions(t, 'generateAlbumTrackList (snapshot)', async (t, evaluate) mock: { generateAlbumTrackListMissingDuration: evaluate.stubContentFunction('generateAlbumTrackListMissingDuration'), + + image: + evaluate.stubContentFunction('image'), }, }); @@ -46,6 +49,16 @@ testContentFunctions(t, 'generateAlbumTrackList (snapshot)', async (t, evaluate) tracks, }; + const albumWithTrackSectionDescriptions = { + color: color1, + artistContribs: contribs1, + trackSections: [ + {name: 'First section', tracks: tracks.slice(0, 3), description: `Why yes!`}, + {name: 'Second section', tracks: tracks.slice(3), description: `How *contentful,* this is.`}, + ], + tracks, + }; + const albumWithNoDuration = { color: color1, artistContribs: contribs1, @@ -63,6 +76,11 @@ testContentFunctions(t, 'generateAlbumTrackList (snapshot)', async (t, evaluate) args: [albumWithoutTrackSections], }); + evaluate.snapshot(`basic behavior, with descriptions`, { + name: 'generateAlbumTrackList', + args: [albumWithTrackSectionDescriptions], + }); + evaluate.snapshot(`collapseDurationScope: never`, { name: 'generateAlbumTrackList', slots: {collapseDurationScope: 'never'}, -- cgit 1.3.0-6-gf8a5