From 6bb7705cb55fc8d591226f47f69b0cb20f502c45 Mon Sep 17 00:00:00 2001 From: Alex Ruiz Becerra Date: Mon, 13 Feb 2023 13:48:24 +0100 Subject: [PATCH 1/3] Fix functional tests --- .github/workflows/build_and_test_workflow.yml | 11 +++++++++-- yarn.lock | 12 ++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index 576a414ca635..f047d60cefeb 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -97,9 +97,16 @@ jobs: npm uninstall -g yarn npm i -g yarn@1.22.10 - # image has the latest chrome v99 + # image has the chrome v109.0.5414 + # Note: Chrome is installed in the container image defined above. It seems + # that OpenSearch periodically rebuilds this image, so the chromedriver + # version originally used for v2.4.1 no longer fits the version of + # Chrome installed in the image, causing the tests to fail. This is a + # temporary fix to get the tests to pass, as in their `main` branch, they + # have added an script to automatically detect the chrome version and + # installed the correct chromedriver accordingly. - name: Setup chromedriver - run: yarn add --dev chromedriver@99.0.0 + run: yarn add --dev chromedriver@109.0.0 - name: Run bootstrap run: yarn osd bootstrap diff --git a/yarn.lock b/yarn.lock index f9993f086691..490aeac5ace4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2764,9 +2764,9 @@ defer-to-connect "^2.0.0" "@testim/chrome-version@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@testim/chrome-version/-/chrome-version-1.1.2.tgz#092005c5b77bd3bb6576a4677110a11485e11864" - integrity sha512-1c4ZOETSRpI0iBfIFUqU4KqwBAB2lHUAlBjZz/YqOHqwM9dTTzjV6Km0ZkiEiSCx/tLr1BtESIKyWWMww+RUqw== + version "1.1.3" + resolved "https://registry.yarnpkg.com/@testim/chrome-version/-/chrome-version-1.1.3.tgz#fbb68696899d7b8c1b9b891eded9c04fe2cd5529" + integrity sha512-g697J3WxV/Zytemz8aTuKjTGYtta9+02kva3C1xc7KXB8GdbfE1akGJIsZLyY/FSh2QrnE+fiB7vmWU3XNcb6A== "@testing-library/dom@^8.0.0", "@testing-library/dom@^8.11.3": version "8.12.0" @@ -7082,9 +7082,9 @@ del@^5.1.0: slash "^3.0.0" del@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" - integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== + version "6.1.1" + resolved "https://registry.yarnpkg.com/del/-/del-6.1.1.tgz#3b70314f1ec0aa325c6b14eb36b95786671edb7a" + integrity sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg== dependencies: globby "^11.0.1" graceful-fs "^4.2.4" From 721147c699faee09350e97528d2191f1c618f73d Mon Sep 17 00:00:00 2001 From: Alex Ruiz Becerra Date: Mon, 17 Apr 2023 20:01:21 +0200 Subject: [PATCH 2/3] Update Browserslist: caniuse-lite Was preventing tests to pass --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 490aeac5ace4..72f06f2e051b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5520,7 +5520,7 @@ cacheable-lookup@^5.0.3: resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== -cacheable-request@^7.0.1, cacheable-request@^7.0.2: +cacheable-request@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== @@ -5586,9 +5586,9 @@ camelize@^1.0.0: integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= caniuse-lite@^1.0.30001317: - version "1.0.30001397" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001397.tgz" - integrity sha512-SW9N2TbCdLf0eiNDRrrQXx2sOkaakNZbCjgNpPyMJJbiOrU5QzMIrXOVMRM1myBXTD5iTkdrtU/EguCrBocHlA== + version "1.0.30001480" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001480.tgz" + integrity sha512-q7cpoPPvZYgtyC4VaBSN0Bt+PJ4c4EYRf0DrduInOz2SkFpHD5p3LnvEpqBp7UnJn+8x1Ogl1s38saUxe+ihQQ== caseless@~0.12.0: version "0.12.0" @@ -9423,7 +9423,7 @@ got@11.8.5, got@^11.8.2: "@types/cacheable-request" "^6.0.1" "@types/responselike" "^1.0.0" cacheable-lookup "^5.0.3" - cacheable-request "^7.0.1" + cacheable-request "^7.0.2" decompress-response "^6.0.0" http2-wrapper "^1.0.0-beta.5.2" lowercase-keys "^2.0.0" From be5d1fd0919fda7de7ab38e570e3f7a3462d1d36 Mon Sep 17 00:00:00 2001 From: Alex Ruiz Becerra Date: Wed, 19 Apr 2023 18:22:37 +0200 Subject: [PATCH 3/3] Update test snapshot --- .../__snapshots__/basic_optimization.test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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