Compare commits

...

5 Commits

Author SHA1 Message Date
Rowan Manning
ea7e6f4052 Version 1.12.1 2016-06-05 12:55:43 +01:00
Andrew Mee
a3bc8c0443 Merge pull request #136 from pa11y/repo-rename
Rename all the repos and uppercase Pa11y
2016-06-02 10:26:20 +01:00
Rowan Manning
b1ae55c802 Rename all the repos and uppercase Pa11y 2016-06-01 20:57:09 +01:00
Andrew Mee
0a14a321d2 Version 1.12.0 2016-05-26 15:45:03 +01:00
Rowan Manning
ae6208d87e Support Node.js 0.10–6 (#132)
* Update dependencies

* Switch from jsdom to cheerio

* Update the supported Node.js versions

* Recompile the client-side CSS and JS
2016-05-26 15:33:58 +01:00
58 changed files with 436 additions and 420 deletions

View File

@@ -3,16 +3,11 @@
language: node_js
matrix:
include:
# Run tests in Node.js 0.10 (unsupported)
- node_js: '0.10'
# Run tests in Node.js 0.12
- node_js: '0.12'
# Allow Node.js 0.10 to fail it's unsupported
allow_failures:
- node_js: '0.10'
- node_js: '4'
- node_js: '5'
- node_js: '6'
# Build only master (and pull-requests)
branches:

View File

@@ -1,6 +1,28 @@
# Changelog
## 1.12.1 (2016-06-05)
* Update references/links after a repo rename
## 1.12.0 (2016-05-26)
* Update Node.js version support to 0.106.0
* Update dependencies
* body-parser: added at ~1.15
* chalk: ~0.2 to ~1.1
* compression: added at ~1.6
* express: ~3.4 to ~4.13
* express-hbs: ~0.2 to ~1.0
* moment: ~2.2 to ~2.13
* pa11y-webservice: ~1.10 to ~1.11
* pa11y-webservice-client-node: ~1.1 to ~1.2
* bower: ~1.2 to ~1.7
* cheerio: added at ~0.20
* jsdom: removed
* request: ~2.27 to ^2
* uglify-js: ~2.4 to ~2.6
## 1.11.0 (2016-05-23)
* Add the ability to configure task wait times

View File

@@ -1,7 +1,7 @@
pa11y-dashboard
Pa11y Dashboard
===============
pa11y-dashboard is a web interface to the [pa11y][pa11y] accessibility reporter; allowing you to focus on *fixing* issues rather than hunting them down.
Pa11y Dashboard is a web interface to the [Pa11y][pa11y] accessibility reporter; allowing you to focus on *fixing* issues rather than hunting them down.
![Version][shield-version]
[![Node.js version support][shield-node]][info-node]
@@ -10,7 +10,7 @@ pa11y-dashboard is a web interface to the [pa11y][pa11y] accessibility reporter;
---
✨ 🔜 ✨ The Pa11y team is very excited to announce plans for the successor to pa11y-dashboard and pa11y-webservice, codename "Sidekick". Help us define the features that you want to see by visiting the [proposal][sidekick-proposal]. ✨
✨ 🔜 ✨ The Pa11y team is very excited to announce plans for the successor to Pa11y Dashboard and Pa11y Webservice, codename "Sidekick". Help us define the features that you want to see by visiting the [proposal][sidekick-proposal]. ✨
---
@@ -22,7 +22,7 @@ pa11y-dashboard is a web interface to the [pa11y][pa11y] accessibility reporter;
Setup
-----
pa11y-dashboard requires [Node.js][node] 0.10+ and [PhantomJS][phantom]. See the [pa11y][pa11y] documentation for detailed instructions on how to install these dependencies on your operating system.
Pa11y Dashboard requires [Node.js][node] 0.10+ and [PhantomJS][phantom]. See the [Pa11y][pa11y] documentation for detailed instructions on how to install these dependencies on your operating system.
You'll also need to have [MongoDB][mongo] installed and running. See the [MongoDB install guide][mongo-install] for more information on this.
@@ -62,7 +62,7 @@ See [development instructions](#development) for more information about running
Configurations
--------------
The boot configurations for pa11y-dashboard are as follows. Look at the sample JSON files in the repo for example usage.
The boot configurations for Pa11y Dashboard are as follows. Look at the sample JSON files in the repo for example usage.
### port
*(number)* The port to run the application on. Set via a config file or the `PORT` environment variable.
@@ -77,13 +77,13 @@ The boot configurations for pa11y-dashboard are as follows. Look at the sample J
*(string)* A message to display prominently on the site home page. Defaults to `null`.
### webservice
This can either be an object containing [pa11y-webservice configurations][pa11y-webservice-config], or a string which is the base URL of a [pa11y-webservice][pa11y-webservice] instance you are running separately. If using environment variables, prefix the webservice vars with `WEBSERVICE_`.
This can either be an object containing [Pa11y Webservice configurations][pa11y-webservice-config], or a string which is the base URL of a [Pa11y Webservice][pa11y-webservice] instance you are running separately. If using environment variables, prefix the webservice vars with `WEBSERVICE_`.
Development
-----------
To develop pa11y-dashboard, you'll need to clone the repo and get set up as outlined in the [setup guide](#setup).
To develop Pa11y Dashboard, you'll need to clone the repo and get set up as outlined in the [setup guide](#setup).
You'll need to start the application in test mode with:
@@ -117,7 +117,7 @@ Useful Resources
License
-------
pa11y-dashboard is licensed under the [GNU General Public License 3.0][info-license].
Pa11y Dashboard is licensed under the [GNU General Public License 3.0][info-license].
Copyright © 20132016, Springer Nature
@@ -127,17 +127,17 @@ Copyright © 20132016, Springer Nature
[mongo-install]: https://docs.mongodb.org/manual/installation/
[node]: http://nodejs.org/
[pa11y]: https://github.com/pa11y/pa11y
[pa11y-webservice-config]: https://github.com/pa11y/pa11y-webservice#configurations
[pa11y-webservice-config]: https://github.com/pa11y/webservice#configurations
[phantom]: http://phantomjs.org/
[resource-una-k]: https://una.im/pa11y-dash/
[sidekick-proposal]: https://github.com/pa11y/sidekick/blob/master/PROPOSAL.md
[travis]: https://travis-ci.org/pa11y/pa11y-dashboard
[travis-img]: https://travis-ci.org/pa11y/pa11y-dashboard.png?branch=master
[travis]: https://travis-ci.org/pa11y/dashboard
[travis-img]: https://travis-ci.org/pa11y/dashboard.png?branch=master
[info-license]: LICENSE
[info-node]: package.json
[info-build]: https://travis-ci.org/pa11y/pa11y-dashboard
[info-build]: https://travis-ci.org/pa11y/dashboard
[shield-license]: https://img.shields.io/badge/license-GPL%203.0-blue.svg
[shield-node]: https://img.shields.io/badge/node.js%20support-0.10-brightgreen.svg
[shield-version]: https://img.shields.io/badge/version-1.11.0-blue.svg
[shield-build]: https://img.shields.io/travis/pa11y/pa11y-dashboard/master.svg
[shield-node]: https://img.shields.io/badge/node.js%20support-0.106-brightgreen.svg
[shield-version]: https://img.shields.io/badge/version-1.12.1-blue.svg
[shield-build]: https://img.shields.io/travis/pa11y/dashboard/master.svg

37
app.js
View File

@@ -1,20 +1,22 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var bodyParser = require('body-parser');
var compression = require('compression');
var createClient = require('pa11y-webservice-client-node');
var EventEmitter = require('events').EventEmitter;
var express = require('express');
@@ -40,7 +42,7 @@ function initApp(config, callback) {
app.webservice = createClient(webserviceUrl);
// Compression
app.express.use(express.compress());
app.express.use(compression());
// Public files
app.express.use(express.static(__dirname + '/public', {
@@ -49,26 +51,28 @@ function initApp(config, callback) {
// General express config
app.express.disable('x-powered-by');
app.express.use(express.bodyParser());
app.express.use(bodyParser.urlencoded({
extended: true
}));
// View engine
app.express.set('views', __dirname + '/view');
app.express.engine('html', hbs.express3({
app.express.engine('html', hbs.express4({
extname: '.html',
contentHelperName: 'content',
layoutsDir: __dirname + '/view/layout',
partialsDir: __dirname + '/view/partial',
defaultLayout: __dirname + '/view/layout/default'
}));
app.express.set('views', __dirname + '/view');
app.express.set('view engine', 'html');
// View helpers
require('./view/helper/date')(hbs.registerHelper);
require('./view/helper/string')(hbs.registerHelper);
require('./view/helper/url')(hbs.registerHelper);
require('./view/helper/date')(hbs);
require('./view/helper/string')(hbs);
require('./view/helper/url')(hbs);
// Populate view locals
app.express.locals({
app.express.locals = {
lang: 'en',
year: (new Date()).getFullYear(),
version: pkg.version,
@@ -76,12 +80,13 @@ function initApp(config, callback) {
bugtracker: pkg.bugs,
noindex: config.noindex,
readonly: config.readonly,
siteMessage: config.siteMessage
});
siteMessage: config.siteMessage,
settings: {}
};
app.express.use(function(req, res, next) {
res.locals.isHomePage = (req.path === '/');
res.locals.host = req.host;
res.locals.host = req.hostname;
next();
});
@@ -107,7 +112,7 @@ function initApp(config, callback) {
app.express.use(function(err, req, res, next) {
/* jshint unused: false */
if (err.code === 'ECONNREFUSED') {
err = new Error('Could not connect to pa11y-webservice');
err = new Error('Could not connect to Pa11y Webservice');
}
app.emit('route-error', err);
if (process.env.NODE_ENV !== 'production') {

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
// jscs:disable maximumLineLength
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
@@ -26,7 +26,7 @@ process.on('SIGINT', function() {
require('./app')(config, function(err, app) {
console.log('');
console.log(chalk.underline.magenta('pa11y-dashboard started'));
console.log(chalk.underline.magenta('Pa11y Dashboard started'));
console.log(chalk.grey('mode: %s'), process.env.NODE_ENV);
console.log(chalk.grey('uri: %s'), app.address);
@@ -42,7 +42,7 @@ require('./app')(config, function(err, app) {
if (typeof config.webservice === 'object') {
require('pa11y-webservice')(config.webservice, function(err, webservice) {
console.log('');
console.log(chalk.underline.cyan('pa11y-webservice started'));
console.log(chalk.underline.cyan('Pa11y Webservice started'));
console.log(chalk.grey('mode: %s'), process.env.NODE_ENV);
console.log(chalk.grey('uri: %s'), webservice.server.info.uri);
});

View File

@@ -1,9 +1,9 @@
{
"name": "pa11y-dashboard",
"version": "1.11.0",
"version": "1.12.1",
"private": true,
"description": "pa11y-dashboard is a visual web interface to the pa11y accessibility reporter",
"description": "Pa11y Dashboard is a visual web interface to the Pa11y accessibility reporter",
"keywords": [ "accessibility", "analysis", "report" ],
"contributors": [
"Perry Harlock (http://www.phwebs.co.uk/)",
@@ -12,33 +12,35 @@
"repository": {
"type": "git",
"url": "https://github.com/pa11y/pa11y-dashboard.git"
"url": "https://github.com/pa11y/dashboard.git"
},
"homepage": "https://github.com/pa11y/pa11y-dashboard",
"bugs": "https://github.com/pa11y/pa11y-dashboard/issues",
"homepage": "https://github.com/pa11y/dashboard",
"bugs": "https://github.com/pa11y/dashboard/issues",
"engines": {
"node": ">=0.10"
},
"dependencies": {
"chalk": "~0.2",
"express": "~3.4",
"express-hbs": "~0.2",
"moment": "~2.2",
"pa11y-webservice": "~1.10",
"pa11y-webservice-client-node": "~1.1",
"underscore": "~1.5"
"body-parser": "~1.15",
"chalk": "~1.1",
"compression": "~1.6",
"express": "~4.13",
"express-hbs": "~1.0",
"moment": "~2.13",
"pa11y-webservice": "~1.11",
"pa11y-webservice-client-node": "~1.2",
"underscore": "~1.8"
},
"devDependencies": {
"bower": "~1.2",
"bower": "~1.7",
"cheerio": "~0.20",
"jscs": "^2",
"jsdom": "^3",
"jshint": "^2",
"less": "~1.5",
"less": "~2.7",
"mocha": "^2",
"proclaim": "^3",
"request": "~2.27",
"uglify-js": "~2.4"
"request": "^2",
"uglify-js": "~2.6"
},
"scripts": {

File diff suppressed because one or more lines are too long

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
$(document).ready(function(){

12
public/js/site.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
// Making up for the non support of IE8 and IE7 in Bootstrap 3
.ie7, .ie8 {

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
/* No javascript */
.no-javascript {

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
/* Media queries */
@media (max-width:991px) {

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
/* Site specific styling */

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,21 +1,21 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var jsdom = require('jsdom');
var cheerio = require('cheerio');
var request = require('request');
module.exports = createNavigator;
@@ -29,13 +29,12 @@ function createNavigator(baseUrl, store) {
store.request = null;
store.response = null;
store.status = null;
store.window = null;
request({
url: baseUrl + opts.endpoint,
method: opts.method || 'GET',
body: opts.body,
json: true,
form: opts.form,
json: opts.json || false,
qs: opts.query,
followAllRedirects: true
}, function(err, res, body) {
@@ -46,19 +45,11 @@ function createNavigator(baseUrl, store) {
store.status = res.statusCode;
if (opts.nonDom) {
store.window = null;
store.dom = null;
callback();
} else {
jsdom.env(
store.body,
function(err, window) {
store.window = window;
store.dom = window.document;
callback();
}
);
store.dom = cheerio.load(store.body);
}
callback();
});

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,23 +1,23 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var assert = require('proclaim');
describe('GET /', function() {
describe.only('GET /', function() {
beforeEach(function(done) {
var req = {
@@ -32,61 +32,61 @@ describe('GET /', function() {
});
it('should display an "Add new URL" button', function() {
var elem = this.last.dom.querySelectorAll('[data-test=add-task]');
var elem = this.last.dom('[data-test=add-task]');
assert.strictEqual(elem.length, 1);
assert.strictEqual(elem[0].getAttribute('href'), '/new');
assert.strictEqual(elem.eq(0).attr('href'), '/new');
});
it('should display all of the expected tasks', function() {
var tasks = this.last.dom.querySelectorAll('[data-test=task]');
var tasks = this.last.dom('[data-test=task]');
assert.strictEqual(tasks.length, 3);
assert.match(tasks[0].textContent, /npg home\s+\(wcag2aa\)/i);
assert.match(tasks[1].textContent, /npg home\s+\(wcag2aaa\)/i);
assert.match(tasks[2].textContent, /nature news\s+\(section508\)/i);
assert.match(tasks.eq(0).text(), /npg home\s+\(wcag2aa\)/i);
assert.match(tasks.eq(1).text(), /npg home\s+\(wcag2aaa\)/i);
assert.match(tasks.eq(2).text(), /nature news\s+\(section508\)/i);
});
it('should have links to each task', function() {
var tasks = this.last.dom.querySelectorAll('[data-test=task]');
assert.strictEqual(tasks[0].querySelectorAll('[href="/abc000000000000000000001"]').length, 1);
assert.strictEqual(tasks[1].querySelectorAll('[href="/abc000000000000000000002"]').length, 1);
assert.strictEqual(tasks[2].querySelectorAll('[href="/abc000000000000000000003"]').length, 1);
var tasks = this.last.dom('[data-test=task]');
assert.strictEqual(tasks.eq(0).find('[href="/abc000000000000000000001"]').length, 1);
assert.strictEqual(tasks.eq(1).find('[href="/abc000000000000000000002"]').length, 1);
assert.strictEqual(tasks.eq(2).find('[href="/abc000000000000000000003"]').length, 1);
});
it('should display an "Edit" button for each task', function() {
var tasks = this.last.dom.querySelectorAll('[data-test=task]');
assert.strictEqual(tasks[0].querySelectorAll('[href="/abc000000000000000000001/edit"]').length, 1);
assert.strictEqual(tasks[1].querySelectorAll('[href="/abc000000000000000000002/edit"]').length, 1);
assert.strictEqual(tasks[2].querySelectorAll('[href="/abc000000000000000000003/edit"]').length, 1);
var tasks = this.last.dom('[data-test=task]');
assert.strictEqual(tasks.eq(0).find('[href="/abc000000000000000000001/edit"]').length, 1);
assert.strictEqual(tasks.eq(1).find('[href="/abc000000000000000000002/edit"]').length, 1);
assert.strictEqual(tasks.eq(2).find('[href="/abc000000000000000000003/edit"]').length, 1);
});
it('should display a "Delete" button for each task', function() {
var tasks = this.last.dom.querySelectorAll('[data-test=task]');
assert.strictEqual(tasks[0].querySelectorAll('[href="/abc000000000000000000001/delete"]').length, 1);
assert.strictEqual(tasks[1].querySelectorAll('[href="/abc000000000000000000002/delete"]').length, 1);
assert.strictEqual(tasks[2].querySelectorAll('[href="/abc000000000000000000003/delete"]').length, 1);
var tasks = this.last.dom('[data-test=task]');
assert.strictEqual(tasks.eq(0).find('[href="/abc000000000000000000001/delete"]').length, 1);
assert.strictEqual(tasks.eq(1).find('[href="/abc000000000000000000002/delete"]').length, 1);
assert.strictEqual(tasks.eq(2).find('[href="/abc000000000000000000003/delete"]').length, 1);
});
it('should display a "Run" button for each task', function() {
var tasks = this.last.dom.querySelectorAll('[data-test=task]');
assert.strictEqual(tasks[0].querySelectorAll('[href="/abc000000000000000000001/run"]').length, 1);
assert.strictEqual(tasks[1].querySelectorAll('[href="/abc000000000000000000002/run"]').length, 1);
assert.strictEqual(tasks[2].querySelectorAll('[href="/abc000000000000000000003/run"]').length, 1);
var tasks = this.last.dom('[data-test=task]');
assert.strictEqual(tasks.eq(0).find('[href="/abc000000000000000000001/run"]').length, 1);
assert.strictEqual(tasks.eq(1).find('[href="/abc000000000000000000002/run"]').length, 1);
assert.strictEqual(tasks.eq(2).find('[href="/abc000000000000000000003/run"]').length, 1);
});
it('should display the task result counts if the task has been run', function() {
var tasks = this.last.dom.querySelectorAll('[data-test=task]');
assert.match(tasks[0].textContent, /1\s*errors/i);
assert.match(tasks[0].textContent, /2\s*warnings/i);
assert.match(tasks[0].textContent, /3\s*notices/i);
var tasks = this.last.dom('[data-test=task]');
assert.match(tasks.eq(0).text(), /1\s*errors/i);
assert.match(tasks.eq(0).text(), /2\s*warnings/i);
assert.match(tasks.eq(0).text(), /3\s*notices/i);
});
it('should display a message indicating that there are no results if the task has not been run', function() {
var tasks = this.last.dom.querySelectorAll('[data-test=task]');
assert.match(tasks[2].textContent, /no results/i);
var tasks = this.last.dom('[data-test=task]');
assert.match(tasks.eq(2).text(), /no results/i);
});
it('should not display an alert message', function() {
assert.strictEqual(this.last.dom.querySelectorAll('[data-test=alert]').length, 0);
assert.strictEqual(this.last.dom('[data-test=alert]').length, 0);
});
});

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
@@ -32,65 +32,65 @@ describe('GET /new', function() {
});
it('should not display an error message', function() {
assert.strictEqual(this.last.dom.querySelectorAll('[data-test=error]').length, 0);
assert.strictEqual(this.last.dom('[data-test=error]').length, 0);
});
it('should have an "Add new URL" form', function() {
var form = this.last.dom.querySelectorAll('[data-test=new-url-form]')[0];
var form = this.last.dom('[data-test=new-url-form]').eq(0);
assert.isDefined(form);
assert.strictEqual(form.getAttribute('action'), '/new');
assert.strictEqual(form.getAttribute('method'), 'post');
assert.strictEqual(form.attr('action'), '/new');
assert.strictEqual(form.attr('method'), 'post');
});
describe('"Add New URL" form', function() {
beforeEach(function() {
this.form = this.last.dom.querySelectorAll('[data-test=new-url-form]')[0];
this.form = this.last.dom('[data-test=new-url-form]').eq(0);
});
it('should have a "name" field', function() {
var field = this.form.querySelectorAll('input[name=name]')[0];
var field = this.form.find('input[name=name]').eq(0);
assert.isDefined(field);
assert.strictEqual(field.getAttribute('type'), 'text');
assert.strictEqual(field.getAttribute('value'), '');
assert.strictEqual(field.attr('type'), 'text');
assert.strictEqual(field.attr('value'), '');
});
it('should have a "url" field', function() {
var field = this.form.querySelectorAll('input[name=url]')[0];
var field = this.form.find('input[name=url]').eq(0);
assert.isDefined(field);
assert.strictEqual(field.getAttribute('type'), 'url');
assert.strictEqual(field.getAttribute('value'), '');
assert.strictEqual(field.attr('type'), 'url');
assert.strictEqual(field.attr('value'), '');
});
it('should have a "wait" field', function() {
var field = this.form.querySelectorAll('input[name=wait]')[0];
var field = this.form.find('input[name=wait]').eq(0);
assert.isDefined(field);
assert.strictEqual(field.getAttribute('type'), 'text');
assert.strictEqual(field.getAttribute('value'), '');
assert.strictEqual(field.attr('type'), 'text');
assert.strictEqual(field.attr('value'), '');
});
it('should have a "username" field', function() {
var field = this.form.querySelectorAll('input[name=username]')[0];
var field = this.form.find('input[name=username]').eq(0);
assert.isDefined(field);
assert.strictEqual(field.getAttribute('type'), 'text');
assert.strictEqual(field.getAttribute('value'), '');
assert.strictEqual(field.attr('type'), 'text');
assert.strictEqual(field.attr('value'), '');
});
it('should have a "password" field', function() {
var field = this.form.querySelectorAll('input[name=password]')[0];
var field = this.form.find('input[name=password]').eq(0);
assert.isDefined(field);
assert.strictEqual(field.getAttribute('type'), 'text');
assert.strictEqual(field.getAttribute('value'), '');
assert.strictEqual(field.attr('type'), 'text');
assert.strictEqual(field.attr('value'), '');
});
it('should have a "standard" field', function() {
var field = this.form.querySelectorAll('select[name=standard]')[0];
var field = this.form.find('select[name=standard]').eq(0);
assert.isDefined(field);
assert.strictEqual(field.querySelectorAll('option').length, 4);
assert.strictEqual(field.find('option').length, 4);
});
it('should have "ignore" fields', function() {
var fields = this.form.querySelectorAll('input[name="ignore[]"]');
var fields = this.form.find('input[name="ignore[]"]');
assert.isDefined(fields);
assert.notStrictEqual(fields.length, 0);
});
@@ -107,7 +107,7 @@ describe('POST /new', function() {
var req = {
method: 'POST',
endpoint: '/new',
body: {
form: {
name: '',
url: ''
}
@@ -120,7 +120,7 @@ describe('POST /new', function() {
});
it('should display an error message', function() {
assert.strictEqual(this.last.dom.querySelectorAll('[data-test=error]').length, 1);
assert.strictEqual(this.last.dom('[data-test=error]').length, 1);
});
});
@@ -131,7 +131,7 @@ describe('POST /new', function() {
var req = {
method: 'POST',
endpoint: '/new',
body: {
form: {
name: 'Example',
url: 'http://example.com/',
standard: 'WCAG2AA'
@@ -156,11 +156,11 @@ describe('POST /new', function() {
});
it('should not display an error message', function() {
assert.strictEqual(this.last.dom.querySelectorAll('[data-test=error]').length, 0);
assert.strictEqual(this.last.dom('[data-test=error]').length, 0);
});
it('should display a success message', function() {
var alert = this.last.dom.querySelectorAll('[data-test=alert]')[0];
var alert = this.last.dom('[data-test=alert]').eq(0);
assert.isDefined(alert);
assert.match(alert.textContent, /url has been added/i);
});

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
@@ -44,7 +44,8 @@ describe('GET /<task-id>/<result-id>.json', function() {
var req = {
method: 'GET',
endpoint: '/abc000000000000000000001/def000000000000000000001.json',
nonDom: true
nonDom: true,
json: true
};
this.navigate(req, done);
});

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
@@ -32,37 +32,37 @@ describe('GET /<task-id>/<result-id>', function() {
});
it('should display a "Download CSV" button', function() {
var elem = this.last.dom.querySelectorAll('[data-test=download-csv]');
var elem = this.last.dom('[data-test=download-csv]');
assert.strictEqual(elem.length, 1);
assert.strictEqual(elem[0].getAttribute('href'), '/abc000000000000000000001/def000000000000000000001.csv');
assert.strictEqual(elem.eq(0).attr('href'), '/abc000000000000000000001/def000000000000000000001.csv');
});
it('should display a "Download JSON" button', function() {
var elem = this.last.dom.querySelectorAll('[data-test=download-json]');
var elem = this.last.dom('[data-test=download-json]');
assert.strictEqual(elem.length, 1);
assert.strictEqual(elem[0].getAttribute('href'), '/abc000000000000000000001/def000000000000000000001.json');
assert.strictEqual(elem.eq(0).attr('href'), '/abc000000000000000000001/def000000000000000000001.json');
});
it('should display a link back to the task', function() {
assert.isDefined(this.last.dom.querySelectorAll('[href="/abc000000000000000000001"]')[0]);
assert.isDefined(this.last.dom('[href="/abc000000000000000000001"]').eq(0));
});
it('should display errors', function() {
var elem = this.last.dom.querySelectorAll('[data-test=task-errors]')[0];
var elem = this.last.dom('[data-test=task-errors]').eq(0);
assert.isDefined(elem);
assert.match(elem.textContent, /errors \( 1 \)/i);
assert.match(elem.text(), /errors \( 1 \)/i);
});
it('should display warnings', function() {
var elem = this.last.dom.querySelectorAll('[data-test=task-warnings]')[0];
var elem = this.last.dom('[data-test=task-warnings]').eq(0);
assert.isDefined(elem);
assert.match(elem.textContent, /warnings \( 2 \)/i);
assert.match(elem.text(), /warnings \( 2 \)/i);
});
it('should display notices', function() {
var elem = this.last.dom.querySelectorAll('[data-test=task-notices]')[0];
var elem = this.last.dom('[data-test=task-notices]').eq(0);
assert.isDefined(elem);
assert.match(elem.textContent, /notices \( 3 \)/i);
assert.match(elem.text(), /notices \( 3 \)/i);
});
});

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
@@ -32,14 +32,14 @@ describe('GET /<task-id>/delete', function() {
});
it('should have a "Delete URL" form', function() {
var form = this.last.dom.querySelectorAll('[data-test=delete-url-form]')[0];
var form = this.last.dom('[data-test=delete-url-form]').eq(0);
assert.isDefined(form);
assert.strictEqual(form.getAttribute('action'), '/abc000000000000000000001/delete');
assert.strictEqual(form.getAttribute('method'), 'post');
assert.strictEqual(form.attr('action'), '/abc000000000000000000001/delete');
assert.strictEqual(form.attr('method'), 'post');
});
it('should display a link back to the task page', function() {
assert.greaterThan(this.last.dom.querySelectorAll('[href="/abc000000000000000000001"]').length, 0);
assert.greaterThan(this.last.dom('[href="/abc000000000000000000001"]').length, 0);
});
});
@@ -70,9 +70,9 @@ describe('POST /<task-id>/delete', function() {
});
it('should display a success message', function() {
var alert = this.last.dom.querySelectorAll('[data-test=alert]')[0];
var alert = this.last.dom('[data-test=alert]').eq(0);
assert.isDefined(alert);
assert.match(alert.textContent, /been deleted/i);
assert.match(alert.text(), /been deleted/i);
});
});

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
@@ -32,66 +32,66 @@ describe('GET /<task-id>/edit', function() {
});
it('should have an "Edit URL" form', function() {
var form = this.last.dom.querySelectorAll('[data-test=edit-url-form]')[0];
var form = this.last.dom('[data-test=edit-url-form]').eq(0);
assert.isDefined(form);
assert.strictEqual(form.getAttribute('action'), '/abc000000000000000000001/edit');
assert.strictEqual(form.getAttribute('method'), 'post');
assert.strictEqual(form.attr('action'), '/abc000000000000000000001/edit');
assert.strictEqual(form.attr('method'), 'post');
});
it('should display a link back to the task page', function() {
assert.greaterThan(this.last.dom.querySelectorAll('[href="/abc000000000000000000001"]').length, 0);
assert.greaterThan(this.last.dom('[href="/abc000000000000000000001"]').length, 0);
});
describe('"Edit URL" form', function() {
beforeEach(function() {
this.form = this.last.dom.querySelectorAll('[data-test=edit-url-form]')[0];
this.form = this.last.dom('[data-test=edit-url-form]').eq(0);
});
it('should have a "name" field', function() {
var field = this.form.querySelectorAll('input[name=name]')[0];
var field = this.form.find('input[name=name]').eq(0);
assert.isDefined(field);
assert.strictEqual(field.getAttribute('type'), 'text');
assert.strictEqual(field.getAttribute('value'), 'NPG Home');
assert.strictEqual(field.attr('type'), 'text');
assert.strictEqual(field.attr('value'), 'NPG Home');
});
it('should have a disabled "url" field', function() {
var field = this.form.querySelectorAll('input[name=url]')[0];
var field = this.form.find('input[name=url]').eq(0);
assert.isDefined(field);
assert.strictEqual(field.getAttribute('type'), 'url');
assert.strictEqual(field.getAttribute('value'), 'nature.com');
assert.isDefined(field.getAttribute('disabled'));
assert.strictEqual(field.attr('type'), 'url');
assert.strictEqual(field.attr('value'), 'nature.com');
assert.isDefined(field.attr('disabled'));
});
it('should have a "wait" field', function() {
var field = this.form.querySelectorAll('input[name=wait]')[0];
var field = this.form.find('input[name=wait]').eq(0);
assert.isDefined(field);
assert.strictEqual(field.getAttribute('type'), 'text');
assert.strictEqual(field.getAttribute('value'), '0');
assert.strictEqual(field.attr('type'), 'text');
assert.strictEqual(field.attr('value'), '0');
});
it('should have a disabled "standard" field', function() {
var field = this.form.querySelectorAll('select[name=standard]')[0];
var field = this.form.find('select[name=standard]').eq(0);
assert.isDefined(field);
assert.isDefined(field.getAttribute('disabled'));
assert.isDefined(field.attr('disabled'));
});
it('should have a "username" field', function() {
var field = this.form.querySelectorAll('input[name=username]')[0];
var field = this.form.find('input[name=username]').eq(0);
assert.isDefined(field);
assert.strictEqual(field.getAttribute('type'), 'text');
assert.strictEqual(field.getAttribute('value'), 'user');
assert.strictEqual(field.attr('type'), 'text');
assert.strictEqual(field.attr('value'), 'user');
});
it('should have a "password" field', function() {
var field = this.form.querySelectorAll('input[name=password]')[0];
var field = this.form.find('input[name=password]').eq(0);
assert.isDefined(field);
assert.strictEqual(field.getAttribute('type'), 'text');
assert.strictEqual(field.getAttribute('value'), 'access');
assert.strictEqual(field.attr('type'), 'text');
assert.strictEqual(field.attr('value'), 'access');
});
it('should have "ignore" fields', function() {
var fields = this.form.querySelectorAll('input[name="ignore[]"]');
var fields = this.form.find('input[name="ignore[]"]');
assert.isDefined(fields);
assert.notStrictEqual(fields.length, 0);
});
@@ -106,7 +106,7 @@ describe('POST /<task-id>/edit', function() {
var req = {
method: 'POST',
endpoint: '/abc000000000000000000001/edit',
body: {
form: {
name: 'foo',
username: 'newuser',
password: 'secure',
@@ -131,9 +131,9 @@ describe('POST /<task-id>/edit', function() {
});
it('should display a success message', function() {
var alert = this.last.dom.querySelectorAll('[data-test=alert]')[0];
var alert = this.last.dom('[data-test=alert]').eq(0);
assert.isDefined(alert);
assert.match(alert.textContent, /been saved/i);
assert.match(alert.text(), /been saved/i);
});
});

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
@@ -34,46 +34,46 @@ describe('GET /<task-id>', function() {
});
it('should display an "Edit" button', function() {
assert.strictEqual(this.last.dom.querySelectorAll('[href="/abc000000000000000000001/edit"]').length, 1);
assert.strictEqual(this.last.dom('[href="/abc000000000000000000001/edit"]').length, 1);
});
it('should display a "Delete" button', function() {
assert.strictEqual(this.last.dom.querySelectorAll('[href="/abc000000000000000000001/delete"]').length, 1);
assert.strictEqual(this.last.dom('[href="/abc000000000000000000001/delete"]').length, 1);
});
it('should display a "Run" button', function() {
assert.strictEqual(this.last.dom.querySelectorAll('[href="/abc000000000000000000001/run"]').length, 1);
assert.strictEqual(this.last.dom('[href="/abc000000000000000000001/run"]').length, 1);
});
it('should display a "Download CSV" button for the latest result', function() {
assert.strictEqual(this.last.dom.querySelectorAll('[href="/abc000000000000000000001/def000000000000000000001.csv"]').length, 1);
assert.strictEqual(this.last.dom('[href="/abc000000000000000000001/def000000000000000000001.csv"]').length, 1);
});
it('should display a "Download JSON" button for the latest result', function() {
assert.strictEqual(this.last.dom.querySelectorAll('[href="/abc000000000000000000001/def000000000000000000001.json"]').length, 1);
assert.strictEqual(this.last.dom('[href="/abc000000000000000000001/def000000000000000000001.json"]').length, 1);
});
it('should display links to all results', function() {
assert.isDefined(this.last.dom.querySelectorAll('[href="/abc000000000000000000001/def000000000000000000001"]')[0]);
assert.isDefined(this.last.dom.querySelectorAll('[href="/abc000000000000000000001/def000000000000000000003"]')[0]);
assert.isDefined(this.last.dom('[href="/abc000000000000000000001/def000000000000000000001"]').eq(0));
assert.isDefined(this.last.dom('[href="/abc000000000000000000001/def000000000000000000003"]').eq(0));
});
it('should display errors', function() {
var elem = this.last.dom.querySelectorAll('[data-test=task-errors]')[0];
var elem = this.last.dom('[data-test=task-errors]').eq(0);
assert.isDefined(elem);
assert.match(elem.textContent, /errors \( 1 \)/i);
assert.match(elem.text(), /errors \( 1 \)/i);
});
it('should display warnings', function() {
var elem = this.last.dom.querySelectorAll('[data-test=task-warnings]')[0];
var elem = this.last.dom('[data-test=task-warnings]').eq(0);
assert.isDefined(elem);
assert.match(elem.textContent, /warnings \( 2 \)/i);
assert.match(elem.text(), /warnings \( 2 \)/i);
});
it('should display notices', function() {
var elem = this.last.dom.querySelectorAll('[data-test=task-notices]')[0];
var elem = this.last.dom('[data-test=task-notices]').eq(0);
assert.isDefined(elem);
assert.match(elem.textContent, /notices \( 3 \)/i);
assert.match(elem.text(), /notices \( 3 \)/i);
});
});
@@ -93,15 +93,15 @@ describe('GET /<task-id>', function() {
});
it('should display a "Run" button', function() {
var elem = this.last.dom.querySelectorAll('[data-test=run-task]');
var elem = this.last.dom('[data-test=run-task]');
assert.strictEqual(elem.length, 1);
assert.strictEqual(elem[0].getAttribute('href'), '/abc000000000000000000003/run');
assert.strictEqual(elem.eq(0).attr('href'), '/abc000000000000000000003/run');
});
it('should display a message indicating that there are no results', function() {
var alert = this.last.dom.querySelectorAll('[data-test=alert]')[0];
var alert = this.last.dom('[data-test=alert]').eq(0);
assert.isDefined(alert);
assert.match(alert.textContent, /there are no results to show/i);
assert.match(alert.text(), /there are no results to show/i);
});
});

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
@@ -36,9 +36,9 @@ describe('GET /<task-id>/run', function() {
});
it('should display a success message', function() {
var alert = this.last.dom.querySelectorAll('[data-test=alert]')[0];
var alert = this.last.dom('[data-test=alert]').eq(0);
assert.isDefined(alert);
assert.match(alert.textContent, /new results are being generated/i);
assert.match(alert.text(), /new results are being generated/i);
});
});

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-8">
<h1>Hmmm, this page indicates a 404 error.</h1>

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-8">
<h1>Eeek! 500 error. This is serious.</h1>

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
@@ -19,20 +19,20 @@ var moment = require('moment');
module.exports = helper;
function helper(register) {
function helper(hbs) {
// Format a date with Moment
register('date-format', function(context, block) {
hbs.registerHelper('date-format', function(context, block) {
var format = block.hash.format || 'YYYY-MM-DD HH:mm:ss';
return moment(context).format(format);
});
// Get a relative date
register('date-relative', function(context) {
hbs.registerHelper('date-relative', function(context) {
return moment(context).fromNow();
});
register('date-timestamp', function(context) {
hbs.registerHelper('date-timestamp', function(context) {
return moment(context).valueOf();
});

View File

@@ -2,10 +2,10 @@
module.exports = helper;
function helper(register) {
function helper(hbs) {
// Convert a string to lower-case
register('lowercase', function(context) {
hbs.registerHelper('lowercase', function(context) {
return context.toLowerCase();
});

View File

@@ -1,26 +1,26 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
module.exports = helper;
function helper(register) {
function helper(hbs) {
// Simplify url by removing (eg http://, https://, trailing slashes) from url
register('simplify-url', function(context) {
hbs.registerHelper('simplify-url', function(context) {
return context.replace(/^https?:\/\//i, '').replace(/\/$/, '').toLowerCase();
});

View File

@@ -1,20 +1,20 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}pa11y-dashboard{{/content}}
{{#content "title"}}Pa11y Dashboard{{/content}}
<div data-control="task-list">

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<!DOCTYPE html>
<html lang="{{lang}}" class="no-javascript">

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#unless isHomePage}}
<div class="container">

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-12 clearfix">
<div class="graph-container graph-spacer ruled clearfix">
@@ -58,8 +58,8 @@ along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
<div class="col-md-12 hidden">
<div class="graph-spacer ruled">
<table id="graph-data" class="table graph-table" summary="Accessibility results from pa11y for this page">
<caption>pa11y results for this URL</caption>
<table id="graph-data" class="table graph-table" summary="Accessibility results from Pa11y for this page">
<caption>Pa11y results for this URL</caption>
<thead>
<tr>
<th>Date</th>

View File

@@ -1,24 +1,24 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<footer>
<div class="footer" role="contentinfo">
<div class="container">
<div class="col-md-5">
<small>&copy; {{year}} Springer Nature.<br/>pa11y dashboard is licensed under the GNU General Public License 3.0.<br/>Version {{version}}</small>
<small>&copy; {{year}} Springer Nature.<br/>Pa11y Dashboard is licensed under the GNU General Public License 3.0.<br/>Version {{version}}</small>
</div>
<div class="col-md-7 clearfix">
<ul class="crunch-bottom floated-list nav">

View File

@@ -1,26 +1,26 @@
{{!
This file is part of pa11y-dashboard.
{{!
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<header>
<div role="banner" class="header">
<div class="container">
{{#if isHomePage}}<h1>{{else}}<div class="h1">{{/if}}
<a href="/">pa11y dashboard</a> -
<a href="/">Pa11y Dashboard</a> -
<span class="h3">your automated accessibility testing pal</span>
{{#if isHomePage}}</h1>{{else}}</div>{{/if}}
</div>
</div>
</header>
</header>

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-12">
<div class="ruled task-header">

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-3 aside">
@@ -64,7 +64,7 @@ along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
<div class="col-md-12 col-sm-12 clearfix">
<div class="well">
<h4 class="crunch-top">View results in browser</h4>
<p class="crunch-bottom">pa11y uses HTML_CodeSniffer to find accessibility issues. <a href="http://squizlabs.github.io/HTML_CodeSniffer/">Use their bookmarklet</a> to view results on the page you are testing.</p>
<p class="crunch-bottom">Pa11y uses HTML_CodeSniffer to find accessibility issues. <a href="http://squizlabs.github.io/HTML_CodeSniffer/">Use their bookmarklet</a> to view results on the page you are testing.</p>
</div>
</div>
</div>

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-12 zfix">
<div class="ruled task-header">
@@ -27,7 +27,7 @@ along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
<ul class="inline-list" role="menu">
<li><a href="/{{task.id}}/edit">Edit this task</a></li>
<li><a href="/{{task.id}}/delete">Delete this task</a></li>
<li><a href="{{task.hrefRun}}" data-test="run-task">Run pa11y</a></li>
<li><a href="{{task.hrefRun}}" data-test="run-task">Run Pa11y</a></li>
</ul>
{{/unless}}
{{#if mainResult}}

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<ul class="list-unstyled clearfix crunch-bottom">
@@ -54,7 +54,7 @@ along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
<li><a href="{{href}}/edit">Edit this task</a></li>
<li><a href="{{href}}/delete">Delete this task</a></li>
<li class="divider"></li>
<li><a href="{{href}}/run" data-test="run-task">Run pa11y</a></li>
<li><a href="{{href}}/run" data-test="run-task">Run Pa11y</a></li>
</ul>
</div>
{{/unless}}

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,17 +1,17 @@
// This file is part of pa11y-dashboard.
// This file is part of Pa11y Dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// Pa11y Dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// Pa11y Dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}

View File

@@ -1,18 +1,18 @@
{{!
This file is part of pa11y-dashboard.
This file is part of Pa11y Dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
Pa11y Dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
Pa11y Dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}
@@ -84,7 +84,7 @@ along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
<div class="col-md-12" data-test="alert">
<div class="alert alert-info">
<h4>There are no results to show</h4>
<p>pa11y has not been run against this URL yet so there are no results to show.</p>
<p>Pa11y has not been run against this URL yet so there are no results to show.</p>
<p><a href="{{task.hrefRun}}">Click here to generate results for this URL</a>.</p>
</div>
</div>