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

+12
View File
@@ -62,6 +62,18 @@ describe('PublicProfilePage', () => {
}
});
it('shows only the stat groups the user shares, without links', async () => {
library.stats = {pile: null, trend: null, topGames: null, taste: null, finished: null,
habits: {moonTrips: 2.5, longestDay: null, underOneHourGames: 0, underOneHourShare: null}};
mockBackends();
renderPage();
expect(await screen.findByText('STATS.HABITS.TITLE')).toBeTruthy();
expect(screen.queryByText('STATS.PILE.TITLE')).toBeNull();
expect(screen.queryByText('STATS.TOP_GAMES.TITLE')).toBeNull();
delete library.stats;
});
it('says the profile is unknown or private on a 404', async () => {
mockBackends({profileStatus: 404});
renderPage();