Public Access
feat(achievements): dashboard card, library badge, 100 % hint and profile stats
This commit is contained in:
1 parent
2efdf64675
commit
085fcf15a4
14 files changed
+369
-19
No files matched your search
@@ -43,6 +43,23 @@ describe('PublicProfilePage', () => {
|
||||
expect(screen.getByText('Lobo')).toBeTruthy();
|
||||
expect(screen.getByText('Half-Life 2')).toBeTruthy();
|
||||
expect(screen.getByText('233')).toBeTruthy();
|
||||
expect(screen.queryByText('PROFILE.PERFECT_GAMES')).toBeNull();
|
||||
});
|
||||
|
||||
it('shows perfect games and the average completion when there are achievements', async () => {
|
||||
library.perfectGames = 12;
|
||||
library.averageCompletion = 64.5;
|
||||
try {
|
||||
mockBackends();
|
||||
renderPage();
|
||||
|
||||
expect(await screen.findByText('PROFILE.PERFECT_GAMES')).toBeTruthy();
|
||||
expect(screen.getByText('12')).toBeTruthy();
|
||||
expect(screen.getByText('64,5 %')).toBeTruthy();
|
||||
} finally {
|
||||
delete library.perfectGames;
|
||||
delete library.averageCompletion;
|
||||
}
|
||||
});
|
||||
|
||||
it('says the profile is unknown or private on a 404', async () => {
|
||||
|
||||
Reference in new issue
Block a user