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/.github/workflows/cypress_workflow.yml b/.github/workflows/cypress_workflow.yml index 41b9d46aa32f..a103fc51d0cd 100644 --- a/.github/workflows/cypress_workflow.yml +++ b/.github/workflows/cypress_workflow.yml @@ -11,8 +11,9 @@ env: FTR_PATH: 'ftr' START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch' OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot' - SPEC: 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js,' + SPEC: 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js' CYPRESS_ENV: 'env CYPRESS_VISBUILDER_ENABLED=true ' + OPENSEARCH_VERSION: ${{ vars.OPENSEARCH_VERSION }} jobs: cypress-tests: @@ -52,7 +53,7 @@ jobs: with: path: ${{ env.FTR_PATH }} repository: opensearch-project/opensearch-dashboards-functional-test - ref: '${{ github.base_ref }}' + ref: ${{ env.OPENSEARCH_VERSION }} - name: Get Cypress version id: cypress_version @@ -76,7 +77,7 @@ jobs: working-directory: ${{ env.FTR_PATH }} start: ${{ env.OPENSEARCH_SNAPSHOT_CMD }}, ${{ env.START_CMD }} wait-on: 'http://localhost:9200, http://localhost:5601' - command: ${{ env.CYPRESS_ENV }} yarn cypress:run-without-security --browser chromium --spec ${{ env.SPEC }} + command: ${{ env.CYPRESS_ENV }} yarn cypress:run-without-security --browser chromium --config ignoreTestFiles="dashboard_sanity_test_spec.js" --spec ${{ env.SPEC }} # Screenshots are only captured on failure, will change this once we do visual regression tests - uses: actions/upload-artifact@v3 @@ -85,7 +86,7 @@ jobs: name: ftr-cypress-screenshots path: ${{ env.FTR_PATH }}/cypress/screenshots retention-days: 1 - + - uses: actions/upload-artifact@v3 if: always() with: @@ -98,4 +99,4 @@ jobs: with: name: ftr-cypress-results path: ${{ env.FTR_PATH }}/cypress/results - retention-days: 1 \ No newline at end of file + retention-days: 1 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