feat(stats): add stats page and pile trend
Build, Test & Push Frontend / quality-check (push) Successful in 15s
Build, Test & Push Frontend / docker (push) Successful in 22s

Show the stat groups on /stats, the pile trend on the dashboard card,
one switch per group in the settings, and the shared groups on the
public profile.
This commit is contained in:
lobo committed 2026-09-27 07:16:10 +02:00
1 parent 83bbc2730d
commit 9d1c7bb40d
31 files changed
+978 -11

No files matched your search

+15
View File
@@ -42,6 +42,21 @@ describe('PileOfShameCard', () => {
expect(onShuffle).toHaveBeenCalledOnce();
});
it('shows the pile trend and the moves of this month once they are loaded', () => {
const trend = {days: [{day: '2026-09-26', backlogGames: 3}, {day: '2026-09-27', backlogGames: 2}],
thisMonth: {added: 1, done: 2}};
renderCard({summary: summary(2), trend});
expect(screen.getByText('STATS.TREND.THIS_MONTH')).toBeTruthy();
expect(screen.getByTestId('pile-trend')).toBeTruthy();
});
it('shows no trend while it is not loaded', () => {
renderCard({summary: summary(2)});
expect(screen.queryByText('STATS.TREND.THIS_MONTH')).toBeNull();
});
it('says the backlog is empty when there is no suggestion', () => {
renderCard({summary: summary(0)});