feat: add agent API and operational analytics
This commit is contained in:
1 parent
720ea0652a
commit
e8b730b592
65 files changed
+2650
-1214
No files matched your search
@@ -68,11 +68,26 @@ describe('PerformancePage', () => {
|
||||
},
|
||||
]),
|
||||
),
|
||||
http.get('/api/analytics/funnel', () => HttpResponse.json({
|
||||
responseWindowHours: 48,
|
||||
processed: 100,
|
||||
sent: 40,
|
||||
pending: 5,
|
||||
mature: 35,
|
||||
responded: 12,
|
||||
engaged: 4,
|
||||
declined: 2,
|
||||
boundary: 1,
|
||||
upsell: 3,
|
||||
images: 2,
|
||||
})),
|
||||
);
|
||||
|
||||
renderPage(<PerformancePage />);
|
||||
|
||||
expect(await screen.findByRole('heading', { name: 'Performance' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('heading', { name: 'Outcome funnel' })).toBeInTheDocument();
|
||||
expect(screen.getByText('5 awaiting maturity')).toBeInTheDocument();
|
||||
const subredditTable = screen.getByRole('table', { name: 'Subreddit performance' });
|
||||
expect(within(subredditTable).getByText('n = 40')).toBeInTheDocument();
|
||||
expect(within(subredditTable).getByText('n = 3')).toBeInTheDocument();
|
||||
|
||||
Reference in new issue
Block a user