Repository: GoogleChrome/lighthouse
Pull request #12578 (2021-05-28 00:38:10)

tests(devtools): sync webtests
ref https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2902746


Patch:
diff --git a/.github/workflows/devtools.yml b/.github/workflows/devtools.yml
index 94b325d2f..8b277623b 100644
--- a/.github/workflows/devtools.yml
+++ b/.github/workflows/devtools.yml
@@ -33,7 +33,7 @@ jobs:
           ${{ env.BLINK_TOOLS_PATH }}
           ${{ github.workspace }}/lighthouse/.tmp/chromium-web-tests/content-shells
         # The number is how many times this hash key was manually updated to break the cache.
-        key: ${{ runner.os }}-1-${{ hashFiles('third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/*.js', 'lighthouse/.github/workflows/devtools.yml', 'lighthouse/lighthouse-core/test/chromium-web-tests/*', 'lighthouse/clients/devtools-entry.js', 'lighthouse/clients/devtools-report-assets.js', 'lighthouse/build/build-bundle.js', 'lighthouse/build/build-dt-report-resources.js') }}
+        key: ${{ runner.os }}-2-${{ hashFiles('third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/*.js', 'lighthouse/.github/workflows/devtools.yml', 'lighthouse/lighthouse-core/test/chromium-web-tests/*', 'lighthouse/clients/devtools-entry.js', 'lighthouse/clients/devtools-report-assets.js', 'lighthouse/build/build-bundle.js', 'lighthouse/build/build-dt-report-resources.js') }}
 
     - name: Use Node.js 12.x
       uses: actions/setup-node@v1


Test patch:
diff --git a/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js b/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js
index 1630e76c3..e5a93433b 100644
--- a/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js
+++ b/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js
@@ -25,7 +25,7 @@
   TestRunner.addResult(`disableStorageReset: ${lhr.configSettings.disableStorageReset}`);
   TestRunner.addResult(`throttlingMethod: ${lhr.configSettings.throttlingMethod}`);
 
-  const viewTraceButton = LighthouseTestRunner.getResultsElement().querySelector('.view-trace');
+  const viewTraceButton = LighthouseTestRunner.getResultsElement().querySelector('.lh-button--trace');
   TestRunner.addResult(`\nView Trace Button Text: "${viewTraceButton.textContent}"`);
   TestRunner.addResult(`View Trace Button Title: "${viewTraceButton.title}"`);
 
diff --git a/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-view-trace-run.js b/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-view-trace-run.js
index 158378c7e..5264bc578 100644
--- a/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-view-trace-run.js
+++ b/third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/lighthouse-view-trace-run.js
@@ -31,7 +31,7 @@
   const waitForShowView = new Promise(resolve => {
     TestRunner.addSniffer(UI.ViewManager.prototype, 'showView', resolve);
   });
-  const viewTraceButton = LighthouseTestRunner.getResultsElement().querySelector('.view-trace');
+  const viewTraceButton = LighthouseTestRunner.getResultsElement().querySelector('.lh-button--trace');
   TestRunner.addResult(`\nView Trace Button Text: "${viewTraceButton.textContent}"`);
   TestRunner.addResult(`View Trace Button Title: "${UI.Tooltip.getContent(viewTraceButton)}"`);
   viewTraceButton.click();