Repository: GoogleChrome/lighthouse (js)

Issue:
Unable to audit site with authentication
Hi! I am unable to run lighthouse on a site (https) with authentication [using the method described in the documentation. ](https://github.com/GoogleChrome/lighthouse/blob/master/docs/readme.md#testing-on-a-site-with-authentication)

OS: Windows 10 (1093 Build 18362.418)
Node.js: 10.16.3
Lighthouse 5.5.0

**Steps to replicate.**
1. Open a terminal and run "chrome-debug"
2. Login to site (app.mytest.se)
3. Take note of port in terminal (123456)
4. Open a new terminal 
5. Type "lighthouse https://app.mytest.se --port 123456"

Lighthouse ignores the --port argument and opens a new tab that **is not logged in**. 
This behavior is identical to typing "lighthouse https://app.mytest.se" - the --port argument has no effect. 

I have tried running the terminals (git bash and PowerShell) in elevated mode with the same result. Is any details about this method missing in the documentation? 

Kind regards
Kazuyuki

Pull request description:
docs(auth): use --disable-storage-reset for chrome-debug
closes #9840

Patch:
diff --git a/docs/authenticated-pages.md b/docs/authenticated-pages.md
index 881143214..469df26aa 100644
--- a/docs/authenticated-pages.md
+++ b/docs/authenticated-pages.md
@@ -35,7 +35,7 @@ You could also set the `Cookie` header, but beware: it will [override any other
 1. Globally install lighthouse: `npm i -g lighthouse` or `yarn global add lighthouse`. `chrome-debug` is now in your PATH. This binary launches a standalone Chrome instance with an open debugging port.
 1. Run chrome-debug. This logs the debugging port of your Chrome instance.
 1. Navigate to your site and log in.
-1. In a separate terminal, run `lighthouse http://mysite.com --port port-number`, using the port number from chrome-debug.
+1. In a separate terminal, run `lighthouse http://mysite.com --disable-storage-reset --port port-number`, using the port number from chrome-debug.
 
 ## Option 5: Reuse a prepared Chrome User Profile
 
diff --git a/docs/recipes/auth/README.md b/docs/recipes/auth/README.md
index c8aa99baa..e6adf8dc6 100644
--- a/docs/recipes/auth/README.md
+++ b/docs/recipes/auth/README.md
@@ -99,7 +99,7 @@ Now run Lighthouse, using the same port as before:
 // The local server is running on port 10632.
 const url = 'http://localhost:10632/dashboard';
 // Direct Lighthouse to use the same port.
-const result = await lighthouse(url, { port: PORT });
+const result = await lighthouse(url, {port: PORT, disableStorageReset: true});
 const lhr = result.lhr;
 
 // Direct Puppeteer to close the browser - we're done with it.
diff --git a/docs/recipes/auth/example-lh-auth.js b/docs/recipes/auth/example-lh-auth.js
index edb5bf38a..f3bacd57d 100644
--- a/docs/recipes/auth/example-lh-auth.js
+++ b/docs/recipes/auth/example-lh-auth.js
@@ -63,7 +63,7 @@ async function main() {
   // The local server is running on port 10632.
   const url = 'http://localhost:10632/dashboard';
   // Direct Lighthouse to use the same port.
-  const result = await lighthouse(url, {port: PORT});
+  const result = await lighthouse(url, {port: PORT, disableStorageReset: true});
   // Direct Puppeteer to close the browser as we're done with it.
   await browser.close();
 
diff --git a/docs/releasing.md b/docs/releasing.md
index c1deb4cad..a3b5b681f 100644
--- a/docs/releasing.md
+++ b/docs/releasing.md
@@ -131,6 +131,9 @@ cd ../lighthouse-pristine
 git status
 git log
 
+# Publish tag.
+git push --follow-tags
+
 # Publish to npm.
 npm publish
 
diff --git a/lighthouse-cli/cli-flags.js b/lighthouse-cli/cli-flags.js
index d0ef66e9e..7225f0af2 100644
--- a/lighthouse-cli/cli-flags.js
+++ b/lighthouse-cli/cli-flags.js
@@ -138,7 +138,7 @@ function getFlags(manualArgv) {
 
       .group(['output', 'output-path', 'view'], 'Output:')
       .describe({
-        'output': `Reporter for the results, supports multiple values`,
+        'output': `Reporter for the results, supports multiple values. choices: ${printer.getValidOutputOptions().map(s => `"${s}"`).join(', ')}`,
         'output-path': `The file path to output the results. Use 'stdout' to write to stdout.
   If using JSON output, default is stdout.
   If using HTML or CSV output, default is a file in the working directory with a name based on the test URL and date.
@@ -153,7 +153,6 @@ function getFlags(manualArgv) {
         'list-trace-categories', 'view', 'verbose', 'quiet', 'help', 'print-config',
         'chrome-ignore-default-flags',
       ])
-      .choices('output', printer.getValidOutputOptions())
       .choices('emulated-form-factor', ['mobile', 'desktop', 'none'])
       .choices('throttling-method', ['devtools', 'provided', 'simulate'])
       .choices('preset', ['perf', 'mixed-content'])


Test patch:
diff --git a/docs/recipes/integration-test/example-lh-auth.test.js b/docs/recipes/integration-test/example-lh-auth.test.js
index b1f532799..fa8318de2 100644
--- a/docs/recipes/integration-test/example-lh-auth.test.js
+++ b/docs/recipes/integration-test/example-lh-auth.test.js
@@ -67,6 +67,7 @@ expect.extend({
 async function runLighthouse(url) {
   const result = await lighthouse(url, {
     port: CHROME_DEBUG_PORT,
+    disableStorageReset: true,
     onlyCategories: ['seo'],
   });
   return result.lhr;
diff --git a/lighthouse-cli/test/cli/run-test.js b/lighthouse-cli/test/cli/run-test.js
index 8ac55ded4..14471b769 100644
--- a/lighthouse-cli/test/cli/run-test.js
+++ b/lighthouse-cli/test/cli/run-test.js
@@ -91,10 +91,15 @@ describe('CLI run', function() {
 
 describe('flag coercing', () => {
   it('should force to array', () => {
-    assert.deepStrictEqual(getFlags(`--only-audits foo chrome://version`).onlyAudits, ['foo']);
+    assert.deepStrictEqual(
+      getFlags('https://www.example.com --only-audits foo').onlyAudits, ['foo']);
   });
-});
 
+  it('should allow csv', () => {
+    assert.deepStrictEqual(
+      getFlags('https://www.example.com --output html,json').output, ['html', 'json']);
+  });
+});
 
 describe('saveResults', () => {
   it('will quit early if we\'re in gather mode', async () => {
diff --git a/lighthouse-core/test/report/html/renderer/report-ui-features-test.js b/lighthouse-core/test/report/html/renderer/report-ui-features-test.js
index 3a761fbc3..b40a7aa6b 100644
--- a/lighthouse-core/test/report/html/renderer/report-ui-features-test.js
+++ b/lighthouse-core/test/report/html/renderer/report-ui-features-test.js
@@ -88,6 +88,7 @@ describe('ReportUIFeatures', () => {
 
     dom = new DOM(document.window.document);
     sampleResults = Util.prepareReportResult(sampleResultsOrig);
+    render(sampleResults);
   });
 
   afterAll(() => {