testaro 5.17.0 → 5.17.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tests/hover.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "5.17.0",
3
+ "version": "5.17.1",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tests/hover.js CHANGED
@@ -273,13 +273,13 @@ exports.reporter = async (page, sampleSize = -1, withItems) => {
273
273
  data.totals.triggers = triggers.length;
274
274
  // Get the sample.
275
275
  const sample = getSample(triggers, sampleSize);
276
- data.sampleSize = sample.length;
277
- // Set a time limit to cover possible 1.9 seconds per trigger.
278
- const timeLimit = Math.round(2.2 * data.sampleSize);
276
+ data.totals.triggerSample = sample.length;
277
+ // Set a time limit to cover possible 2 seconds per trigger.
278
+ const timeLimit = Math.round(2.8 * sample.length + 2);
279
279
  const timeout = setTimeout(async () => {
280
280
  await page.close();
281
281
  console.log(
282
- `ERROR: hover test timed out at ${timeLimit} seconds; page closed`
282
+ `ERROR: hover test on sample of ${sample.length} triggers timed out at ${timeLimit} seconds; page closed`
283
283
  );
284
284
  hasTimedOut = true;
285
285
  data = {
@@ -289,7 +289,7 @@ exports.reporter = async (page, sampleSize = -1, withItems) => {
289
289
  clearTimeout(timeout);
290
290
  }, 1000 * timeLimit);
291
291
  // Find and document the impacts.
292
- if (data.sampleSize && ! hasTimedOut) {
292
+ if (sample.length && ! hasTimedOut) {
293
293
  await find(data, withItems, page, sample);
294
294
  }
295
295
  clearTimeout(timeout);