The first public release of Fabled Minstrel #158

Merged
bvandeusen merged 256 commits from dev into main 2026-12-03 21:41:58 -05:00
Showing only changes of commit ca70cf7678 - Show all commits
+4 -2
View File
@@ -1,6 +1,7 @@
import { describe, expect, test, vi, beforeEach } from 'vitest';
import { render, screen, fireEvent, waitFor } from '@testing-library/svelte';
import PlaylistCard from './PlaylistCard.svelte';
import { washTone } from '#lib/playlists/shelf.js';
import type { Playlist, PlaylistDetail } from '#lib/api/types.js';
vi.mock('#lib/auth/store.svelte.js', () => ({
@@ -364,10 +365,11 @@ describe('PlaylistCard', () => {
expect(screen.getByText(/12\s+tracks/)).toBeInTheDocument();
});
test('a wide card takes the colour of its lead cover', async () => {
test('a wide card takes the colour of its lead cover, toned for its text', async () => {
const { container } = render(PlaylistCard, { props: { playlist: mix, shape: 'wide', covers: ['al-7'] } });
const card = container.querySelector('[data-shape="wide"] a') as HTMLElement;
await waitFor(() => expect(card.style.getPropertyValue('--wash')).toBe('rgb(90 40 130)'));
const { r, g, b } = washTone({ r: 90, g: 40, b: 130 });
await waitFor(() => expect(card.style.getPropertyValue('--wash')).toBe(`rgb(${r} ${g} ${b})`));
});
test('the shelf heading can carry the refresh line instead of the tile', () => {