testaro 1.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.
Files changed (99) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +502 -0
  3. package/aceconfig.js +7 -0
  4. package/commands.js +249 -0
  5. package/index.js +1248 -0
  6. package/package.json +39 -0
  7. package/procs/score/asp09.js +555 -0
  8. package/procs/test/allText.js +76 -0
  9. package/procs/test/allVis.js +17 -0
  10. package/procs/test/linksByType.js +90 -0
  11. package/procs/test/textOf.txt +73 -0
  12. package/scoring/correlation.js +74 -0
  13. package/scoring/correlations.json +327 -0
  14. package/scoring/data.json +26021 -0
  15. package/scoring/dupCounts.js +39 -0
  16. package/scoring/dupCounts.json +112 -0
  17. package/scoring/duplications.json +253 -0
  18. package/scoring/issues.json +304 -0
  19. package/scoring/packageData.js +171 -0
  20. package/scoring/packageIssues.js +34 -0
  21. package/scoring/rulesetData.json +15 -0
  22. package/tests/aatt.js +64 -0
  23. package/tests/alfa.js +107 -0
  24. package/tests/axe.js +109 -0
  25. package/tests/bulk.js +21 -0
  26. package/tests/embAc.js +36 -0
  27. package/tests/focAll.js +62 -0
  28. package/tests/focInd.js +99 -0
  29. package/tests/focOp.js +132 -0
  30. package/tests/hover.js +195 -0
  31. package/tests/ibm.js +89 -0
  32. package/tests/labClash.js +157 -0
  33. package/tests/linkUl.js +65 -0
  34. package/tests/menuNav.js +254 -0
  35. package/tests/motion.js +115 -0
  36. package/tests/radioSet.js +87 -0
  37. package/tests/role.js +164 -0
  38. package/tests/styleDiff.js +146 -0
  39. package/tests/tabNav.js +282 -0
  40. package/tests/wave.js +44 -0
  41. package/tests/zIndex.js +49 -0
  42. package/validation/batches/sample.json +13 -0
  43. package/validation/executors/sample.js +11 -0
  44. package/validation/scripts/app/sample.json +21 -0
  45. package/validation/scripts/test/bulk.json +39 -0
  46. package/validation/scripts/test/embAc.json +45 -0
  47. package/validation/scripts/test/focAll.json +59 -0
  48. package/validation/scripts/test/focInd.json +55 -0
  49. package/validation/scripts/test/focOp.json +53 -0
  50. package/validation/scripts/test/hover.json +47 -0
  51. package/validation/scripts/test/labClash.json +43 -0
  52. package/validation/scripts/test/linkUl.json +62 -0
  53. package/validation/scripts/test/menuNav.json +97 -0
  54. package/validation/scripts/test/motion.json +53 -0
  55. package/validation/scripts/test/radioSet.json +43 -0
  56. package/validation/scripts/test/role.json +42 -0
  57. package/validation/scripts/test/styleDiff.json +61 -0
  58. package/validation/scripts/test/tabNav.json +97 -0
  59. package/validation/scripts/test/zIndex.json +40 -0
  60. package/validation/targets/bulk/bad.html +48 -0
  61. package/validation/targets/bulk/good.html +15 -0
  62. package/validation/targets/embAc/bad.html +21 -0
  63. package/validation/targets/embAc/good.html +15 -0
  64. package/validation/targets/focAll/good.html +15 -0
  65. package/validation/targets/focAll/less.html +15 -0
  66. package/validation/targets/focAll/more.html +16 -0
  67. package/validation/targets/focInd/bad.html +31 -0
  68. package/validation/targets/focInd/good.html +22 -0
  69. package/validation/targets/focOp/bad.html +18 -0
  70. package/validation/targets/focOp/good.html +15 -0
  71. package/validation/targets/hover/bad.html +19 -0
  72. package/validation/targets/hover/good.html +15 -0
  73. package/validation/targets/labClash/bad.html +20 -0
  74. package/validation/targets/labClash/good.html +18 -0
  75. package/validation/targets/linkUl/bad.html +16 -0
  76. package/validation/targets/linkUl/good.html +30 -0
  77. package/validation/targets/linkUl/na.html +20 -0
  78. package/validation/targets/menuNav/bad.html +106 -0
  79. package/validation/targets/menuNav/bad.js +348 -0
  80. package/validation/targets/menuNav/good.html +106 -0
  81. package/validation/targets/menuNav/good.js +365 -0
  82. package/validation/targets/menuNav/style.css +22 -0
  83. package/validation/targets/motion/bad.css +15 -0
  84. package/validation/targets/motion/bad.html +16 -0
  85. package/validation/targets/motion/good.html +15 -0
  86. package/validation/targets/radioSet/bad.html +34 -0
  87. package/validation/targets/radioSet/good.html +27 -0
  88. package/validation/targets/role/bad.html +26 -0
  89. package/validation/targets/role/good.html +22 -0
  90. package/validation/targets/styleDiff/bad.html +35 -0
  91. package/validation/targets/styleDiff/good.html +36 -0
  92. package/validation/targets/tabNav/bad.html +51 -0
  93. package/validation/targets/tabNav/bad.js +35 -0
  94. package/validation/targets/tabNav/good.html +53 -0
  95. package/validation/targets/tabNav/good.js +83 -0
  96. package/validation/targets/tabNav/goodMoz.js +206 -0
  97. package/validation/targets/tabNav/style.css +34 -0
  98. package/validation/targets/zIndex/bad.html +17 -0
  99. package/validation/targets/zIndex/good.html +15 -0
