feat(games): add coming badge for unreleased games
Build, Test & Push Frontend / quality-check (push) Successful in 32s
Build, Test & Push Frontend / docker (push) Successful in 22s

This commit is contained in:
lobo committed 2026-10-05 20:33:25 +02:00
1 parent edeea5a43d
commit c158909083
17 files changed
+169 -3

No files matched your search

+14
View File
@@ -62,6 +62,20 @@ afterEach(() => {
});
describe('GameLibrary search', () => {
it('shows the coming badge only for a game that is not released yet', async () => {
answer([
{...page.content[0], coming: true, comingOn: '2026-12-04'},
{appid: 620, name: 'Portal 2', playtimeMinutes: 0, status: 'BACKLOG', coming: false, comingOn: null},
]);
renderLibrary();
await screen.findByText('Portal 2');
expect(screen.getAllByText('LIBRARY.COMING')).toHaveLength(1);
expect(screen.getByText('Half-Life 2').closest('li').textContent).toContain('LIBRARY.COMING');
expect(screen.getByText('Portal 2').closest('li').textContent).not.toContain('LIBRARY.COMING');
});
it('shows the achievement progress of a game when it is known', async () => {
answer([
{...page.content[0], achievementsUnlocked: 3, achievementsTotal: 4},