Public Access
feat(psn): replace PSN import button with sync review
Remove the PSN import tab; linking now starts a sync. Show the PSN review link, last played date and PSN expiry notes. PSN rows hide the hours field; unchecked titles you saw are dismissed, unseen ones stay open.
This commit is contained in:
1 parent
599b083591
commit
27c402fa34
30 files changed
+338
-286
No files matched your search
@@ -34,6 +34,24 @@ describe('InboxPage', () => {
|
||||
expect(await screen.findByText('INBOX.VISIBILITY')).toBeTruthy();
|
||||
});
|
||||
|
||||
it.each(['PSN_EXPIRING', 'PSN_EXPIRED'])('shows the %s note with a link to the settings', async (kind) => {
|
||||
fetchRoutes({'GET /api/inbox': json(200, {results: [note(1, {kind, displayName: null})], unread: 1}),
|
||||
'PUT /api/inbox/read': json(204)});
|
||||
renderWithProviders(<InboxPage/>);
|
||||
|
||||
expect(await screen.findByText(`INBOX.${kind}`)).toBeTruthy();
|
||||
expect(screen.getByRole('link', {name: 'INBOX.OPEN_SETTINGS'}).getAttribute('href')).toBe('/settings');
|
||||
expect(screen.queryByText('INBOX.DIGEST')).toBeNull();
|
||||
});
|
||||
|
||||
it('gives a digest or a visibility note no settings link', async () => {
|
||||
fetchRoutes({'GET /api/inbox': json(200, {results: [note(1, {newGames: 2}), note(2, {kind: 'VISIBILITY'})], unread: 0})});
|
||||
renderWithProviders(<InboxPage/>);
|
||||
|
||||
expect(await screen.findByText('INBOX.VISIBILITY')).toBeTruthy();
|
||||
expect(screen.queryByRole('link', {name: 'INBOX.OPEN_SETTINGS'})).toBeNull();
|
||||
});
|
||||
|
||||
it('saysSoWhenThereAreNoNotesAndMarksNothing', async () => {
|
||||
fetchRoutes({'GET /api/inbox': json(200, {results: [], unread: 0})});
|
||||
renderWithProviders(<InboxPage/>);
|
||||
|
||||
Reference in new issue
Block a user