From 6e32fc01a29f1df6f0e17058445cf21d656e9930 Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 15 Nov 2023 15:35:09 -0800 Subject: [PATCH] Fix navigation bug from dashboard to dashboard (cherry picked from commit 1de8be6ad21ae0a056dbe62322b89ef7db610a48 from #5435) Also: * Lock chromedriver to v116 which is the last one compatible with Node 16 * Bump caniuse-lite db. Signed-off-by: Miki --- .github/workflows/build_and_test_workflow.yml | 26 ++++++++++++-- package.json | 2 +- .../basic_optimization.test.ts.snap | 2 +- .../embeddable/dashboard_container.tsx | 1 + yarn.lock | 36 +++++++++---------- 5 files changed, 45 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index f4f5395ea2fd..1eba4a6b514e 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -181,8 +181,30 @@ jobs: restore-keys: | yarn- - - name: Setup chromedriver - run: node scripts/upgrade_chromedriver.js + # Node 16 is only supported by ChromeDriver 116 and lower + - name: Download Chrome (Linux) + if: matrix.os != 'windows-latest' + id: download-chrome + uses: abhi1693/setup-browser@v0.3.5 + with: + browser: chrome + # https://chromiumdash.appspot.com/branches + version: 1160321 + + - name: Download Chrome (Windows) + if: matrix.os == 'windows-latest' + id: download-chrome + uses: abhi1693/setup-browser@v0.3.5 + with: + browser: chrome + # https://chromiumdash.appspot.com/branches + version: 1160375 + + - name: Setup Chrome + run: | + sudo rm -rf /usr/bin/google-chrome + sudo rm -rf /opt/google/chrome/chrome + sudo ln -s ${{steps.download-chrome.outputs.path}}/${{steps.download-chrome.outputs.binary}} /usr/bin/google-chrome - name: Run bootstrap (Linux) if: matrix.os != 'windows-latest' diff --git a/package.json b/package.json index 587d9a29b5c6..47c2454aa956 100644 --- a/package.json +++ b/package.json @@ -358,7 +358,7 @@ "chai": "3.5.0", "chance": "1.0.18", "cheerio": "0.22.0", - "chromedriver": "^107.0.3", + "chromedriver": "^116.0.0", "classnames": "2.3.1", "compare-versions": "3.5.1", "d3": "3.5.17", diff --git a/packages/osd-optimizer/src/integration_tests/__snapshots__/basic_optimization.test.ts.snap b/packages/osd-optimizer/src/integration_tests/__snapshots__/basic_optimization.test.ts.snap index d52295284bab..f0d92caa816c 100644 --- a/packages/osd-optimizer/src/integration_tests/__snapshots__/basic_optimization.test.ts.snap +++ b/packages/osd-optimizer/src/integration_tests/__snapshots__/basic_optimization.test.ts.snap @@ -78,4 +78,4 @@ exports[`prepares assets for distribution: bar bundle 1`] = `"(function(modules) exports[`prepares assets for distribution: foo async bundle 1`] = `"(window[\\"foo_bundle_jsonpfunction\\"]=window[\\"foo_bundle_jsonpfunction\\"]||[]).push([[1],{3:function(module,__webpack_exports__,__webpack_require__){\\"use strict\\";__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,\\"foo\\",(function(){return foo}));function foo(){}}}]);"`; -exports[`prepares assets for distribution: foo bundle 1`] = `"(function(modules){function webpackJsonpCallback(data){var chunkIds=data[0];var moreModules=data[1];var moduleId,chunkId,i=0,resolves=[];for(;i