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
31 lines
841 B
Plaintext
31 lines
841 B
Plaintext
{
|
|
"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}}"
|
|
}
|
|
}
|
|
}
|