From 8069865a16a0dc4c2e1bbab1e0c1c11e45658d7b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 17 Nov 2024 15:59:44 -0400 Subject: test: update generateCoverArtwork (snapshot) --- test/snapshot/generateCoverArtwork.js | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'test/snapshot') diff --git a/test/snapshot/generateCoverArtwork.js b/test/snapshot/generateCoverArtwork.js index e35dd8d0..c2a89557 100644 --- a/test/snapshot/generateCoverArtwork.js +++ b/test/snapshot/generateCoverArtwork.js @@ -5,6 +5,7 @@ testContentFunctions(t, 'generateCoverArtwork (snapshot)', async (t, evaluate) = await evaluate.load({ mock: { image: evaluate.stubContentFunction('image', {mock: true}), + linkArtistGallery: evaluate.stubContentFunction('linkArtistGallery', {mock: true}), }, }); @@ -15,17 +16,22 @@ testContentFunctions(t, 'generateCoverArtwork (snapshot)', async (t, evaluate) = {name: 'creepy crawlies', isContentWarning: true}, ]; + const coverArtistContribs = [ + {artist: {name: 'Circlejourney', directory: 'circlejourney'}}, + {artist: {name: 'magnoliajades', directory: 'magnoliajades'}}, + ]; + const path = ['media.albumCover', 'bee-forus-seatbelt-safebee', 'png']; - evaluate.snapshot('display: primary', { - name: 'generateCoverArtwork', - args: [artTags], - slots: {path, mode: 'primary'}, - }); + const quickSnapshot = (mode) => + evaluate.snapshot(`mode: ${mode}`, { + name: 'generateCoverArtwork', + args: [artTags, coverArtistContribs], + slots: {path, mode}, + }); - evaluate.snapshot('display: thumbnail', { - name: 'generateCoverArtwork', - args: [artTags], - slots: {path, mode: 'thumbnail'}, - }); + quickSnapshot('primary-tags'); + quickSnapshot('primary-artists'); + quickSnapshot('thumbnail'); + quickSnapshot('commentary'); }); -- cgit 1.3.0-6-gf8a5