Sync-Kobo: - Auto link books endpoint tests - Bulk link books endpoint tests - Get unlinked book suggestions endpoint tests OPDS: - Download book with on-the-fly KEPUB conversion tests All tests cover no user, user, and admin contexts
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
{
|
|
"meta": {
|
|
"name": "Download Book KEPUB (On-the-fly Conversion)",
|
|
"type": "http",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"exec": [
|
|
"// Test format-specific hash header",
|
|
"const kepubHash = resp.headers.get('X-Bookmann-KEPUB-SHA256');",
|
|
"if (kepubHash) {",
|
|
" tests['KEPUB hash present'] = true;",
|
|
" tests['Hash is 64 chars'] = kepubHash.length === 64;",
|
|
"} else {",
|
|
" tests['KEPUB hash present'] = false;",
|
|
"}",
|
|
"",
|
|
"// Verify Bookmann UUID header",
|
|
"const bookmannUUID = resp.headers.get('X-Bookmann-UUID');",
|
|
"tests['Bookmann UUID present'] = bookmannUUID !== null;",
|
|
"",
|
|
"// Verify content type",
|
|
"const contentType = resp.headers.get('Content-Type');",
|
|
"tests['Content-Type is KEPUB'] = contentType && contentType.includes('kepub');"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"req": {
|
|
"url": "{{baseUrl}}/opds/devices/{{deviceId}}/download/{{mediaItemId}}?format=kepub",
|
|
"method": "GET"
|
|
}
|
|
}
|