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
@@ -34,6 +34,19 @@ const renderPage = (name = 'Lobo') => renderWithProviders(<PublicProfilePage/>,
|
||||
describe('PublicProfilePage', () => {
|
||||
afterEach(cleanup);
|
||||
|
||||
it('shows the coming badge on a game that is not released yet, in both lists', async () => {
|
||||
mockBackends({answer: {...library,
|
||||
playing: [{...library.playing[0], status: 'PLAYING', coming: true, comingOn: '2026-12-04'}],
|
||||
finished: [{...library.finished[0], coming: false, comingOn: null}]}});
|
||||
renderPage();
|
||||
|
||||
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('wears the premium accent and the badge of the owner', async () => {
|
||||
mockBackends({style: {accent: 'red'}, equipped: {ACCENT: 'ACCENT_GOLD', BADGE: 'BADGE_PILE_SLAYER', BANNER_FRAME: 'FRAME_GOLD'}});
|
||||
renderPage();
|
||||
|
||||
Reference in new issue
Block a user