From 19486109af55e6381934bd11ea0f17dc21d14393 Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Thu, 18 Aug 2022 16:29:45 -0700 Subject: [PATCH 1/2] Enabled unit and cypress test workflows on all branches. Adjusted OSD version used by unit and cypress test workflows to align with OSD branching strategy. Signed-off-by: AWSHurneyt --- .github/workflows/cypress-workflow.yml | 7 +++---- .github/workflows/unit-tests-workflow.yml | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cypress-workflow.yml b/.github/workflows/cypress-workflow.yml index e260c479f..2c9b7b4bb 100644 --- a/.github/workflows/cypress-workflow.yml +++ b/.github/workflows/cypress-workflow.yml @@ -2,13 +2,12 @@ name: E2E tests workflow on: pull_request: branches: - - main + - "*" push: branches: - - main - - development-* + - "*" env: - OPENSEARCH_DASHBOARDS_VERSION: '2.x' + OPENSEARCH_DASHBOARDS_VERSION: '2.2' OPENSEARCH_VERSION: '2.2.0-SNAPSHOT' jobs: tests: diff --git a/.github/workflows/unit-tests-workflow.yml b/.github/workflows/unit-tests-workflow.yml index 33daa7ec8..07697c9eb 100644 --- a/.github/workflows/unit-tests-workflow.yml +++ b/.github/workflows/unit-tests-workflow.yml @@ -2,13 +2,12 @@ name: Unit tests workflow on: pull_request: branches: - - main + - "*" push: branches: - - main - - development-* + - "*" env: - OPENSEARCH_DASHBOARDS_VERSION: '2.x' + OPENSEARCH_DASHBOARDS_VERSION: '2.2' jobs: tests: name: Run unit tests From 813e986767094e9e532bcfc7b89811cc583d066c Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Thu, 18 Aug 2022 16:36:28 -0700 Subject: [PATCH 2/2] Adjusted path for a dependency used by unit tests to align with migration from EUI to OUI. Signed-off-by: AWSHurneyt --- test/setup.jest.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/setup.jest.ts b/test/setup.jest.ts index 9a49af027..a9fbbde43 100644 --- a/test/setup.jest.ts +++ b/test/setup.jest.ts @@ -9,7 +9,7 @@ import { configure } from "@testing-library/react"; configure({ testIdAttribute: "data-test-subj" }); -jest.mock("@elastic/eui/lib/components/form/form_row/make_id", () => () => "some_make_id"); +jest.mock("@elastic/eui/lib/eui_components/form/form_row/make_id", () => () => "some_make_id"); jest.mock("@elastic/eui/lib/services/accessibility/html_id_generator", () => ({ htmlIdGenerator: () => { @@ -32,13 +32,13 @@ window.URL = { }; // https://github.com/elastic/eui/issues/2530 -jest.mock("@elastic/eui/lib/components/icon", () => ({ +jest.mock("@elastic/eui/lib/eui_components/icon", () => ({ EuiIcon: () => "EuiIconMock", __esModule: true, - IconPropType: require("@elastic/eui/lib/components/icon/icon").IconPropType, - ICON_TYPES: require("@elastic/eui/lib/components/icon/icon").TYPES, - ICON_SIZES: require("@elastic/eui/lib/components/icon/icon").SIZES, - ICON_COLORS: require("@elastic/eui/lib/components/icon/icon").COLORS, + IconPropType: require("@elastic/eui/lib/eui_components/icon/icon").IconPropType, + ICON_TYPES: require("@elastic/eui/lib/eui_components/icon/icon").TYPES, + ICON_SIZES: require("@elastic/eui/lib/eui_components/icon/icon").SIZES, + ICON_COLORS: require("@elastic/eui/lib/eui_components/icon/icon").COLORS, })); jest.setTimeout(10000); // in milliseconds