feat(dashboard): close legacy parity gaps
This commit is contained in:
1 parent
92287c0a9a
commit
4b3f00729f
21 files changed
+397
-28
No files matched your search
@@ -45,6 +45,7 @@ function installSuccessfulApi(overrides: TestStatsOverrides = {}) {
|
||||
messagesRemaining: 6,
|
||||
}),
|
||||
),
|
||||
http.get('/api/messages', () => HttpResponse.json([])),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -106,6 +107,10 @@ describe('dashboard foundation', () => {
|
||||
messagesRemaining: 6,
|
||||
}),
|
||||
),
|
||||
http.get('/api/messages', () => HttpResponse.json([{
|
||||
id: 1, postId: 'post-1', recipient: 'alice', subject: 'Hello', message: 'A recent opener',
|
||||
sentAt: Date.now(), gotResponse: true, responseCheckedAt: Date.now(), strategyId: null, chatRoomId: null,
|
||||
}])),
|
||||
);
|
||||
|
||||
renderDashboard();
|
||||
@@ -118,6 +123,8 @@ describe('dashboard foundation', () => {
|
||||
expect(screen.getByText('6 messages remaining')).toBeInTheDocument();
|
||||
expect(screen.getByText('No recent activity yet.')).toBeInTheDocument();
|
||||
expect(screen.getByText('Dry run')).toBeInTheDocument();
|
||||
expect(await screen.findByRole('list', { name: 'Recent sent messages' })).toHaveTextContent('A recent opener');
|
||||
expect(screen.getByRole('list', { name: 'Recent sent messages' })).toHaveTextContent('Responded');
|
||||
});
|
||||
|
||||
it('keeps stats visible when timers fail and retries only the failed panel', async () => {
|
||||
|
||||
Reference in new issue
Block a user