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
@@ -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},
|
||||
|
||||
Reference in new issue
Block a user