Public Access
feat(points): show early finish and expected points on questions
Core pays 10 early points for an unproven Steam finish. The rest comes with proof. Show this in the toast and the game line. Questions cards show the full value from GET /api/rewards/expected.
This commit is contained in:
1 parent
814decc781
commit
c126592887
13 files changed
+166
-28
No files matched your search
@@ -214,6 +214,17 @@ describe('PointsPage', () => {
|
||||
expect(screen.getByText('+50')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('links early and top-up rows to the game', async () => {
|
||||
await renderPage({'GET /api/rewards/wallet': json(200, wallet({history: [
|
||||
{kind: 'FINISHED_EARLY', ref: '10', gameName: 'Early Game', points: 10, eventAt: '2026-09-30T10:00:00Z'},
|
||||
{kind: 'FINISHED_TOPUP', ref: '10', gameName: 'Early Game', points: 20, eventAt: '2026-09-30T10:00:00Z'},
|
||||
]}))});
|
||||
|
||||
const links = screen.getAllByRole('link', {name: 'Early Game'});
|
||||
expect(links).toHaveLength(2);
|
||||
expect(links[0].getAttribute('href')).toBe('/library/10');
|
||||
});
|
||||
|
||||
it('buys, then loads the wallet again', async () => {
|
||||
let balance = 160;
|
||||
const mock = await renderPageWith(() => json(200, wallet({balance})), {
|
||||
|
||||
Reference in new issue
Block a user