Skip to content

Latest commit

 

History

History
36 lines (19 loc) · 3.07 KB

MIGRATION.md

File metadata and controls

36 lines (19 loc) · 3.07 KB

Migration guide

Major versions of Pa11y CI can bring API or compatibility changes. This is a guide to help you make the switch when that happens.

Migrating from 3.0 to 4.0

@aarongoldenthal/pa11y-ci v4 requires a stable (even-numbered) Node.js version of 18 or above.

This includes moving to @aarongoldenthal/pa11y v8.0.0 (upgrading from from [email protected]), upgrading puppeteer from 9.1.1 to 23.2.1, and Chrome from v92 to v128. Puppeteer v22 and subs default to Chrome's new headless mode to more closely mimic the behavior of headful Chrome. This may affect performance; see the Puppeteer docs for more information.

  • If you were using a chromeLaunchConfig with headless: 'new', change to headless: true or remove the headless setting as true is now the default.
  • If you were using a chromeLaunchConfig with headless: true or no headless setting, and want to continue use the previous headless mode, change to headless: 'shell'.

See the @aarongoldenthal/pa11y migration guide for details on the changes from 6.0 to 8.0.

Migrating from 2.0 to 3.0

New defaults for concurrency and useIncognitoBrowserContext

Pa11y CI default concurrency when running tests is now set to 1 instead of the previous 2. This may slow down running of multiple tests but it will help Pa11y CI run more consistently on Continuous Integration environments with limited resources. Users can change this value by setting the concurrency property in the default configuration.

Pa11y CI now creates a new Incognito browser context by default for each page it tests. This will help pa11y-ci run tests more reliably as the state of a page will not depend on pages tested previous any more. This also means that cookies by default won't be shared between different pages on the same origin. If your tests depend on cookies being shared between different tests, you can use the useIncognitoBrowserContext in the default configuration to revert to the previous behaviour.

Migrating from 1.0 to 2.0

Node.js support

Pa11y CI 2.0 only supports Node.js v8.0.0 and higher, you'll need to upgrade to be able to use the latest versions of Pa11y CI.

Changes to Pa11y test runner

Pa11y CI now uses Pa11y 5.0 to run its tests, which has introduced numerous changes to the underlying test runner.

Most importantly for upgrading your Pa11y CI, the new version of Pa11y has removed or renamed numerous Configuration options. If you are using one of these old configuration options, they will no longer be effective in Pa11y CI 2.0.

You can read more about all of the other changes to Pa11y in the Pa11y Migration Guide