Commit Graph

434 Commits

Author SHA1 Message Date
Danyal Aytekin
e76dccef77 Fix tests, test more, support Node 16-20 (#318)
* Add `.nvmrc` → 14

* Fix package.json's URLs

* Update to Pa11y CI's version (`https` etc)

* Add Node 16 to matrix, and make linter run each time

* Standardise `.editorconfig`

* Upgrade to `actions/checkout@4` and `actions/setup-node@3`

* Replace `npm install` with `npm ci`

* Replace `wait-action` with `sleep 10s`

* Rewrite to detach config, use promises, and replace `request` with `fetch` (adding `node-fetch` until Node 18)

* Delete small single-use helper

* Bump to `pa11y-webservice@4.1` and use caret from here (we control the dep)

* Return to `this.last`, fix syntax errors

* Update copyright to 2023 and remove unused ref

* Fix troubleshooting link

* Remove symbols, since they could become outdated

* Remove missing link

* Replace emoji note with GitHub Markdown note

* Fix setup link

* Replace br with double space

* Replace `sh` with `console` for terminal output

* Rename Mongo DB used in integration tests to avoid clash locally

* Remove JSCS and references to other unused tools

* Remove tooling tasks update

* Compress definitions and layout where it makes sense or brings clarity

* Rename db used in tests to `pa11y-dashboard-integration-test`, to avoid clash with `pa11y-webservice`'s own test DB

* Use briefer syntax

* Fix integration test setup & config

* Reverse function order to return early

* Update to `pa11y-lint-config@3`, update `ecmaVersion` to 2020, remove some rule overrides

* Fix linting errors, remove cruft

* Move linting and broken integration test command into npm scripts (it remains broken)

* Revert `node-fetch` to `^2.7.0` (can't do ESM right now)

* Upgrade to `pa11y-webservice@^4.2` from `^4.1`

* Upgrade to `mocha@^9.2` from `^8.4` (can't do `10` yet because it drops Node 12)

* Use backticks for property names

* Fix anchor link for 'installing MongoDB'

* Reorganise test workflow and add Node `18` and `20` to test matrix

* Fix `lockfile-version` to `2`

* Apply support policy

* Replace Travis badge with one for Actions

* Define some more links, separate code blocks

* Reflect greater confidence in support for recent versions of MongoDB

* Test against MongoDB versions 3-7

* Remove Make tasks `all`, `ci`, `clean`, `install`, `node_modules`, `lint`

* Fix integration test command in workflow

* Restore shallow Mocha command for now

* Move linting into own step `lint` to avoid duplicated warnings

* Give the `test` workflow a better name now that it uses a bigger matrix

* Drop back to ES2019 from ES2020 for Node 12, remove use of `?.`

* Reduce `--slow` to `4000`

* Remove a `describe.only` 👀

* Fix broken test for add new item → standard

* Rename availability check function

* Fix task count check when testing task creation

* Return fully to the original `new` logic

* Use `127.0.0.1` consistently to fix (possible) IPV6 issue

* Fix Cheerio call in failing test

* Add MongoDB 2, and tweak other final versions

* Lower case and shorten test name, to sit well alongside lint job

* Replace `underscore(.groupBy)` with `lodash/groupby`

* Capitalise Puppeteer

* Say we test against MongoDB 2 as well

* Document two replacements of Make with npm scripts

* Revise requirements, permitting Node 16+ and describing Ubuntu issue

* Support Node 16, 18, 20

* Install `lodash.keys` and fix Lodash mistakes

* Fix rebase autoresolution error affecting `index.js` 👀

* This is Pa11y Dashboard not Webservice

* Fix MongoDB link

* Remove unused link def for Puppeteer

* Shush markdown linter

* Actually use `pa11y-webservice@4.3`

* Improve support table

* Don't `fail-fast`

* Remove dependency `underscore`

* Fix dashboard's port definition for integration test

* Set `NODE_ENV=test` for integration tests

* Use `mocha@10`

* Extend the sleep to rule out the service not starting in time

* Wait on port `4000` instead of sleeping

* Fix `wait-on-action` to `v1.1.0`

* Fix includes of `lodash.groupby` and `lodash.keys`

* Label the port waiting action

* Fix to `pa11y-webservice@4.2.0` until dep issue resolved

* Set waiter action to start after 1s, time out after 30s, and log

* Upgrade to `pa11y-webservice@^4.3.1` from `~4.2.0`

* Remove comment about recent versions of MongoDB, since we test with them now
2024-03-13 05:48:58 +00:00
Sangita Mane
8145069fe9 Improve the console messaging on starting the app to avoid confusion. (#292)
* Improve the console messaging on starting the app to avoid confusion.

* Revise logging to present intended URI alongside actual

---------

Co-authored-by: Danyal Aytekin <danyal@alienpaper.com>
2023-11-15 09:26:25 +00:00
dependabot[bot]
13134f67de Bump json-schema and jsprim (#317) 2023-11-14 10:45:07 +00:00
dependabot[bot]
d8d19f4305 Bump ansi-regex from 3.0.0 to 3.0.1 (#316)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 21:16:38 +00:00
dependabot[bot]
2af4663f22 Bump moment-timezone from 0.5.33 to 0.5.43 (#314)
Bumps [moment-timezone](https://github.com/moment/moment-timezone) from 0.5.33 to 0.5.43.
- [Release notes](https://github.com/moment/moment-timezone/releases)
- [Changelog](https://github.com/moment/moment-timezone/blob/develop/changelog.md)
- [Commits](https://github.com/moment/moment-timezone/compare/0.5.33...0.5.43)

---
updated-dependencies:
- dependency-name: moment-timezone
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 21:13:06 +00:00
dependabot[bot]
77f61b1e10 Bump minimist from 1.2.5 to 1.2.8 (#313)
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.8.
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.8)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 21:00:02 +00:00
dependabot[bot]
3cfe075bb5 Bump qs from 6.5.2 to 6.5.3 (#311)
Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 20:56:12 +00:00
dependabot[bot]
c72f0f6f04 Bump semver from 5.7.1 to 5.7.2 (#310)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 20:42:12 +00:00
dependabot[bot]
8e31c40269 Bump moment from 2.29.1 to 2.29.4 (#312)
Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.4.
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-12 16:11:02 +00:00
Danyal Aytekin
e55cae4786 In workflow, update default branch to main, use ubuntu-20.04 (#315)
* Update default branch name to `main`

* Use `ubuntu-20.04` for build, until this project upgrades to `pa11y-webservice@5`
2023-11-12 15:52:09 +00:00
Sangita Mane
5202f59008 A11y fixes for pa11y dashboard pages. (#306)
* First draft of a11y fixes.

* Amended results title

* Amended results title (again)

* Back to top keyboard operation

Removed the 'data-role="top"' attribute, which implemented a cool animation to scroll to top but prevented the default behaviour, resulting in the keyboard focus not going back to top.

* Options Button

Fix to have a working options button, but using the mouse only. This is not a good solution because it cannot be operated via the keyboard.

* Fixed options menu css.

* Results view layout changes

* Undoing layout changes

* Graph layout fixes.

* Skip Rules Link

Added a link to skip the list of rules, which can get very long and annoying for any keyboard user not interested in selecting a rule. Most probably, implementing a collapsible list of rules would be a better solution here.

Co-authored-by: Carlos Muncharaz <carlos@muncharaz.eu>
2022-10-11 14:17:43 +02:00
Jose Bolos
b9b049ec2b Address all eslint warnings
Address all eslint warnings that were still present by:

* Extracting code to a new function in order to reduce complexity
* Renamed error variables and use shorthand notation for objects
* Disabling eslint warnings where addressing the issue would require too much refactoring
2022-04-11 17:27:15 +02:00
Jose Bolos
0e7849dd07 Add issue template 2022-04-08 14:29:44 +01:00
Jose Bolos
3b76433cf3 Version 4.2.0 4.2.0 2022-03-30 17:19:08 +01:00
Jose Bolos
f3462f0c1e Bump webservice, deps, and linter configuration
* Bump webservice to require the latest 4.0.1 version
* Bump other dependencies
* Update linter conf to v2 which avoids the "Unsupported engine" warning when using node 12
* Keep all other devdependencies as they are so they stay consistent with the other repos
2022-03-30 18:16:25 +02:00
Jose Bolos
9dbee59746 Add request logging using morgan
This commit adds request logging to the app using morgan.

Every request will now be logged not one but twice: one when the request is received, and a second time when the response is sent.

The response logging also prints out the time elapsed in processing the request, which will be useful to debug performance issues (calls to the dashboard home are currently taking 4 - 15s on a populated database).

The new code uses a tiny middleware that uses nanoid to generate a random request id that can be used to match requests in the logs.

This logging will help us determine which requests are successful, which requests are slow, and establish what requests may have contributed to causing an application crash, making future debugging easier.
2022-03-08 11:19:15 +01:00
Jose Bolos
321d7bb6ba Split initApp in different functions
This makes the function easier to understand and fixes eslint complaints
about the function having too many statements.
2022-03-07 15:55:34 +01:00
Jose Bolos
4fd73bcf2f Make .editorconfig consistent between repos 2022-03-03 13:59:11 +00:00
Jose Bolos
0072fe8965 Version 4.1.0 4.1.0 2021-11-26 16:25:06 +00:00
Jose Bolos
30c1ff171d Update troubleshooting guide and move to README 2021-11-26 16:24:09 +00:00
Sangita Mane
a0b3fa843f Updated rulesets list to add WCAG 2.1 options 2021-11-26 17:05:50 +01:00
Jose Bolos
a424cfade7 Version 4.0.0 4.0.0 2021-11-26 15:34:37 +00:00
Jose Bolos
cbc9da2d93 update test matrix 2021-11-26 15:26:54 +00:00
Jose Bolos
19f4d32bf0 Fix linter errors 2021-11-26 15:22:28 +00:00
Jose Bolos
ff87055cc4 Update dependencies and devDependencies 2021-11-26 15:20:52 +00:00
Sangita Mane
4c0bd924ab Fixed the a11y errors on Pa11y dashboard results and add new url page (#285)
* Fixed the a11y errors on Pa11y dashboard results page and add new url page.

* Removed few more unnecessary roles along with Holli's suggestions implemented.

* Added close button ARIA label

Co-authored-by: Hollie Kay <1948361+hollsk@users.noreply.github.com>

Co-authored-by: Hollie Kay <1948361+hollsk@users.noreply.github.com>
2021-05-26 16:38:38 +02:00
Jose Bolos
6d4b8c9676 Add mongo version to brew start command 2021-05-18 14:32:35 +01:00
Jose Bolos
0654790289 Improve installation instructions
* Clarify the requirements for running Pa11y Dashboard, and specifically the versions of MongoDB supported
* Split the installation process in sections so it's easy to follow
* Instead of trying to cover the MongoDB installation on the Readme, refer to the MongoDB docs, but still including a macOS example for easy reference
* Clarify the use of the config files and how they relate to the NODE_ENV variable
* Use a slightly less informal language in a few places
2021-05-18 14:32:35 +01:00
Jose Bolos
1d931671ff Version 3.3.0 3.3.0 2021-04-27 15:03:22 +01:00
Jose Bolos
9d95c79625 Version 3.2.1 2021-04-27 15:53:29 +02:00
Jose Bolos
b8029c56f7 Fix security vuln by bumping express-hbs
Also bumps pa11y-webservice to the latest version.
2021-04-27 15:53:29 +02:00
Sangita Mane
9a23b79d89 #165 - Added list view option for the dashboard. (#279)
* Added list view & grid view buttons on the dashboard, on click of which switches the view and avoids truncation of title of the page.

* Indentation fixed.
2021-04-20 09:58:33 +02:00
Jose Bolos
b7d45c0913 Reorder the routes to avoid MongoDB ObjectID error
When trying to add a new URL, the Node.js MongoDB driver complains with the following error:
```
ObjectID generation failed. Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
```

This is because the `/new` url gets captured by the `/:id` route defined in `/route/task/index.js`. It's another instance of #244 that I missed when fixing it.
2021-04-09 11:30:35 +02:00
Jose Bolos
9ae73dc446 Replace Travis with GH actions 2021-04-09 11:04:12 +02:00
Jose Bolos
ff8142b4e4 Version 3.2.0 (#270) 3.2.0 2020-10-05 17:35:43 +01:00
Jose Bolos
2f7e8ae451 Update dependencies (#269) 2020-10-05 17:04:12 +01:00
Sam Clulow
a2cc2c7942 Replace Chalk with Kleur (#264)
- Remove Chalk
- Add Kleur
- Update index.js
- Update copyright in README

Fixes #256
2020-06-29 16:27:44 +01:00
Jose Bolos
59f657b422 Update all devdependencies to the latest versions (#258) 2020-04-28 12:33:36 +01:00
Jose Bolos
ea3183791c Version 3.1.0 (#246)
* Version 3.1.0

Also minor bump to pa11y-webservice

* Bump webservice so it includes data fixtures
3.1.0
2019-09-27 11:44:24 +01:00
Jose Bolos
102a237d2e Bump webservice version and other deps (#245) 2019-09-20 15:59:21 +01:00
Jose Bolos
7c77467dcf Fix incorrect values being passed to ObjectID (#244)
Due to the routes being defined in the wrong order, certain urls (e.g. `/tasks/:taskid:/edit`) are being captured by the results route instead (e.g. `/tasks/:taskid:/:resultid:`). This is causing the wrong method to being called with parts of the path like `edit`, `run`, etc. being passed as an argument to ObjectID(). As these are not valid MongoDB IDs, the method displays instead an error message:

> Argument passed in must be a single String of 12 bytes or a string of 24 hex characters

Also change the path to the favicon image to be not relative, as this is causing a `favicon.png` string to be sent as an argument to ObjectID() when visiting certain pages due to the previous issue.
2019-09-20 14:57:15 +01:00
Jose Bolos
2de7e59f44 Bump webservice to 3.0.1 (#243)
Fixes a problem with tests not running when cron jobs are triggered.
3.0.1
2019-09-13 15:14:36 +01:00
Jeremy Englert
c7bd2a53b6 Adds new images to Readme (#239) 2019-08-01 09:20:02 +01:00
Jose Bolos
350f94a0d4 Version 3.0.0 (#236)
Includes several updates to the migration guide and the README.
3.0.0
2019-07-16 15:16:06 +01:00
Jose Bolos
a5ce220509 Update all dependencies and standardise versions (#235) 2019-07-16 14:08:27 +01:00
Jose Bolos
ce07206899 Update dependencies (#234)
* Bumps pa11y-webservice and client to the new versions requiring node 8+
* Update tests to account for the new URL. Integration tests now include a localhost URL, this updates the tests to reflect that.
* Increase test timeout to avoid travis failing
2019-07-16 13:41:39 +01:00
Juga Paazmaya
1609c8d667 Updates Node.js min version to 8 and removes npm as dependency (#228)
* Update Node.js min version to 8 and remove npm as dependency

* Test against Node.js 8 and 10 at Travis

* Add Node.js v12 in Travis
2019-05-15 12:32:20 +01:00
Jose Bolos
c1dcbf4436 Adds debugging info to startup log (#225)
There are two ways of setting a configuration for this app: config files, and environment variables. This makes it easy for the app to run with a different config from the one that you intend to run it with.

Currently, only the NODE_ENV variable and server url are being printed out on startup.

This PR adds the database config and the cron config to the details being displayed. This may help debug configuration issues, database issues, and specially making easier to understand what config is being used when for example running in a container.
2019-05-15 10:57:08 +01:00
James Loveridge
ef769d95e1 Add MongoDB installation instructions for Mac/Linux (#218) 2018-10-24 20:19:35 +01:00
Rowan Manning
1f685bafa2 Version 2.4.2 2.4.2 2018-06-21 11:40:50 +01:00