testaro 77.0.0 → 77.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "77.0.0",
3
+ "version": "77.0.1",
4
4
  "description": "Run 1300 web accessibility tests from 10 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/procs/launch.js CHANGED
@@ -514,11 +514,11 @@ const launchOnce = async opts => {
514
514
  }
515
515
  // Base the wait on the need of the tool and the retry history.
516
516
  let waitUntil = xPathNeed === 'none' ? 'domcontentloaded' : 'networkidle';
517
- if (relaxWait !== 'no' && waitUntil === 'networkidle') {
518
- waitUntil = 'domcontentloaded';
517
+ if (relaxWait === 'partly' && waitUntil === 'networkidle') {
518
+ waitUntil = 'load';
519
519
  }
520
520
  if (relaxWait === 'fully') {
521
- waitUntil = 'load';
521
+ waitUntil = 'domcontentloaded';
522
522
  }
523
523
  // Navigate to the specified URL and wait for the stability required by the next action.
524
524
  const navResult = await goTo(report, page, url, 10000, waitUntil);
@@ -79,12 +79,18 @@ exports.reporter = async (
79
79
  };
80
80
  const selector = 'body input[type=text], body input[type=email], body input:not([type])';
81
81
  const whats = 'Inputs are missing required autocomplete attributes';
82
- const placeHolders = Object.keys(labels).map(key => `__${key}Labels__`);
83
- const replacers = Object.values(labels).map(value => JSON.stringify(value));
82
+ // Each placeholder sits inside single quotes in getBadWhat (e.g. name: ['__nameLabels__']).
83
+ // Replace the quoted placeholder with the bracket-stripped JSON so the result is a proper
84
+ // element list (name: ["your name", ...]) rather than a one-element array holding the JSON
85
+ // text of the array (name: ['["your name", ...]']), which never matches an accessible name.
86
+ const placeHolders = Object.keys(labels).map(key => `'__${key}Labels__'`);
87
+ const replacers = Object.values(labels).map(value => JSON.stringify(value).slice(1, -1));
84
88
  // Create a stringified getBadWhat, with placeholders replaced with the specified label arrays.
85
89
  let getBadWhatString = getBadWhat.toString();
86
90
  [0, 1, 2, 3].forEach(index => {
87
91
  getBadWhatString = getBadWhatString.replace(placeHolders[index], replacers[index]);
88
92
  });
89
- return doTest(page, report.catalog, withItems, 'autocomplete', selector, whats, 2, getBadWhatString);
93
+ return doTest(
94
+ page, report.catalog, withItems, 'autocomplete', selector, whats, 2, getBadWhatString
95
+ );
90
96
  };
@@ -67,7 +67,7 @@
67
67
  [
68
68
  "standardResult.totals.2",
69
69
  "=",
70
- 4
70
+ 3
71
71
  ],
72
72
  [
73
73
  "standardResult.instances.1.what",
@@ -120,7 +120,7 @@
120
120
  [
121
121
  "standardResult.totals.2",
122
122
  "=",
123
- 4
123
+ 3
124
124
  ],
125
125
  [
126
126
  "standardResult.instances.0.what",
@@ -135,7 +135,7 @@
135
135
  [
136
136
  "standardResult.instances.0.count",
137
137
  "=",
138
- 4
138
+ 3
139
139
  ]
140
140
  ],
141
141
  "rules": [