testilo 24.1.6 → 24.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -571,7 +571,9 @@ The `digest` module digests a scored report. Its `digest()` function takes three
|
|
|
571
571
|
- a digesting function
|
|
572
572
|
- an array of scored report objects
|
|
573
573
|
|
|
574
|
-
The digest template is an HTML document containing placeholders. A copy of the template, with its placeholders replaced by computed values, becomes the digest. The digesting function defines the rules for replacing the placeholders with values. The Testilo package contains a `procs/digest` directory, in which there are subdirectories containing
|
|
574
|
+
The digest template is an HTML document containing placeholders. A copy of the template, with its placeholders replaced by computed values, becomes the digest. The digesting function defines the rules for replacing the placeholders with values. The Testilo package contains a `procs/digest` directory, in which there are subdirectories, each containing a template and a modules that exports a digesting function. You can use one of those template-module pairs, or you can create your own.
|
|
575
|
+
|
|
576
|
+
The included template-module pairs format placeholders with leading and trailing underscore pairs (such as `__issueCount__`).
|
|
575
577
|
|
|
576
578
|
### Invocation
|
|
577
579
|
|
|
@@ -605,7 +607,7 @@ When a user invokes `digest` in this example, the `call` module:
|
|
|
605
607
|
- gets the reports from the `scored` subdirectory of the `process.env.REPORTDIR` directory.
|
|
606
608
|
- writes the digested reports to the `digested` subdirectory of the `process.env.REPORTDIR` directory.
|
|
607
609
|
|
|
608
|
-
The optional third argument to call (`75m` in this example) is a report selector. Without the argument, `call` gets all the reports in the `scored` subdirectory of the `process.env.REPORTDIR` directory. With the argument, `call` gets only those reports whose names begin with the argument string.
|
|
610
|
+
The optional third argument to `call` (`75m` in this example) is a report selector. Without the argument, `call` gets all the reports in the `scored` subdirectory of the `process.env.REPORTDIR` directory. With the argument, `call` gets only those reports whose names begin with the argument string.
|
|
609
611
|
|
|
610
612
|
The digests created by `digest` are HTML files, and they expect a `style.css` file to exist in their directory. The `reports/digested/style.css` file in Testilo is an appropriate stylesheet to be copied into the directory where digested reports are written.
|
|
611
613
|
|
package/package.json
CHANGED
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
<tr><th>Scored by</th><td>Testilo, procedure <code>__sp__</code></td></tr>
|
|
28
28
|
<tr><th>Digested by</th><td>Testilo, procedure <code>__dp__</code></td></tr>
|
|
29
29
|
<tr>
|
|
30
|
-
<th>Full report</th
|
|
30
|
+
<th>Full report</th>
|
|
31
|
+
<td><a href="__getReportFrom__"><code>__getReportFrom__</code></a></td>
|
|
31
32
|
</tr>
|
|
32
33
|
</table>
|
|
33
34
|
</header>
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
</tbody>
|
|
47
48
|
</table>
|
|
48
49
|
<h2>Itemized issues</h2>
|
|
49
|
-
<p>The reported rule violations are itemized below, issue by issue. Additional details can be inspected in the <a href="
|
|
50
|
+
<p>The reported rule violations are itemized below, issue by issue. Additional details can be inspected in the <a href="__getReportFrom__">full report</a>.</p>
|
|
50
51
|
__issueDetailRows__
|
|
51
52
|
<footer>
|
|
52
53
|
<p class="date">Produced <time itemprop="datePublished" datetime="__dateISO__">__dateSlash__</time></p>
|
|
@@ -25,7 +25,7 @@ const getIssueScoreRow = (summary, wcag, score, tools) => {
|
|
|
25
25
|
};
|
|
26
26
|
// Adds parameters to a query for a digest.
|
|
27
27
|
const populateQuery = (report, query) => {
|
|
28
|
-
const {sources, jobData, score} = report;
|
|
28
|
+
const {getReportFrom, sources, jobData, score} = report;
|
|
29
29
|
const {script, target, requester} = sources;
|
|
30
30
|
const {scoreProcID, summary, details} = score;
|
|
31
31
|
query.ts = script;
|
|
@@ -37,7 +37,7 @@ const populateQuery = (report, query) => {
|
|
|
37
37
|
query.org = target.what;
|
|
38
38
|
query.url = target.which;
|
|
39
39
|
query.requester = requester;
|
|
40
|
-
query.
|
|
40
|
+
query.getReportFrom = getReportFrom || `reports/${report.id}.json`;
|
|
41
41
|
// Add values for the score-summary table to the query.
|
|
42
42
|
const rows = {
|
|
43
43
|
summaryRows: [],
|