testaro 75.1.0 → 75.2.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/env.example CHANGED
@@ -14,19 +14,20 @@ WAITS=0
14
14
  NODE_OPTIONS='--trace-uncaught --trace-warnings'
15
15
  # Suppresses a routine warning from QualWeb.
16
16
  PUPPETEER_DISABLE_HEADLESS_WARNING=true
17
+ # Replace the next 2 placeholders with http://localhost:3000 if Kilotest and Testaro are on the same host or the URL of the server (e.g., https://kilotest.com) if they are on different hosts.
17
18
  # URL to poll for available jobs when watching the network.
18
- NETWATCH_JOB=__placeholder__/api/testaro-agent/job
19
+ NETWATCH_URL_JOB=__placeholder__/api/testaro-agent/job
19
20
  # URL to report results to when watching the network.
20
- NETWATCH_REPORT=__placeholder__/api/testaro-agent/report
21
+ NETWATCH_URL_REPORT=__placeholder__/api/testaro-agent/report
21
22
  # Password of this Testaro agent
22
- NETWATCH_AUTH=__placeholder__
23
+ NETWATCH_URL_AUTH=__placeholder__
23
24
  # Directory (relative to project root) to watch for jobs.
24
25
  JOBDIR=__placeholder__
25
26
  # Directory (relative to project root) to write reports to when watching a directory for jobs.
26
27
  REPORTDIR=__placeholder__
27
28
  # Multiplier for time limits (normally 1).
28
29
  TIMEOUT_MULTIPLIER=1
29
- # Whether to abort the job when any test act fork crashes (default false).
30
+ # Whether to abort the job when launch retries are exhausted or a test act crashes (default false).
30
31
  ABORT_ASSERTIVELY=false
31
32
  # URL of any non-default (e.g., self-hosted) Nu Html Checker API (see ghcr.io/validator/validator).
32
33
  TESTARO_NU_URL=__placeholder__
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "75.1.0",
3
+ "version": "75.2.0",
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
@@ -532,10 +532,10 @@ const launchOnce = async opts => {
532
532
  };
533
533
  // Manages browser launching and navigating and returns a page.
534
534
  exports.launch = async (opts = {}) => {
535
+ let {tempBrowserID = ''} = opts;
535
536
  const {
536
537
  report = {},
537
538
  actIndex = 0,
538
- tempBrowserID = '',
539
539
  tempURL = '',
540
540
  headEmulation = 'high',
541
541
  xPathNeed = 'script',
@@ -566,6 +566,7 @@ exports.launch = async (opts = {}) => {
566
566
  }
567
567
  // Otherwise, i.e. if the launch or navigation failed:
568
568
  else {
569
+ let unusedBrowserIDs = ['chromium', 'webkit', 'firefox'].filter(id => id !== tempBrowserID);
569
570
  let retriesLeft = retries;
570
571
  let {error} = launchResult;
571
572
  // As long as retries remain, decrement the allowed retry count and:
@@ -610,13 +611,25 @@ exports.launch = async (opts = {}) => {
610
611
  error = launchResult.error;
611
612
  // Report this.
612
613
  console.log(`WARNING: Retry failed (${error})`);
614
+ // If a browser type was specified, retries are exhausted, and browser types are not:
615
+ if (tempBrowserID && unusedBrowserIDs.length && ! retriesLeft) {
616
+ // Change the browser type.
617
+ tempBrowserID = unusedBrowserIDs.shift();
618
+ console.log(`NOTICE: Changing browser type to ${tempBrowserID}`);
619
+ // Reset the retries.
620
+ retriesLeft = retries;
621
+ }
613
622
  }
614
623
  }
615
- // If the retries were exhausted:
624
+ // If the retries were finally exhausted:
616
625
  if (! retriesLeft) {
617
626
  // Report this and, if so configured, that the job was aborted.
618
627
  addError(
619
- true, abortAssertively, report, actIndex, `Launch or navigation failed; retries exhausted`
628
+ true,
629
+ abortAssertively,
630
+ report,
631
+ actIndex,
632
+ `Launch or navigation failed; retries and browser types exhausted`
620
633
  );
621
634
  }
622
635
  // Return a failure.
package/procs/shoot.js CHANGED
@@ -29,7 +29,6 @@ const randomFileName = (suffixLength = 3) => {
29
29
  const screenShot = async (page, exclusionLocator = null) => {
30
30
  const options = {
31
31
  fullPage: true,
32
- omitBackground: true,
33
32
  scale: 'css',
34
33
  timeout: applyMultiplier(4000)
35
34
  };