-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PWA Audits: add placeholders for rest of baseline checks. (#2248)
* Add manual PWA placeholder audits * Add tests, update tests, fix tests. * Add additional test * feedback
- Loading branch information
Showing
14 changed files
with
5,740 additions
and
1,591 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* @license | ||
* Copyright 2017 Google Inc. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* @fileoverview Base class for audits that the user should verify manually on | ||
* their site. | ||
*/ | ||
|
||
const Audit = require('../audit'); | ||
|
||
class ManualAudit extends Audit { | ||
|
||
/** | ||
* @return {!AuditMeta} | ||
*/ | ||
static get meta() { | ||
return { | ||
informative: true, | ||
manual: true, | ||
requiredArtifacts: [] | ||
}; | ||
} | ||
|
||
/** | ||
* @return {!AuditResult} | ||
*/ | ||
static audit() { | ||
return { | ||
rawValue: false, | ||
// displayValue: '(needs manual verification)' | ||
}; | ||
} | ||
} | ||
|
||
module.exports = ManualAudit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
/** | ||
* @license | ||
* Copyright 2017 Google Inc. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const ManualAudit = require('./manual-audit'); | ||
|
||
/** | ||
* @fileoverview Manual PWA audit for cross browser support. | ||
*/ | ||
|
||
class PWACrossBrowser extends ManualAudit { | ||
|
||
/** | ||
* @return {!AuditMeta} | ||
*/ | ||
static get meta() { | ||
return Object.assign({ | ||
category: 'PWA', | ||
name: 'pwa-cross-browser', | ||
helpText: 'To reach the most number of users, sites should work across ' + | ||
'every major browser. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#site-works-cross-browser).', | ||
description: 'Site works cross-browser', | ||
}, super.meta); | ||
} | ||
} | ||
|
||
module.exports = PWACrossBrowser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* @license | ||
* Copyright 2017 Google Inc. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const ManualAudit = require('./manual-audit'); | ||
|
||
/** | ||
* @fileoverview Manual PWA audit to ensure every page has a deep link. | ||
*/ | ||
|
||
class PWAEachPageHasURL extends ManualAudit { | ||
|
||
/** | ||
* @return {!AuditMeta} | ||
*/ | ||
static get meta() { | ||
return Object.assign({ | ||
category: 'PWA', | ||
name: 'pwa-each-page-has-url', | ||
helpText: 'Ensure individual pages are deep linkable via the URLs and that URLs are ' + | ||
'unique for the purpose of shareability on social media. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#each-page-has-a-url).', | ||
description: 'Each page has a URL', | ||
}, super.meta); | ||
} | ||
} | ||
|
||
module.exports = PWAEachPageHasURL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* @license | ||
* Copyright 2017 Google Inc. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const ManualAudit = require('./manual-audit'); | ||
|
||
/** | ||
* @fileoverview Manual PWA audit for janky-free page transitions. | ||
*/ | ||
|
||
class PWAPageTransitions extends ManualAudit { | ||
|
||
/** | ||
* @return {!AuditMeta} | ||
*/ | ||
static get meta() { | ||
return Object.assign({ | ||
category: 'PWA', | ||
name: 'pwa-page-transitions', | ||
helpText: 'Transitions should feel snappy as you tap around, even on a slow network, a key ' + | ||
'to perceived performance. [Learn more](https://developers.google.com/web/progressive-web-apps/checklist#page-transitions-dont-feel-like-they-block-on-the-network).', | ||
description: 'Page transitions don\'t feel like they block on the network', | ||
}, super.meta); | ||
} | ||
} | ||
|
||
module.exports = PWAPageTransitions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.