@jrpool/kilotest 43.0.2 → 44.0.1
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/aceconfig.js +1 -1
- package/api/getReport.js +1 -1
- package/api/listDiagnoses.js +2 -2
- package/api/listIssues.js +4 -4
- package/api/listReports.js +3 -3
- package/api/listViolators.js +3 -3
- package/api/requestRetest.js +3 -3
- package/api/requestTest.js +3 -3
- package/docs/AI-TOOLS.md +2 -2
- package/docs/SERVICE.md +5 -5
- package/index.html +2 -2
- package/index.js +31 -30
- package/llms-full.txt +8 -8
- package/llms.txt +7 -7
- package/package.json +1 -1
- package/robots.txt +8 -8
- package/sitemap.xml +3 -3
- package/util.js +25 -25
- package/web/{testOrder → enqueue}/index.js +6 -4
- package/web/{recActionForm → enqueueForm}/index.html +1 -1
- package/web/{recActionForm → enqueueForm}/index.js +1 -1
- package/web/{reportsExpungeForm → expungeReportsForm}/index.html +1 -1
- package/web/{reportsExpungeForm → expungeReportsForm}/index.js +4 -4
- package/web/{reportHideForm → hideReportForm}/index.html +1 -1
- package/web/{diagnoses → listDiagnoses}/index.js +7 -5
- package/web/{reportIssues → listIssues}/index.html +1 -1
- package/web/{reportIssues → listIssues}/index.js +12 -12
- package/web/{targets → listReports}/index.html +1 -1
- package/web/{targets → listReports}/index.js +11 -11
- package/web/{rules → listRules}/index.js +1 -1
- package/web/{issues → listTopIssues}/index.js +4 -4
- package/web/{reportIssue → listViolators}/index.js +6 -6
- package/web/manage/index.html +7 -7
- package/web/manage/index.js +1 -1
- package/web/{reportsPruneForm → pruneReportsForm}/index.html +1 -1
- package/web/{reportsPruneForm → pruneReportsForm}/index.js +4 -4
- package/web/reannotate/index.js +1 -1
- package/web/reannotateForm/index.js +11 -11
- package/web/{wcagRenew → renewWCAG}/index.js +1 -1
- package/web/{wcagRenewForm → renewWCAGForm}/index.html +1 -1
- package/web/{retestRec → requestRetest}/index.html +1 -1
- package/web/{retestRec → requestRetest}/index.js +4 -5
- package/web/{retestRecForm → requestRetestForm}/index.html +2 -2
- package/web/{retestRecForm → requestRetestForm}/index.js +1 -1
- package/web/{testRec → requestTest}/index.html +1 -1
- package/web/{testRec → requestTest}/index.js +5 -6
- package/web/{testRecForm → requestTestForm}/index.html +1 -1
- package/web/{testRecForm → requestTestForm}/index.js +2 -3
- package/web/{reportsRewindForm → rewindReportsForm}/index.html +1 -1
- package/web/{reportsRewindForm → rewindReportsForm}/index.js +4 -4
- package/web/tutorial/index.html +1 -1
- package/web/tutorial/index.js +1 -1
- package/web/{reportUnhideForm → unhideReportForm}/index.html +1 -1
- /package/web/{testOrder → enqueue}/index.html +0 -0
- /package/web/{reportHideForm → hideReportForm}/index.js +0 -0
- /package/web/{diagnoses → listDiagnoses}/index.html +0 -0
- /package/web/{rules → listRules}/index.html +0 -0
- /package/web/{issues → listTopIssues}/index.html +0 -0
- /package/web/{reportIssue → listViolators}/index.html +0 -0
- /package/web/{wcagRenew → renewWCAG}/index.html +0 -0
- /package/web/{wcagRenewForm → renewWCAGForm}/index.js +0 -0
- /package/web/{reportUnhideForm → unhideReportForm}/index.js +0 -0
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<main>
|
|
15
15
|
<h1><a href="/">Kilotest</a>: Recommendation approval or rejection</h1>
|
|
16
16
|
<p>To approve a test or retest recommendation, check its recommended page name.</p>
|
|
17
|
-
<p>To approve testing a page that is not yet recommended, first <a href="
|
|
17
|
+
<p>To approve testing a page that is not yet recommended, first <a href="listReports.html">recommend it</a>.</p>
|
|
18
18
|
<p>To reject all recommendations for a page, check the radio button of its URL.</p>
|
|
19
19
|
<form action="/recAction.html" method="post">
|
|
20
20
|
<fieldset>
|
|
@@ -54,7 +54,7 @@ exports.answer = async (_, search) => {
|
|
|
54
54
|
const [timeStamp, jobID] = reportName.slice(0, -5).split('-');
|
|
55
55
|
// Get a summary of it.
|
|
56
56
|
const reportFacts = await getReportData(timeStamp, jobID);
|
|
57
|
-
const {error, issueCount,
|
|
57
|
+
const {error, issueCount, preventedEngineCount, url} = reportFacts;
|
|
58
58
|
// If this failed:
|
|
59
59
|
if (error) {
|
|
60
60
|
// Return why.
|
|
@@ -67,7 +67,7 @@ exports.answer = async (_, search) => {
|
|
|
67
67
|
timeStamp,
|
|
68
68
|
jobID,
|
|
69
69
|
issueCount,
|
|
70
|
-
|
|
70
|
+
preventedEngineCount,
|
|
71
71
|
url
|
|
72
72
|
});
|
|
73
73
|
}
|
|
@@ -79,9 +79,9 @@ exports.answer = async (_, search) => {
|
|
|
79
79
|
let anyDeletable = false;
|
|
80
80
|
// For each summary:
|
|
81
81
|
reportSpecs.forEach((spec, index) => {
|
|
82
|
-
const {timeStamp, jobID, issueCount,
|
|
82
|
+
const {timeStamp, jobID, issueCount, preventedEngineCount, url} = spec;
|
|
83
83
|
const jobName = `${timeStamp}-${jobID}`;
|
|
84
|
-
const specString = `<code>${url}</code> (<code>${jobName}</code>): preventions ${
|
|
84
|
+
const specString = `<code>${url}</code> (<code>${jobName}</code>): preventions ${preventedEngineCount}, issues ${issueCount}`;
|
|
85
85
|
// If its report is the sole report on a target:
|
|
86
86
|
if (reportSpecs[index - 1]?.url !== url && reportSpecs[index + 1]?.url !== url) {
|
|
87
87
|
// Add a line with a deletion checkbox.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<main>
|
|
15
15
|
<h1><a href="/">Kilotest</a>: Classify report as experimental</h1>
|
|
16
16
|
<p>Choose a report to classify as experimental.</p>
|
|
17
|
-
<form action="/
|
|
17
|
+
<form action="/hideReportForm.html">
|
|
18
18
|
<fieldset>
|
|
19
19
|
<legend>Reports</legend>
|
|
20
20
|
__reports__
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
index.js
|
|
3
|
-
|
|
3
|
+
Lists the diagnoses of a violator of an issue in a report.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// IMPORTS
|
|
@@ -13,7 +13,7 @@ const {
|
|
|
13
13
|
getWeightName,
|
|
14
14
|
htmlSafe,
|
|
15
15
|
isHidden,
|
|
16
|
-
|
|
16
|
+
ruleEngines
|
|
17
17
|
} = require('../../util');
|
|
18
18
|
const {issues: issueSpecs} = require('testaro-issues');
|
|
19
19
|
const fs = require('fs/promises');
|
|
@@ -107,7 +107,7 @@ const populateQuery = async (issueID, timeStamp, jobID, catalogIndex, pathID, qu
|
|
|
107
107
|
const {ruleID, what} = instance;
|
|
108
108
|
// Add lines for it to the array.
|
|
109
109
|
diagnoses.push({
|
|
110
|
-
|
|
110
|
+
engineID: which,
|
|
111
111
|
ruleID,
|
|
112
112
|
what
|
|
113
113
|
});
|
|
@@ -115,10 +115,12 @@ const populateQuery = async (issueID, timeStamp, jobID, catalogIndex, pathID, qu
|
|
|
115
115
|
});
|
|
116
116
|
// For each diagnosis:
|
|
117
117
|
diagnoses.forEach(diagnosis => {
|
|
118
|
-
const {
|
|
118
|
+
const {engineID, ruleID, what} = diagnosis;
|
|
119
119
|
// Add lines.
|
|
120
120
|
lines.push(`${margin}<li>${htmlSafe(what)}`);
|
|
121
|
-
lines.push(
|
|
121
|
+
lines.push(
|
|
122
|
+
`${margin} <p>Rule engine: ${ruleEngines[engineID][0]} (${ruleEngines[engineID][1]})</p>`
|
|
123
|
+
);
|
|
122
124
|
if (ruleID !== what) {
|
|
123
125
|
lines.push(`${margin} <p>Rule: <code>${ruleID}</code></p>`);
|
|
124
126
|
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<li>__testInfo__</li>
|
|
20
20
|
__preventions__
|
|
21
21
|
</ul>
|
|
22
|
-
<p><a href="/
|
|
22
|
+
<p><a href="/requestRetestForm.html/__timeStamp__/__jobID__">Should Kilotest retest the page?</a></p>
|
|
23
23
|
<h2>Issues reported</h2>
|
|
24
24
|
<h3>Summary</h3>
|
|
25
25
|
<p>__reporterCount__ reported issues (__reporters__)</p>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
index.js
|
|
3
|
-
|
|
3
|
+
List the issues in a report.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// IMPORTS
|
|
@@ -9,14 +9,14 @@ const {
|
|
|
9
9
|
getPageData,
|
|
10
10
|
getPageDataStrings,
|
|
11
11
|
getReport,
|
|
12
|
-
|
|
12
|
+
getEngineList,
|
|
13
13
|
getWCAGLink,
|
|
14
14
|
getWeightName,
|
|
15
15
|
htmlSafe,
|
|
16
16
|
isHidden,
|
|
17
17
|
isValidReport,
|
|
18
18
|
objectSort,
|
|
19
|
-
|
|
19
|
+
ruleEngines
|
|
20
20
|
} = require('../../util');
|
|
21
21
|
const {issues: issueSpecs} = require('testaro-issues');
|
|
22
22
|
const fs = require('fs/promises');
|
|
@@ -82,7 +82,7 @@ const getIssuesData = async (timeStamp, jobID) => {
|
|
|
82
82
|
reporterList: '',
|
|
83
83
|
violators: new Set()
|
|
84
84
|
};
|
|
85
|
-
// Ensure the
|
|
85
|
+
// Ensure the rule engine is in the temporary data.
|
|
86
86
|
temp.issues[issueID].reporters.add(which);
|
|
87
87
|
temp.reporters.add(which);
|
|
88
88
|
// If the instance has a catalog index:
|
|
@@ -97,7 +97,7 @@ const getIssuesData = async (timeStamp, jobID) => {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
// Finish populating the final data.
|
|
100
|
-
final.reporterList =
|
|
100
|
+
final.reporterList = getEngineList(temp.reporters);
|
|
101
101
|
final.reporterCount = temp.reporters.size;
|
|
102
102
|
final.violatorCount = temp.violators.size;
|
|
103
103
|
Object.values(temp.issues).forEach(issue => {
|
|
@@ -109,7 +109,7 @@ const getIssuesData = async (timeStamp, jobID) => {
|
|
|
109
109
|
why,
|
|
110
110
|
weight
|
|
111
111
|
};
|
|
112
|
-
finalIssue.reporterList =
|
|
112
|
+
finalIssue.reporterList = getEngineList(issue.reporters);
|
|
113
113
|
finalIssue.reporterCount = issue.reporters.size;
|
|
114
114
|
finalIssue.violatorCount = issue.violators.size;
|
|
115
115
|
final.issues[issue.weight].push(finalIssue);
|
|
@@ -183,11 +183,11 @@ const populateQuery = async (timeStamp, jobID, query) => {
|
|
|
183
183
|
// Initialize strings for the prevention notices query property.
|
|
184
184
|
const preventionStrings = [];
|
|
185
185
|
const margin = ' '.repeat(6);
|
|
186
|
-
Object.keys(preventions).forEach(
|
|
187
|
-
const
|
|
188
|
-
const
|
|
189
|
-
const causeString = htmlSafe(preventions[
|
|
190
|
-
const preventionString = `${margin}<li>Page not testable by ${
|
|
186
|
+
Object.keys(preventions).forEach(preventedEngineID => {
|
|
187
|
+
const engineName = ruleEngines[preventedEngineID];
|
|
188
|
+
const engineNameString = `${engineName[0]} (${engineName[1]})`;
|
|
189
|
+
const causeString = htmlSafe(preventions[preventedEngineID]);
|
|
190
|
+
const preventionString = `${margin}<li>Page not testable by ${engineNameString}: ${causeString}</li>`;
|
|
191
191
|
preventionStrings.push(preventionString);
|
|
192
192
|
});
|
|
193
193
|
// Add prevention notices to the query.
|
|
@@ -252,7 +252,7 @@ const populateQuery = async (timeStamp, jobID, query) => {
|
|
|
252
252
|
detailsLines.push(`${margin} <ul class="nav">`);
|
|
253
253
|
const whereQuestionString = 'Where was the issue found?';
|
|
254
254
|
const labelString = `Where was the ${summary} issue found on the ${what} page?`;
|
|
255
|
-
const href = `href="/
|
|
255
|
+
const href = `href="/listViolators.html/${issueID}/${timeStamp}/${jobID}"`;
|
|
256
256
|
const label = `aria-label="${labelString}"`;
|
|
257
257
|
const whereLink = `<a ${href} ${label}>${whereQuestionString}</a>`;
|
|
258
258
|
// Add a violations link to the lines.
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
__recs__
|
|
19
19
|
</ol>
|
|
20
20
|
<p>__noRecs__</p>
|
|
21
|
-
<p>Should Kilotest <a href="
|
|
21
|
+
<p>Should Kilotest <a href="requestTestForm.html">test a page</a> that is not listed below?</p>
|
|
22
22
|
<h2>Queued for testing</h2>
|
|
23
23
|
<ol>
|
|
24
24
|
__queue__
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
index.js
|
|
3
|
-
|
|
3
|
+
Lists all available reports.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// IMPORTS
|
|
@@ -51,7 +51,7 @@ const populateQuery = async query => {
|
|
|
51
51
|
query.recs = lines.recs.join('\n');
|
|
52
52
|
// Add a no-recommendations message, if applicable, to the query.
|
|
53
53
|
query.noRecs = lines.recs.length
|
|
54
|
-
? 'Kilotest managers can <a href="
|
|
54
|
+
? 'Kilotest managers can <a href="enqueueForm.html">approve or reject a recommendation</a>.'
|
|
55
55
|
: 'No recommendations await approval now.';
|
|
56
56
|
// Get the file names of all queued and claimed jobs.
|
|
57
57
|
const jobFileNames = await getJobNames();
|
|
@@ -90,8 +90,8 @@ const populateQuery = async query => {
|
|
|
90
90
|
const {
|
|
91
91
|
error,
|
|
92
92
|
issueCount,
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
preventedEngineCount,
|
|
94
|
+
preventedEngineNames,
|
|
95
95
|
reporterNames,
|
|
96
96
|
reporterCount,
|
|
97
97
|
violatorCount
|
|
@@ -116,16 +116,16 @@ const populateQuery = async query => {
|
|
|
116
116
|
lines.tested.push(`${margin} <li>URL: ${urlLink}</li>`);
|
|
117
117
|
// Add facts about the report to the lines.
|
|
118
118
|
lines.tested.push(`${margin} <li>${testInfo}</li>`);
|
|
119
|
-
// If the page prevented any
|
|
120
|
-
if (
|
|
119
|
+
// If the page prevented any rule engine from performing its tests:
|
|
120
|
+
if (preventedEngineCount) {
|
|
121
121
|
// Add this to the lines.
|
|
122
|
-
const
|
|
122
|
+
const engineCountString = getCountString(preventedEngineCount, 'rule engine', 'rule engines');
|
|
123
123
|
lines.tested.push(
|
|
124
|
-
`${margin} <li>Page not testable by ${
|
|
124
|
+
`${margin} <li>Page not testable by ${engineCountString} (${preventedEngineNames.join(' + ')})</li>`,
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
127
|
// Add facts about the test results to the lines.
|
|
128
|
-
let reporterString = `${getCountString(reporterCount, '
|
|
128
|
+
let reporterString = `${getCountString(reporterCount, 'rule engine', 'rule engines')} reported issues`;
|
|
129
129
|
if (reporterCount) {
|
|
130
130
|
const reporterNamesString = reporterNames.join(' + ');
|
|
131
131
|
reporterString = `${reporterString} (${reporterNamesString})`;
|
|
@@ -140,7 +140,7 @@ const populateQuery = async query => {
|
|
|
140
140
|
// If any issues were reported:
|
|
141
141
|
if (issueCount) {
|
|
142
142
|
// Add a question link about the reported issues to the lines.
|
|
143
|
-
const href = `href="
|
|
143
|
+
const href = `href="listIssues.html/${timeStamp}/${jobID}"`;
|
|
144
144
|
const label = `aria-label="What ${issueCountString} reported for the ${what} page?"`;
|
|
145
145
|
const questionString = issueCount === 1 ? 'was the issue' : 'were the issues';
|
|
146
146
|
const link = `<a ${href} ${label}>What ${questionString}?</a>`;
|
|
@@ -156,7 +156,7 @@ const populateQuery = async query => {
|
|
|
156
156
|
retestString = 'Currently in the queue for retesting';
|
|
157
157
|
}
|
|
158
158
|
else {
|
|
159
|
-
const href = `/
|
|
159
|
+
const href = `/requestRetestForm.html/${timeStamp}/${jobID}`;
|
|
160
160
|
const retestContent = 'Should Kilotest retest the page?';
|
|
161
161
|
retestString = `<a href="${href}">${retestContent}</a>`;
|
|
162
162
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*
|
|
2
2
|
index.js
|
|
3
|
-
|
|
3
|
+
Lists the most commonly reported issues in all available latest reports.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// IMPORTS
|
|
7
7
|
|
|
8
8
|
const {sendAlert} = require('../../alerts');
|
|
9
9
|
const {
|
|
10
|
+
getEngineNamesString,
|
|
10
11
|
getLatestReportExtracts,
|
|
11
12
|
getReport,
|
|
12
|
-
getToolNamesString,
|
|
13
13
|
getWCAGLink,
|
|
14
14
|
getWeightName,
|
|
15
15
|
objectSort,
|
|
@@ -78,7 +78,7 @@ const getIssuesSummary = async () => {
|
|
|
78
78
|
weight: issueSpecs[issueID].weight,
|
|
79
79
|
count,
|
|
80
80
|
percentage: 0,
|
|
81
|
-
reporters:
|
|
81
|
+
reporters: getEngineNamesString(reporters)
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
// Otherwise, i.e. if it is no longer classified:
|
|
@@ -143,7 +143,7 @@ const populateQuery = async query => {
|
|
|
143
143
|
lines.push(`${margin} <ul class="nav">`);
|
|
144
144
|
const linkText = 'What rules belong to this issue?';
|
|
145
145
|
const label = `What rules belong to the <q>${summary}</q> issue?`;
|
|
146
|
-
const href = `/
|
|
146
|
+
const href = `/listRules.html/${issueID}`;
|
|
147
147
|
lines.push(
|
|
148
148
|
`${margin} <li><a href="${href}" aria-label="${label}">${linkText}</a></li>`
|
|
149
149
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
index.js
|
|
3
|
-
|
|
3
|
+
Lists the violators of an issue in a report.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// IMPORTS
|
|
@@ -9,7 +9,7 @@ const {
|
|
|
9
9
|
getPageDataStrings,
|
|
10
10
|
getPathID,
|
|
11
11
|
getReport,
|
|
12
|
-
|
|
12
|
+
getEngineNamesString,
|
|
13
13
|
getTextFragmentHref,
|
|
14
14
|
getWCAGLink,
|
|
15
15
|
getWeightName,
|
|
@@ -92,7 +92,7 @@ const populateQuery = async (issueID, timeStamp, jobID, query) => {
|
|
|
92
92
|
text: catalog[catalogIndex]?.text ?? '',
|
|
93
93
|
reporters: new Set()
|
|
94
94
|
};
|
|
95
|
-
// Ensure that the
|
|
95
|
+
// Ensure that the rule engine is in the sets of reporters of the violator and the issue.
|
|
96
96
|
violators[catalogIndex].reporters.add(which);
|
|
97
97
|
query.reporters.add(which);
|
|
98
98
|
});
|
|
@@ -103,12 +103,12 @@ const populateQuery = async (issueID, timeStamp, jobID, query) => {
|
|
|
103
103
|
// For each violator:
|
|
104
104
|
Object.values(violators).forEach(violatorData => {
|
|
105
105
|
// Convert the set of its reporters to a string.
|
|
106
|
-
violatorData.reporters =
|
|
106
|
+
violatorData.reporters = getEngineNamesString(violatorData.reporters);
|
|
107
107
|
});
|
|
108
108
|
const reporterCount = query.reporters.size;
|
|
109
109
|
query.reporterCount = reporterCount === 1 ? '1 rule engine' : `${reporterCount} rule engines`;
|
|
110
110
|
// Convert the set of issue reporters to a string.
|
|
111
|
-
query.reporters =
|
|
111
|
+
query.reporters = getEngineNamesString(query.reporters);
|
|
112
112
|
// Convert the violator data to an array.
|
|
113
113
|
violators = Object.entries(violators).map(entry => ({
|
|
114
114
|
catalogIndex: entry[0],
|
|
@@ -151,7 +151,7 @@ const populateQuery = async (issueID, timeStamp, jobID, query) => {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
const href
|
|
154
|
-
= `/
|
|
154
|
+
= `/listDiagnoses.html/${issueID}/${timeStamp}/${jobID}/${catalogIndex}?pathID=${pathID}`;
|
|
155
155
|
const questionString = 'What diagnoses were reported';
|
|
156
156
|
const labelString = `${questionString} for violator ${index + 1}?`;
|
|
157
157
|
lines.push(
|
package/web/manage/index.html
CHANGED
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
<h1><a href="/">Kilotest</a> management</h1>
|
|
16
16
|
<p>Kilotest managers can:</p>
|
|
17
17
|
<ul class="nav">
|
|
18
|
-
<li><a href="/
|
|
18
|
+
<li><a href="/enqueueForm.html">Approve or reject a test recommendation</a></li>
|
|
19
19
|
<li><a href="/reannotateForm.html">
|
|
20
20
|
Reannotate reports to incorporate newly classified and reclassified rules
|
|
21
21
|
</a></li>
|
|
22
|
-
<li><a href="/
|
|
23
|
-
<li><a href="/
|
|
24
|
-
<li><a href="/
|
|
25
|
-
<li><a href="/
|
|
26
|
-
<li><a href="/
|
|
22
|
+
<li><a href="/pruneReportsForm.html">Delete superseded reports</a></li>
|
|
23
|
+
<li><a href="/rewindReportsForm.html">Delete latest superseding reports</a></li>
|
|
24
|
+
<li><a href="/expungeReportsForm.html">Delete sole reports</a></li>
|
|
25
|
+
<li><a href="/hideReportForm.html">Classify a report as experimental</a></li>
|
|
26
|
+
<li><a href="/unhideReportForm.html">Declassify a report as experimental</a></li>
|
|
27
27
|
<li><a href="/ai0BalanceForm.html">Record the current balance of AI service 0</a></li>
|
|
28
|
-
<li><a href="/
|
|
28
|
+
<li><a href="/renewWCAGForm.html">Renew the map of WCAG numeric to text identifiers</a></li>
|
|
29
29
|
</ul>
|
|
30
30
|
</main>
|
|
31
31
|
</body>
|
package/web/manage/index.js
CHANGED
|
@@ -55,7 +55,7 @@ exports.answer = async (_, search) => {
|
|
|
55
55
|
const [timeStamp, jobID] = reportName.slice(0, -5).split('-');
|
|
56
56
|
// Get a summary of it.
|
|
57
57
|
const reportFacts = await getReportData(timeStamp, jobID);
|
|
58
|
-
const {error, issueCount,
|
|
58
|
+
const {error, issueCount, preventedEngineCount, url} = reportFacts;
|
|
59
59
|
// If this failed:
|
|
60
60
|
if (error) {
|
|
61
61
|
// Return why.
|
|
@@ -69,7 +69,7 @@ exports.answer = async (_, search) => {
|
|
|
69
69
|
timeStamp,
|
|
70
70
|
jobID,
|
|
71
71
|
issueCount,
|
|
72
|
-
|
|
72
|
+
preventedEngineCount,
|
|
73
73
|
url
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -85,9 +85,9 @@ exports.answer = async (_, search) => {
|
|
|
85
85
|
let anyDeletable = false;
|
|
86
86
|
// For each summary:
|
|
87
87
|
reportSpecs.forEach((spec, index) => {
|
|
88
|
-
const {timeStamp, jobID, issueCount,
|
|
88
|
+
const {timeStamp, jobID, issueCount, preventedEngineCount, url} = spec;
|
|
89
89
|
const jobName = `${timeStamp}-${jobID}`;
|
|
90
|
-
const specString = `<code>${url}</code> (<code>${jobName}</code>): preventions ${
|
|
90
|
+
const specString = `<code>${url}</code> (<code>${jobName}</code>): preventions ${preventedEngineCount}, issues ${issueCount}`;
|
|
91
91
|
// If its report is a non-latest report:
|
|
92
92
|
if (reportSpecs[index + 1]?.url === url) {
|
|
93
93
|
// Add a line with a deletion checkbox.
|
package/web/reannotate/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
index.js
|
|
3
|
-
|
|
3
|
+
Serves a form to reannotate reports.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// IMPORTS
|
|
@@ -62,27 +62,27 @@ const populateQuery = async query => {
|
|
|
62
62
|
const stillUnclassifiedLines = [];
|
|
63
63
|
const reClassifiedLines = [];
|
|
64
64
|
const margin = ' '.repeat(6);
|
|
65
|
-
// For each
|
|
66
|
-
Object.keys(stillUnclassified).forEach(
|
|
65
|
+
// For each rule engine reporting any violations of still unclassified rules:
|
|
66
|
+
Object.keys(stillUnclassified).forEach(engineID => {
|
|
67
67
|
// For each such rule:
|
|
68
|
-
Object.keys(stillUnclassified[
|
|
69
|
-
const reportIDs = Array.from(stillUnclassified[
|
|
68
|
+
Object.keys(stillUnclassified[engineID]).forEach(ruleID => {
|
|
69
|
+
const reportIDs = Array.from(stillUnclassified[engineID][ruleID]);
|
|
70
70
|
// Add a line to the lines on the rule.
|
|
71
71
|
stillUnclassifiedLines.push(
|
|
72
|
-
`${margin}<li>${
|
|
72
|
+
`${margin}<li>${engineID}: ${ruleID} (${reportIDs.join(', ')})</li>`
|
|
73
73
|
);
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
// Add the lines to the query.
|
|
77
77
|
query.stillUnclassified = stillUnclassifiedLines.join('\n');
|
|
78
|
-
// For each
|
|
79
|
-
Object.keys(reClassified).forEach(
|
|
78
|
+
// For each rule engine reporting any discrepancies in rule classification:
|
|
79
|
+
Object.keys(reClassified).forEach(engineID => {
|
|
80
80
|
// For each such rule:
|
|
81
|
-
Object.keys(reClassified[
|
|
82
|
-
const reportIDs = Array.from(reClassified[
|
|
81
|
+
Object.keys(reClassified[engineID]).forEach(ruleID => {
|
|
82
|
+
const reportIDs = Array.from(reClassified[engineID][ruleID]);
|
|
83
83
|
// Add a line to the lines on the rule.
|
|
84
84
|
reClassifiedLines.push(
|
|
85
|
-
`${margin}<li>${
|
|
85
|
+
`${margin}<li>${engineID}: ${ruleID} (${reportIDs.join(', ')})</li>`
|
|
86
86
|
);
|
|
87
87
|
});
|
|
88
88
|
});
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<main>
|
|
15
15
|
<h1><a href="/">Kilotest</a>: Renew WCAG map</h1>
|
|
16
16
|
<p>Submit this form to renew the map of WCAG numeric to text identifiers.</p>
|
|
17
|
-
<form action="/
|
|
17
|
+
<form action="/renewWCAG.html" method="post">
|
|
18
18
|
<p><label>
|
|
19
19
|
Authorization code: <input size="3" minLength="3" maxlength="3" name="authCode" required>
|
|
20
20
|
</label></p>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<p>Your recommendation to retest the __target__ page has been received.</p>
|
|
17
17
|
<p>The reason for your recommendation has been recorded as <q>__why__</q>.</p>
|
|
18
18
|
<p>Thank you for your recommendation.</p>
|
|
19
|
-
<p>If a <a href="/
|
|
19
|
+
<p>If a <a href="/enqueueForm.html">Kilotest manager approves this recommendation</a>, a test order will be added to the queue.</p>
|
|
20
20
|
<p>In most cases, if you check Kilotest again in 1 day, you will find that the recommended test has been performed.</p>
|
|
21
21
|
</main>
|
|
22
22
|
</body>
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/*
|
|
2
2
|
index.js
|
|
3
|
-
|
|
3
|
+
Records a retest request.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// IMPORTS
|
|
7
7
|
|
|
8
|
-
const {getLatestReportExtracts,
|
|
8
|
+
const {getLatestReportExtracts, processTestRequest} = require('../../util');
|
|
9
9
|
|
|
10
10
|
// FUNCTIONS
|
|
11
11
|
|
|
12
|
-
// Records a retest recommendation and returns an acknowledgement page.
|
|
13
12
|
exports.answer = async (pageArgs, why) => {
|
|
14
13
|
const [timeStamp, jobID] = pageArgs.split('/');
|
|
15
14
|
// Get data on the latest available reports.
|
|
@@ -27,6 +26,6 @@ exports.answer = async (pageArgs, why) => {
|
|
|
27
26
|
message: error
|
|
28
27
|
};
|
|
29
28
|
}
|
|
30
|
-
// Otherwise, i.e. if it succeeded, process the
|
|
31
|
-
return await
|
|
29
|
+
// Otherwise, i.e. if it succeeded, process the request.
|
|
30
|
+
return await processTestRequest('retest', __dirname, what, url, why);
|
|
32
31
|
};
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
<body>
|
|
14
14
|
<main>
|
|
15
15
|
<h1><a href="/">Kilotest</a>: Retest recommendation for __target__</h1>
|
|
16
|
-
<p>The __target__ page was <a href="/
|
|
16
|
+
<p>The __target__ page was <a href="/listIssues.html/__timeStamp__/__jobID__">last tested</a> __ago__ ago by job <code>__jobID__</code> on __dateTime__.</p>
|
|
17
17
|
<p>To recommend a retest, submit the following form.</p>
|
|
18
|
-
<form action="/
|
|
18
|
+
<form action="/requestRetest.html/__timeStamp__/__jobID__" method="post">
|
|
19
19
|
<p><label>
|
|
20
20
|
Why retest the page (answer required)?<br>
|
|
21
21
|
<input size="70" minlength="5" maxlength="100" name="why" required>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<p>Your recommendation to test the __target__ page has been received.</p>
|
|
17
17
|
<p>The reason for your recommendation has been recorded as <q>__why__</q>.</p>
|
|
18
18
|
<p>Thank you for your recommendation.</p>
|
|
19
|
-
<p>If a <a href="/
|
|
19
|
+
<p>If a <a href="/enqueueForm.html">Kilotest manager approves this recommendation</a>, a test order will be added to the queue.</p>
|
|
20
20
|
<p>In most cases, if you check Kilotest again in 1 day, you will find that the recommended job has been performed.</p>
|
|
21
21
|
</main>
|
|
22
22
|
</body>
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
/*
|
|
2
2
|
index.js
|
|
3
|
-
|
|
3
|
+
Records a test request.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// IMPORTS
|
|
7
7
|
|
|
8
|
-
const {isRecommendable,
|
|
8
|
+
const {isRecommendable, processTestRequest} = require('../../util');
|
|
9
9
|
|
|
10
10
|
// FUNCTIONS
|
|
11
11
|
|
|
12
|
-
// Records a test recommendation and returns an acknowledgement page.
|
|
13
12
|
exports.answer = async (what, url, why) => {
|
|
14
13
|
const status = await isRecommendable(url);
|
|
15
|
-
// If the target is already claimed or queued and is thus not
|
|
14
|
+
// If the target is already claimed or queued and is thus not requestable:
|
|
16
15
|
if (status) {
|
|
17
16
|
// Return an answer reporting this.
|
|
18
17
|
return {
|
|
@@ -20,6 +19,6 @@ exports.answer = async (what, url, why) => {
|
|
|
20
19
|
message: `Page is already ${status}`
|
|
21
20
|
};
|
|
22
21
|
}
|
|
23
|
-
// Otherwise, i.e. if it is
|
|
24
|
-
return await
|
|
22
|
+
// Otherwise, i.e. if it is requestable, process the request.
|
|
23
|
+
return await processTestRequest('test', __dirname, what, url, why);
|
|
25
24
|
};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<main>
|
|
15
15
|
<h1><a href="/">Kilotest</a>: Test recommendation</h1>
|
|
16
16
|
<p>You may recommend a web page for testing by submitting the following form. All answers are required.</p>
|
|
17
|
-
<form action="/
|
|
17
|
+
<form action="/requestTest.html" method="post">
|
|
18
18
|
<p><label>
|
|
19
19
|
Propose a name for the page.<br>
|
|
20
20
|
<input size="50" maxlength="70" name="what" required>
|