testaro 55.5.13 → 56.0.0
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/actSpecs.js +1 -1
- package/package.json +1 -1
- package/procs/doTestAct.js +2 -2
- package/procs/isInlineLink.js +9 -26
- package/run.js +4 -0
- package/testaro/focVis.js +21 -26
- package/tests/testaro.js +2 -1
- package/validation/done/README.md +1 -1
- package/validation/tests/{jobs → jobProperties}/allCaps.json +6 -13
- package/validation/tests/{jobs → jobProperties}/allHidden.json +6 -13
- package/validation/tests/{jobs → jobProperties}/allSlanted.json +6 -13
- package/validation/tests/{jobs → jobProperties}/attVal.json +6 -13
- package/validation/tests/{jobs → jobProperties}/autocomplete.json +6 -13
- package/validation/tests/{jobs → jobProperties}/bulk.json +6 -13
- package/validation/tests/{jobs → jobProperties}/buttonMenu.json +6 -13
- package/validation/tests/{jobs → jobProperties}/distortion.json +6 -13
- package/validation/tests/{jobs → jobProperties}/docType.json +6 -13
- package/validation/tests/{jobs → jobProperties}/dupAtt.json +6 -13
- package/validation/tests/{jobs → jobProperties}/elements.json +6 -12
- package/validation/tests/{jobs → jobProperties}/embAc.json +6 -13
- package/validation/tests/{jobs → jobProperties}/focAll.json +6 -13
- package/validation/tests/{jobs → jobProperties}/focInd.json +6 -13
- package/validation/tests/{jobs → jobProperties}/focOp.json +6 -13
- package/validation/tests/{jobs → jobProperties}/focVis.json +6 -13
- package/validation/tests/{jobs → jobProperties}/headEl.json +6 -13
- package/validation/tests/{jobs → jobProperties}/headingAmb.json +6 -13
- package/validation/tests/{jobs → jobProperties}/hovInd.json +6 -13
- package/validation/tests/{jobs → jobProperties}/hover.json +6 -13
- package/validation/tests/{jobs → jobProperties}/hr.json +6 -13
- package/validation/tests/{jobs → jobProperties}/labClash.json +6 -13
- package/validation/tests/{jobs → jobProperties}/lineHeight.json +6 -13
- package/validation/tests/{jobs → jobProperties}/linkAmb.json +8 -17
- package/validation/tests/{jobs → jobProperties}/linkExt.json +6 -13
- package/validation/tests/{jobs → jobProperties}/linkOldAtt.json +6 -13
- package/validation/tests/{jobs → jobProperties}/linkTitle.json +6 -13
- package/validation/tests/{jobs → jobProperties}/linkTo.json +6 -13
- package/validation/tests/{jobs → jobProperties}/linkUl.json +17 -24
- package/validation/tests/{jobs → jobProperties}/miniText.json +6 -13
- package/validation/tests/{jobs → jobProperties}/motion.json +6 -13
- package/validation/tests/{jobs → jobProperties}/nonTable.json +6 -13
- package/validation/tests/{jobs → jobProperties}/opFoc.json +6 -13
- package/validation/tests/{jobs → jobProperties/pending}/adbID.json +6 -13
- package/validation/tests/{jobs → jobProperties/pending}/altScheme.json +6 -13
- package/validation/tests/{jobs → jobProperties/pending}/captionLoc.json +6 -13
- package/validation/tests/{jobs → jobProperties/pending}/datalistRef.json +6 -13
- package/validation/tests/{jobs → jobProperties/pending}/imageLink.json +6 -13
- package/validation/tests/{jobs → jobProperties/pending}/legendLoc.json +6 -13
- package/validation/tests/{jobs → jobProperties/pending}/optRoleSel.json +6 -13
- package/validation/tests/{jobs → jobProperties/pending}/phOnly.json +6 -13
- package/validation/tests/{jobs → jobProperties/pending}/secHeading.json +6 -13
- package/validation/tests/{jobs → jobProperties/pending}/textSem.json +6 -13
- package/validation/tests/{jobs → jobProperties}/pseudoP.json +6 -13
- package/validation/tests/{jobs → jobProperties}/radioSet.json +6 -13
- package/validation/tests/{jobs → jobProperties}/role.json +6 -13
- package/validation/tests/{jobs → jobProperties}/styleDiff.json +6 -13
- package/validation/tests/{jobs → jobProperties}/tabNav.json +6 -13
- package/validation/tests/{jobs → jobProperties}/targetSize.json +6 -13
- package/validation/tests/{jobs → jobProperties}/textNodes.json +6 -12
- package/validation/tests/{jobs → jobProperties}/title.json +6 -12
- package/validation/tests/{jobs → jobProperties}/titledEl.json +6 -13
- package/validation/tests/{jobs → jobProperties}/zIndex.json +6 -13
- package/validation/tests/targets/linkUl/bad.html +4 -16
- package/validation/tests/targets/linkUl/good.html +3 -2
- package/validation/tests/targets/linkUl/na.html +5 -3
- package/validation/validateTest.js +77 -46
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"what": "validation of titledEl test",
|
|
4
|
-
"strict": true,
|
|
2
|
+
"rule": "titledEl",
|
|
5
3
|
"timeLimit": 20,
|
|
6
4
|
"acts": [
|
|
7
5
|
{
|
|
8
6
|
"type": "launch",
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
"target": {
|
|
8
|
+
"url": "file://validation/tests/targets/titledEl/index.html",
|
|
9
|
+
"what": "page with valid and invalid title attributes"
|
|
10
|
+
}
|
|
12
11
|
},
|
|
13
12
|
{
|
|
14
13
|
"type": "test",
|
|
@@ -139,11 +138,5 @@
|
|
|
139
138
|
"titledEl"
|
|
140
139
|
]
|
|
141
140
|
}
|
|
142
|
-
]
|
|
143
|
-
"sources": {
|
|
144
|
-
},
|
|
145
|
-
"standard": "only",
|
|
146
|
-
"observe": false,
|
|
147
|
-
"timeStamp": "240101T1500",
|
|
148
|
-
"creationTimeStamp": "240101T1200"
|
|
141
|
+
]
|
|
149
142
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"what": "validation of zIndex test",
|
|
4
|
-
"strict": true,
|
|
2
|
+
"rule": "zIndex",
|
|
5
3
|
"timeLimit": 20,
|
|
6
4
|
"acts": [
|
|
7
5
|
{
|
|
8
6
|
"type": "launch",
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
"target": {
|
|
8
|
+
"url": "file://validation/tests/targets/zIndex/good.html",
|
|
9
|
+
"what": "page with no explicit z-index attributes"
|
|
10
|
+
}
|
|
12
11
|
},
|
|
13
12
|
{
|
|
14
13
|
"type": "test",
|
|
@@ -141,11 +140,5 @@
|
|
|
141
140
|
"zIndex"
|
|
142
141
|
]
|
|
143
142
|
}
|
|
144
|
-
]
|
|
145
|
-
"sources": {
|
|
146
|
-
},
|
|
147
|
-
"standard": "only",
|
|
148
|
-
"observe": false,
|
|
149
|
-
"timeStamp": "240101T1500",
|
|
150
|
-
"creationTimeStamp": "240101T1200"
|
|
143
|
+
]
|
|
151
144
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<!--
|
|
3
|
-
© 2022–
|
|
3
|
+
© 2022–2025 CVS Health and/or one of its affiliates. All rights reserved.
|
|
4
4
|
|
|
5
5
|
MIT License
|
|
6
6
|
|
|
@@ -39,21 +39,9 @@
|
|
|
39
39
|
<h1>Page with non-underlined inline links</h1>
|
|
40
40
|
<p>This paragraph contains an inline link to <a id="overline" style="text-decoration: overline" href="https://en.wikipedia.org">English information</a> that has an overline instead of an underline.</p>
|
|
41
41
|
<p>This paragraph contains an inline link to <a style="text-decoration: none" href="https://fr.wikipedia.org">French information</a> without any underline.</p>
|
|
42
|
-
<p>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
</ul>
|
|
46
|
-
<p>This paragraph introduces a list of nonunderlined links, but it contains an item that is not a link, so its link fails to be classified as a list link.</p>
|
|
47
|
-
<ul class="nude">
|
|
48
|
-
<li><span>Spanish information is not available</span></li>
|
|
49
|
-
<li><a href="https://eo.wikipedia.org">Esperanto information</a></li>
|
|
50
|
-
</ul>
|
|
51
|
-
<p>This paragraph introduces a list of nonunderlined links, but it contains additional text, so its links fail to be classified as list links.</p>
|
|
52
|
-
<ul class="nude">
|
|
53
|
-
<li><a id="extraText" href="https://fr.wikipedia.org">French information</a> is available, as well as</li>
|
|
54
|
-
<li><a href="https://tr.wikipedia.org">Turkish information</a></li>
|
|
55
|
-
</ul>
|
|
56
|
-
<p>Defects: 6</p>
|
|
42
|
+
<p>The next paragraph contains a nonunderlined link but no other text content, so that link is classified as a block link.</p>
|
|
43
|
+
<p><a href="https://eus.wikipedia.org">Basque information</a></p>
|
|
44
|
+
<p>Defects: 2</p>
|
|
57
45
|
</main>
|
|
58
46
|
</body>
|
|
59
47
|
</html>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<!--
|
|
3
|
-
© 2022–
|
|
3
|
+
© 2022–2025 CVS Health and/or one of its affiliates. All rights reserved.
|
|
4
4
|
|
|
5
5
|
MIT License
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<main>
|
|
39
39
|
<h1>Page with underlined adjacent links</h1>
|
|
40
40
|
<p>This page contains adjacent links to <a href="https://en.wikipedia.org">English information</a> and <a style="text-decoration: underline wavy 2px" href="https://fr.wikipedia.org">French information</a>. The latter is weird, but still an underline.</p>
|
|
41
|
-
<p>The following links, however, are not adjacent, so
|
|
41
|
+
<p>The following links, however, are not adjacent, so are permitted to be (and are) devoid of underlines.</p>
|
|
42
42
|
<ul class="nude">
|
|
43
43
|
<li><a href="https://sp.wikipedia.org">Spanish information</a></li>
|
|
44
44
|
<li><a href="https://eo.wikipedia.org">Esperanto information</a></li>
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
<li><a href="https://eus.wikipedia.org">Basque information</a></li>
|
|
49
49
|
<li><a href="https://tr.wikipedia.org">Turkish information</a></li>
|
|
50
50
|
</ul>
|
|
51
|
+
<p>Defects: 0</p>
|
|
51
52
|
</main>
|
|
52
53
|
</body>
|
|
53
54
|
</html>
|
|
@@ -31,13 +31,15 @@
|
|
|
31
31
|
</head>
|
|
32
32
|
<body>
|
|
33
33
|
<main>
|
|
34
|
-
<h1>Page without
|
|
35
|
-
<p>This page contains list links but no
|
|
36
|
-
<p>The following links are
|
|
34
|
+
<h1>Page without inline links</h1>
|
|
35
|
+
<p>This page contains list links but no inline links.</p>
|
|
36
|
+
<p>The following links are block links.</p>
|
|
37
37
|
<ul>
|
|
38
38
|
<li><a href="https://eus.wikipedia.org">Basque information</a></li>
|
|
39
39
|
<li><a href="https://tr.wikipedia.org">Turkish information</a></li>
|
|
40
40
|
</ul>
|
|
41
|
+
<div><a href="https://de.wikipedia.org">German information</a></div>
|
|
42
|
+
<p>Defects: 0</p>
|
|
41
43
|
</main>
|
|
42
44
|
</body>
|
|
43
45
|
</html>
|
|
@@ -34,58 +34,89 @@ const fs = require('fs').promises;
|
|
|
34
34
|
// Module to run Testaro jobs.
|
|
35
35
|
const {doJob} = require('../run');
|
|
36
36
|
|
|
37
|
+
// CONSTANTS
|
|
38
|
+
|
|
39
|
+
const job = {
|
|
40
|
+
id: '250101T0000-aaa-00',
|
|
41
|
+
what: '',
|
|
42
|
+
strict: true,
|
|
43
|
+
standard: 'only',
|
|
44
|
+
observe: false,
|
|
45
|
+
device: {
|
|
46
|
+
id: 'default',
|
|
47
|
+
windowOptions: {
|
|
48
|
+
reducedMotion: 'no-preference'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
browserID: 'webkit',
|
|
52
|
+
timeLimit: 0,
|
|
53
|
+
creationTimeStamp: '250101T0000',
|
|
54
|
+
executionTimeStamp: '250101T0000',
|
|
55
|
+
sendReportTo: '',
|
|
56
|
+
target: {
|
|
57
|
+
what: 'page for test validation',
|
|
58
|
+
url: 'file://validation/tests/targets/adbID/index.html'
|
|
59
|
+
},
|
|
60
|
+
sources: {
|
|
61
|
+
script: 'test',
|
|
62
|
+
batch: 'test',
|
|
63
|
+
mergeID: 'aaa',
|
|
64
|
+
requester: ''
|
|
65
|
+
},
|
|
66
|
+
acts: []
|
|
67
|
+
};
|
|
68
|
+
|
|
37
69
|
// FUNCTIONS
|
|
38
70
|
|
|
39
|
-
// Validates a test.
|
|
71
|
+
// Validates a Testaro test.
|
|
40
72
|
exports.validateTest = async testID => {
|
|
41
|
-
// Get
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
)
|
|
73
|
+
// Get data for a job for the test.
|
|
74
|
+
const jobProperties = require(`./tests/jobProperties/${testID}.json`);
|
|
75
|
+
// Use the data to complete the job.
|
|
76
|
+
job.what = `validate Testaro test ${jobProperties.rule}`;
|
|
77
|
+
job.timeLimit = jobProperties.timeLimit;
|
|
78
|
+
job.acts = jobProperties.acts;
|
|
79
|
+
// Perform it.
|
|
80
|
+
report = await doJob(job);
|
|
81
|
+
// Report whether the end time was reported.
|
|
82
|
+
const {acts, jobData} = report;
|
|
83
|
+
if (jobData.endTime && /^(?:\d{2}-){2}\d{2}T\d{2}:\d{2}$/.test(jobData.endTime)) {
|
|
84
|
+
console.log('Success: End time has been correctly populated');
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
console.log('Failure: End time empty or invalid');
|
|
88
|
+
}
|
|
89
|
+
// If the test acts were correctly reported:
|
|
90
|
+
const testActs = acts.filter(act => act.type && act.type === 'test');
|
|
91
|
+
if (
|
|
92
|
+
testActs.length === report.acts.filter(act => act.type === 'test').length
|
|
93
|
+
&& testActs.every(
|
|
94
|
+
testAct => testAct.expectationFailures !== undefined
|
|
95
|
+
)
|
|
96
|
+
) {
|
|
97
|
+
// Report this.
|
|
98
|
+
console.log('Success: Reports have been correctly populated');
|
|
99
|
+
// If all expectations were satisfied:
|
|
100
|
+
if (testActs.every(testAct => testAct.expectationFailures === 0)) {
|
|
64
101
|
// Report this.
|
|
65
|
-
console.log('Success:
|
|
66
|
-
// If all expectations were satisfied:
|
|
67
|
-
if (testActs.every(testAct => testAct.expectationFailures === 0)) {
|
|
68
|
-
// Report this.
|
|
69
|
-
console.log('######## Success: No failures\n');
|
|
70
|
-
}
|
|
71
|
-
// Otherwise, i.e. if not all expectations were satisfied:
|
|
72
|
-
else {
|
|
73
|
-
// Report this.
|
|
74
|
-
console.log(
|
|
75
|
-
'######## Failure: The test has at least one failure (see “"passed": false” below)\n'
|
|
76
|
-
);
|
|
77
|
-
// Output the acts that had failures.
|
|
78
|
-
console.log(
|
|
79
|
-
JSON.stringify(
|
|
80
|
-
acts.filter(act => act.type === 'test' && act.expectationFailures), null, 2
|
|
81
|
-
)
|
|
82
|
-
);
|
|
83
|
-
}
|
|
102
|
+
console.log('######## Success: No failures\n');
|
|
84
103
|
}
|
|
104
|
+
// Otherwise, i.e. if not all expectations were satisfied:
|
|
85
105
|
else {
|
|
86
|
-
|
|
87
|
-
console.log(
|
|
106
|
+
// Report this.
|
|
107
|
+
console.log(
|
|
108
|
+
'######## Failure: The test has at least one failure (see “"passed": false” below)\n'
|
|
109
|
+
);
|
|
110
|
+
// Output the acts that had failures.
|
|
111
|
+
console.log(
|
|
112
|
+
JSON.stringify(
|
|
113
|
+
acts.filter(act => act.type === 'test' && act.expectationFailures), null, 2
|
|
114
|
+
)
|
|
115
|
+
);
|
|
88
116
|
}
|
|
89
117
|
}
|
|
90
|
-
|
|
118
|
+
else {
|
|
119
|
+
console.log('Failure: Act results empty or invalid');
|
|
120
|
+
console.log(JSON.stringify(acts, null, 2));
|
|
121
|
+
}
|
|
91
122
|
};
|