-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(smokehouse): add basic smoke test for SEO audits #3267
Conversation
70cf545
to
17a54c3
Compare
I believe @rviscomi's plan was to nuke the SEO config and merge them into the full config when they were ready. Though given no one really runs the full config today, it might be fine to add them directly :) |
@@ -27,7 +27,7 @@ | |||
"build-viewer": "cd ./lighthouse-viewer && yarn build", | |||
"clean": "rimraf *.report.html *.report.dom.html *.report.json *.screenshots.html *.devtoolslog.json *.trace.json || true", | |||
"lint": "[ \"$CI\" = true ] && eslint --quiet -f codeframe . || eslint .", | |||
"smoke": "bash lighthouse-cli/test/smokehouse/offline-local/run-tests.sh && bash lighthouse-cli/test/smokehouse/perf/run-tests.sh && bash lighthouse-cli/test/smokehouse/dobetterweb/run-tests.sh && bash lighthouse-cli/test/smokehouse/byte-efficiency/run-tests.sh && bash lighthouse-cli/test/smokehouse/tricky-ttci/run-tests.sh", | |||
"smoke": "bash lighthouse-cli/test/smokehouse/offline-local/run-tests.sh && bash lighthouse-cli/test/smokehouse/perf/run-tests.sh && bash lighthouse-cli/test/smokehouse/dobetterweb/run-tests.sh && bash lighthouse-cli/test/smokehouse/byte-efficiency/run-tests.sh && bash lighthouse-cli/test/smokehouse/tricky-ttci/run-tests.sh && bash lighthouse-cli/test/smokehouse/seo/run-tests.sh", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're gonna need a bash script to run our bash scripts 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at shortening this to...
for file in lighthouse-cli/test/smokehouse/*/run-tests.sh; do bash $file; done
however it doesnt' handle the exit code correctly, so... we'll just need to make run-test.js not terrible sometime. perhaps a job for lighthouse-assert..
@@ -0,0 +1,28 @@ | |||
<!doctype html> | |||
<!-- | |||
* Copyright 2017 Google Inc. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small license?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small license?
our HTML files don't appear to have a version of the small license and I didn't care enough to make one. Good first bug! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😶
url: 'http://localhost:10200/seo/seo-tester.html', | ||
audits: { | ||
'meta-viewport': { | ||
score: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want the smoke test to be catching failures or passes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want the smoke test to be catching failures or passes?
yeah, I was just dropping this in to get things going, but I can add in a failure page too
17a54c3
to
d4ff65d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! 🌮 lgtm % small headers copied from paul :)
failing tests are just the JVM issue facing all builds right now... |
@kdzwinel FYI
this adds a starting point for SEO audit integration tests. Right now this tests only the two a11y audits that are also being used as SEO audits, but since they're a11y audits they don't have many details to test beyond the score
as new SEO audits get added:
extendedInfo
/details
that can be tested (example)