* 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
* 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>
* 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>
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
* 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
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.
* 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>
* 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
* 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.
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.
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.
* 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