Skip to content

Commit

Permalink
tests(smokehouse): support artifacts assertions in smoke tests (#8044)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattzeunert authored and connorjclark committed Apr 13, 2019
1 parent 55cb95b commit 48a346d
Show file tree
Hide file tree
Showing 18 changed files with 1,262 additions and 1,171 deletions.
414 changes: 208 additions & 206 deletions lighthouse-cli/test/smokehouse/a11y/expectations.js

Large diffs are not rendered by default.

220 changes: 112 additions & 108 deletions lighthouse-cli/test/smokehouse/byte-efficiency/expectations.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,134 +10,138 @@
*/
module.exports = [
{
requestedUrl: 'http://localhost:10200/byte-efficiency/tester.html',
finalUrl: 'http://localhost:10200/byte-efficiency/tester.html',
audits: {
'unminified-css': {
details: {
overallSavingsBytes: '>17000',
items: {
length: 2,
lhr: {
requestedUrl: 'http://localhost:10200/byte-efficiency/tester.html',
finalUrl: 'http://localhost:10200/byte-efficiency/tester.html',
audits: {
'unminified-css': {
details: {
overallSavingsBytes: '>17000',
items: {
length: 2,
},
},
},
},
'unminified-javascript': {
score: '<1',
details: {
overallSavingsBytes: '>45000',
overallSavingsMs: '>500',
items: [
{
url: 'http://localhost:10200/byte-efficiency/script.js',
wastedBytes: '46481 +/- 100',
wastedPercent: '87 +/- 5',
},
{
url: 'inline: \n function unusedFunction() {\n // Un...',
wastedBytes: '6581 +/- 100',
wastedPercent: '99.6 +/- 0.1',
},
{
url: 'inline: \n // Used block #1\n // FILLER DATA JUS...',
wastedBytes: '6559 +/- 100',
wastedPercent: 100,
'unminified-javascript': {
score: '<1',
details: {
overallSavingsBytes: '>45000',
overallSavingsMs: '>500',
items: [
{
url: 'http://localhost:10200/byte-efficiency/script.js',
wastedBytes: '46481 +/- 100',
wastedPercent: '87 +/- 5',
},
{
url: 'inline: \n function unusedFunction() {\n // Un...',
wastedBytes: '6581 +/- 100',
wastedPercent: '99.6 +/- 0.1',
},
{
url: 'inline: \n // Used block #1\n // FILLER DATA JUS...',
wastedBytes: '6559 +/- 100',
wastedPercent: 100,
},
],
},
},
'unused-css-rules': {
details: {
overallSavingsBytes: '>35000',
items: {
length: 2,
},
],
},
},
},
'unused-css-rules': {
details: {
overallSavingsBytes: '>35000',
items: {
length: 2,
'unused-javascript': {
score: '<1',
details: {
overallSavingsBytes: '>=25000',
overallSavingsMs: '>300',
items: {
length: 2,
},
},
},
},
'unused-javascript': {
score: '<1',
details: {
overallSavingsBytes: '>=25000',
overallSavingsMs: '>300',
items: {
length: 2,
'offscreen-images': {
details: {
items: [
{
url: /lighthouse-unoptimized.jpg$/,
}, {
url: /lighthouse-480x320.webp$/,
}, {
url: /lighthouse-480x320.webp\?invisible$/,
}, {
url: /large.svg$/,
},
],
},
},
},
'offscreen-images': {
details: {
items: [
{
url: /lighthouse-unoptimized.jpg$/,
}, {
url: /lighthouse-480x320.webp$/,
}, {
url: /lighthouse-480x320.webp\?invisible$/,
}, {
url: /large.svg$/,
'uses-webp-images': {
details: {
overallSavingsBytes: '>60000',
items: {
length: 4,
},
],
},
},
'uses-webp-images': {
details: {
overallSavingsBytes: '>60000',
items: {
length: 4,
},
},
},
'uses-text-compression': {
score: '<1',
details: {
overallSavingsMs: '>700',
overallSavingsBytes: '>50000',
items: {
length: 2,
'uses-text-compression': {
score: '<1',
details: {
overallSavingsMs: '>700',
overallSavingsBytes: '>50000',
items: {
length: 2,
},
},
},
},
'uses-optimized-images': {
details: {
overallSavingsBytes: '>10000',
items: {
length: 1,
'uses-optimized-images': {
details: {
overallSavingsBytes: '>10000',
items: {
length: 1,
},
},
},
},
'uses-responsive-images': {
displayValue: 'Potential savings of 75\xa0KB',
details: {
overallSavingsBytes: '>75000',
items: [
{wastedPercent: '<60'},
{wastedPercent: '<60'},
{wastedPercent: '<60'},
],
'uses-responsive-images': {
displayValue: 'Potential savings of 75\xa0KB',
details: {
overallSavingsBytes: '>75000',
items: [
{wastedPercent: '<60'},
{wastedPercent: '<60'},
{wastedPercent: '<60'},
],
},
},
},
},
},
{
requestedUrl: 'http://localhost:10200/byte-efficiency/gzip.html',
finalUrl: 'http://localhost:10200/byte-efficiency/gzip.html',
audits: {
'network-requests': {
details: {
items: [
{
url: 'http://localhost:10200/byte-efficiency/gzip.html',
},
{
url: 'http://localhost:10200/byte-efficiency/script.js?gzip=1',
transferSize: 1136,
resourceSize: 52997,
},
{
url: 'http://localhost:10200/byte-efficiency/script.js',
transferSize: 53181,
resourceSize: 52997,
},
],
lhr: {
requestedUrl: 'http://localhost:10200/byte-efficiency/gzip.html',
finalUrl: 'http://localhost:10200/byte-efficiency/gzip.html',
audits: {
'network-requests': {
details: {
items: [
{
url: 'http://localhost:10200/byte-efficiency/gzip.html',
},
{
url: 'http://localhost:10200/byte-efficiency/script.js?gzip=1',
transferSize: 1136,
resourceSize: 52997,
},
{
url: 'http://localhost:10200/byte-efficiency/script.js',
transferSize: 53181,
resourceSize: 52997,
},
],
},
},
},
},
Expand Down
Loading

0 comments on commit 48a346d

Please sign in to comment.