daisy / daisy/ace

Inconsistent test subject URLs in JSON report

Open
#463 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
98
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Hi,

The files in an EPUB are (truncated):
```
mimetype
META-INF/container.xml
OPS/nav.xhtml
OPS/package.opf
OPS/xhtml/Sources.html
...
```
Those same files, with this or that failing issue, are reported as follows (truncated):
```json
"assertions": [
{
"@type": "earl:assertion",
...
"earl:testSubject": {
"url": "/OPS/nav.xhtml"
}
},
{
"@type": "earl:assertion",
...
"earl:testSubject": {
"url": "OPS/package.opf",
}
},
{
"@type": "earl:assertion",
...
"earl:testSubject": {
"url": "xhtml/Sources.html",
}
},
{
"@type": "earl:assertion",
...
"earl:testSubject": {
"url": "nav.xhtml",
}
},
...
]
```
Note how the `"url"` path sometimes does, sometimes does not contain the `OPS/` root folder. This makes tooling and automation a bit difficult, and should be fixed.

Cheers.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the JSON report generation for EPUB entries and compare how the paths in earl:testSubject.url are constructed for nav.xhtml, package.opf, and xhtml/Sources.html. Done means every reported URL uses one consistent path-root convention, so tooling can process the report without special cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.