test(api): add Bruno tests for analytics, books, and bulk operations

Analytics:
- Reading stats endpoint tests
- Device usage tests
- Popular books tests

Books:
- Bulk delete tests
- Bulk update tests

Collections:
- Bulk add books to collections tests

Conflicts:
- Bulk resolve conflicts tests
- Bulk dismiss conflicts tests
- Bulk resolve highest progress tests

All tests cover no user, user, and admin contexts
This commit is contained in:
2026-02-01 12:16:07 -05:00
parent ef8f39bd5a
commit 2df5ca3325
10 changed files with 395 additions and 0 deletions
@@ -0,0 +1,30 @@
{
"meta": {
"name": "Get Reading Stats with Date Range",
"type": "http",
"event": [
{
"listen": "test",
"script": {
"exec": [
"// Test reading stats with custom date range",
"if (response.status === 200) {",
" tests['Date range stats loaded'] = true;",
" const body = JSON.parse(response.body);",
" tests['Has daily_reading_minutes'] = Array.isArray(body.daily_reading_minutes);",
"} else {",
" tests['Date range stats failed'] = false;",
"}"
]
}
}
]
},
"req": {
"url": "{{baseUrl}}/api/analytics/reading-stats?start_date=2024-01-01&end_date=2024-01-31",
"method": "GET",
"headers": {
"Authorization": "Bearer {{authToken}}"
}
}
}