Public Access
feat(games): add coming badge for unreleased games
This commit is contained in:
1 parent
edeea5a43d
commit
c158909083
17 files changed
+169
-3
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user