Public Access
feat(psn): show trophy sets on game detail and dashboard
Detail page groups achievements by set: Steam, then PSN trophies. Tiles show the real count; a perfect game gets an amber trophy. Dashboard card shows for PSN-only users; CSP allows PSN icons.
This commit is contained in:
1 parent
27c402fa34
commit
e7b08cfb47
14 files changed
+349
-105
No files matched your search
@@ -87,6 +87,14 @@ describe('GameLibrary search', () => {
|
||||
expect(screen.queryByText(/\/5$/)).toBeNull();
|
||||
});
|
||||
|
||||
it('shows the real count of a game with a platinum trophy and marks it perfect', async () => {
|
||||
answer([{...page.content[0], achievementsUnlocked: 30, achievementsTotal: 50, achievementsPerfect: true}]);
|
||||
renderLibrary();
|
||||
|
||||
const badge = (await screen.findByText('30/50')).closest('[data-slot="badge"]');
|
||||
expect(badge.querySelector('svg.text-amber-500')).not.toBeNull();
|
||||
});
|
||||
|
||||
it('shows the newest search when an older answer comes last', async () => {
|
||||
const later = [];
|
||||
const games = (name) => json(200, {...page, content: [{...page.content[0], name}], totalElements: 1, totalPages: 1});
|
||||
|
||||
Reference in new issue
Block a user