Update guest v2 home and tasks experience
This commit is contained in:
@@ -17,7 +17,13 @@ describe('fetchEventStats', () => {
|
||||
|
||||
it('returns cached stats on 304', async () => {
|
||||
fetchMock.mockResolvedValueOnce(
|
||||
new Response(JSON.stringify({ online_guests: 4, tasks_solved: 1, latest_photo_at: '2024-01-01T00:00:00Z' }), {
|
||||
new Response(JSON.stringify({
|
||||
online_guests: 4,
|
||||
tasks_solved: 1,
|
||||
guest_count: 12,
|
||||
likes_count: 48,
|
||||
latest_photo_at: '2024-01-01T00:00:00Z',
|
||||
}), {
|
||||
status: 200,
|
||||
headers: { ETag: '"demo"' },
|
||||
})
|
||||
@@ -25,6 +31,8 @@ describe('fetchEventStats', () => {
|
||||
|
||||
const first = await fetchEventStats('demo');
|
||||
expect(first.onlineGuests).toBe(4);
|
||||
expect(first.guestCount).toBe(12);
|
||||
expect(first.likesCount).toBe(48);
|
||||
|
||||
fetchMock.mockResolvedValueOnce(new Response(null, { status: 304, headers: { ETag: '"demo"' } }));
|
||||
const second = await fetchEventStats('demo');
|
||||
|
||||
Reference in New Issue
Block a user