package/commands.js ADDED
@@ -0,0 +1,249 @@
1
+ exports.commands = {
2
+ etc: {
3
+ button: [
4
+ 'Click a button',
5
+ {
6
+ which: [true, 'string', 'hasLength', 'substring of button text'],
7
+ index: [false, 'number', '', 'index among matches if not 0'],
8
+ what: [false, 'string', 'hasLength', 'comment']
9
+ }
10
+ ],
11
+ checkbox: [
12
+ 'Check a checkbox',
13
+ {
14
+ which: [true, 'string', 'hasLength', 'substring of checkbox text'],
15
+ index: [false, 'number', '', 'index among matches if not 0'],
16
+ what: [false, 'string', 'hasLength', 'comment']
17
+ }
18
+ ],
19
+ focus: [
20
+ 'Put the specified element into focus',
21
+ {
22
+ what: [true, 'string', 'isFocusable', 'selector of element to be focused'],
23
+ index: [false, 'number', '', 'index among matches if not 0'],
24
+ which: [true, 'string', 'hasLength', 'substring of element text']
25
+ }
26
+ ],
27
+ launch: [
28
+ 'Launch a Playwright browser',
29
+ {
30
+ which: [true, 'string', 'isBrowserType', '“chromium”, “firefox”, or “webkit”'],
31
+ what: [false, 'string', 'hasLength', 'comment']
32
+ }
33
+ ],
34
+ link: [
35
+ 'Click a link',
36
+ {
37
+ which: [true, 'string', 'hasLength', 'substring of link text'],
38
+ index: [false, 'number', '', 'index among matches if not 0'],
39
+ what: [false, 'string', 'hasLength', 'comment']
40
+ }
41
+ ],
42
+ next: [
43
+ 'Specify the next command if the last result requires',
44
+ {
45
+ if: [
46
+ true, 'array', '', 'act result property tree in a.b.c format; if to exist, also one of “<=>!” and criterion'
47
+ ],
48
+ jump: [false, 'number', '', 'offset of next command from this one, or 0 to stop'],
49
+ next: [false, 'string', 'hasLength', 'name of next command'],
50
+ what: [false, 'string', 'hasLength', 'comment']
51
+ }
52
+ ],
53
+ page: [
54
+ 'Switch to the last-opened browser tab',
55
+ {
56
+ what: [false, 'string', 'hasLength', 'comment']
57
+ }
58
+ ],
59
+ press: [
60
+ 'Press a key',
61
+ {
62
+ which: [true, 'string', 'hasLength', 'key name'],
63
+ what: [false, 'string', 'hasLength', 'comment'],
64
+ again: [false, 'number', '', 'number of additional times to press the key']
65
+ }
66
+ ],
67
+ presses: [
68
+ 'Repeatedly press a navigation key',
69
+ {
70
+ navKey: [true, 'string', 'hasLength', 'navigation-keyname'],
71
+ what: [false, 'string', 'hasLength', 'tag name of element'],
72
+ which: [false, 'array', 'areStrings', 'substrings any of which matches element text'],
73
+ text: [false, 'string', 'hasLength', 'text to enter after reaching element'],
74
+ action: [false, 'string', 'hasLength', 'name of key to press, after text entry if any'],
75
+ withItems: [true, 'boolean']
76
+ }
77
+ ],
78
+ radio: [
79
+ 'Check a radio button',
80
+ {
81
+ which: [true, 'string', 'hasLength', 'substring of radio-button text'],
82
+ index: [false, 'number', '', 'index among matches if not 0'],
83
+ what: [false, 'string', 'hasLength', 'comment']
84
+ }
85
+ ],
86
+ reveal: [
87
+ 'Make all elements visible',
88
+ {
89
+ what: [false, 'string', 'hasLength', 'comment']
90
+ }
91
+ ],
92
+ score: [
93
+ 'Compute and report a score',
94
+ {
95
+ which: [true, 'string', 'hasLength', 'score-proc name'],
96
+ what: [false, 'string', 'hasLength', 'comment']
97
+ }
98
+ ],
99
+ select: [
100
+ 'Select a select option',
101
+ {
102
+ which: [true, 'string', 'hasLength', 'substring of select-list text'],
103
+ index: [false, 'number', '', 'index among matches if not 0'],
104
+ what: [true, 'string', 'hasLength', 'substring of option text']
105
+ }
106
+ ],
107
+ state: [
108
+ 'Wait until the page reaches a load state',
109
+ {
110
+ which: [true, 'string', 'hasLength', '“loaded” or “idle”'],
111
+ what: [false, 'string', 'isState', 'comment']
112
+ }
113
+ ],
114
+ test: [
115
+ 'Perform a test',
116
+ {
117
+ which: [true, 'string', 'isTest', 'test name'],
118
+ what: [false, 'string', 'hasLength', 'comment']
119
+ }
120
+ ],
121
+ text: [
122
+ 'Enter text into a text input',
123
+ {
124
+ which: [true, 'string', 'hasLength', 'substring of input text'],
125
+ index: [false, 'number', '', 'index among matches if not 0'],
126
+ what: [true, 'string', 'hasLength', 'text to enter']
127
+ }
128
+ ],
129
+ url: [
130
+ 'Navigate to a new URL',
131
+ {
132
+ which: [true, 'string', 'isURL', 'URL'],
133
+ what: [false, 'string', 'hasLength', 'comment']
134
+ }
135
+ ],
136
+ wait: [
137
+ 'Wait until something appears',
138
+ {
139
+ what: [true, 'string', 'isWaitable', 'waitable item type'],
140
+ which: [true, 'string', 'hasLength', 'substring of waitable-item text']
141
+ }
142
+ ]
143
+ },
144
+ tests: {
145
+ axe: [
146
+ 'Perform an Axe test',
147
+ {
148
+ withItems: [true, 'boolean'],
149
+ rules: [true, 'array', 'areStrings', 'rule names, or empty if all']
150
+ }
151
+ ],
152
+ embAc: [
153
+ 'Perform an embAc test',
154
+ {
155
+ withItems: [true, 'boolean']
156
+ }
157
+ ],
158
+ focInd: [
159
+ 'Perform a focInd test',
160
+ {
161
+ withItems: [true, 'boolean'],
162
+ revealAll: [true, 'boolean', '', 'whether to make all elements visible first']
163
+ }
164
+ ],
165
+ focOp: [
166
+ 'Perform a focOp test',
167
+ {
168
+ withItems: [true, 'boolean']
169
+ }
170
+ ],
171
+ hover: [
172
+ 'Perform a hover test',
173
+ {
174
+ withItems: [true, 'boolean']
175
+ }
176
+ ],
177
+ ibm: [
178
+ 'Perform an IBM Equal Access test',
179
+ {
180
+ withItems: [true, 'boolean'],
181
+ withNewContent: [
182
+ false, 'boolean', '', 'true: use a URL; false: use page content; omitted: use both'
183
+ ]
184
+ }
185
+ ],
186
+ labClash: [
187
+ 'Perform a labClash test',
188
+ {
189
+ withItems: [true, 'boolean']
190
+ }
191
+ ],
192
+ linkUl: [
193
+ 'Perform a linkUl test',
194
+ {
195
+ withItems: [true, 'boolean']
196
+ }
197
+ ],
198
+ menuNav: [
199
+ 'Perform a tabNav test',
200
+ {
201
+ withItems: [true, 'boolean']
202
+ }
203
+ ],
204
+ motion: [
205
+ 'Perform a motion test',
206
+ {
207
+ delay: [true, 'number', '', 'ms to wait before first screen shot'],
208
+ interval: [true, 'number', '', 'ms between screen shots'],
209
+ count: [true, 'number', '', 'count of screen shots to make']
210
+ }
211
+ ],
212
+ radioSet: [
213
+ 'Perform a radioSet test',
214
+ {
215
+ withItems: [true, 'boolean']
216
+ }
217
+ ],
218
+ roleList: [
219
+ 'Perform a roleList test',
220
+ {
221
+ withItems: [true, 'boolean']
222
+ }
223
+ ],
224
+ styleDiff: [
225
+ 'Perform a styleDiff test',
226
+ {
227
+ withItems: [true, 'boolean']
228
+ }
229
+ ],
230
+ tabNav: [
231
+ 'Perform a tabNav test',
232
+ {
233
+ withItems: [true, 'boolean']
234
+ }
235
+ ],
236
+ wave: [
237
+ 'Perform a WebAIM WAVE test',
238
+ {
239
+ reportType: [true, 'number', '', 'WAVE report type']
240
+ }
241
+ ],
242
+ zIndex: [
243
+ 'Perform a zIndex test',
244
+ {
245
+ withItems: [true, 'boolean']
246
+ }
247
+ ]
248
+ }
249
+ };