Skip to content

WDFN-684 - Added gitlab ci for running pa11y CI tests

Before making a pull request

  • Put the appropriate EXEMPT flag if needed in the MR title (see https://practices.wma.chs.usgs.gov/practice/peer_code_review/)
  • Run all linters (make lint)
  • Run all tests (make test)
  • Update the changelog appropriately
  • If making a release, update code.json metadataLastUpdated and bump CHANGELOG.md to next version.

Description

Added a new step to the CI executed upon merge request, we now will run pa11yci against a set of URLs. We are doing this by running the application within a docker container and then using docker-compose to network this and the pa11y_ci container together.

I removed the previous Dockerfiles and I simplified to a single Dockerfile to run the web server and then a separate Dockerfile-ci to run the pa11y_ci script. The set of URLs is contained in pa11y.config.json. Some of the URLs I initially tried caused the chrome browser in puppeteer to hang so those where removed. I will open a ticket to investigate why but my initial investigation was not successful.

A more complete test would need to actually use pa11y directly and probably creation of an integration test script in order to do things like test the result of actions like clicking a button.

After making a pull request

  • If appropriate, put the link to the PR in the JIRA ticket
  • Assign someone to review unless the change is trivial

Merge request reports