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

+17
View File
@@ -38,6 +38,23 @@ afterEach(() => {
});
describe('GameDetail', () => {
it('shows the coming badge of a game that is not released yet', async () => {
answer({...game, source: 'STEAM', coming: true, comingOn: '2026-12-04'});
renderDetail();
expect(await screen.findByText('LIBRARY.COMING')).toBeTruthy();
});
it('shows no coming badge for a released game', async () => {
answer({...game, source: 'STEAM', coming: false, comingOn: null});
renderDetail();
await screen.findByText('Half-Life 2');
expect(screen.queryByText('LIBRARY.COMING')).toBeNull();
expect(screen.queryByText('LIBRARY.COMING_SOON')).toBeNull();
});
it('asks "finished?" instead of "playing?" when Core has a finished hint', async () => {
answer({...game, playtime2Weeks: 90, source: 'STEAM', finishedHint: {type: 'ENDING', achievement: 'Survivor'}});
renderDetail();