From 7332f1c24672521f60cc3b2c99a9af8dd35739a3 Mon Sep 17 00:00:00 2001 From: Thanh Date: Mon, 2 Oct 2023 18:12:01 -0400 Subject: [PATCH 1/2] fix time conversion test bug Signed-off-by: Thanh --- .../osd-i18n/angular/.package.json.icloud | Bin 0 -> 159 bytes .../chart/utils/point_series.test.ts | 4 +-- .../opensearch_dashboards.json | 27 ++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 packages/osd-i18n/angular/.package.json.icloud create mode 100644 src/plugins/discover_legacy/opensearch_dashboards.json diff --git a/packages/osd-i18n/angular/.package.json.icloud b/packages/osd-i18n/angular/.package.json.icloud new file mode 100644 index 0000000000000000000000000000000000000000..1ee248ff9bfb6e5525f5356d394bbe5a55a69017 GIT binary patch literal 159 zcmYc)$jK}&F)+By$i&RT$`<1n92(@~mzbOComv?$AOPmNW#*&?XI4RkB;Z0psm1xF zMaiill?5QFn1aOQ?8Nj`y{zK=Jb}7+0U4|+gHqE=a}tX<_+|9H!Xp{LfRPbGGq6Kx H7*zoP#jGn# literal 0 HcmV?d00001 diff --git a/src/plugins/discover/public/application/components/chart/utils/point_series.test.ts b/src/plugins/discover/public/application/components/chart/utils/point_series.test.ts index b7a8ab2bfd43..2ad671e6fda8 100644 --- a/src/plugins/discover/public/application/components/chart/utils/point_series.test.ts +++ b/src/plugins/discover/public/application/components/chart/utils/point_series.test.ts @@ -51,8 +51,8 @@ describe('buildPointSeriesData', () => { expect(result.ordered.interval.asHours()).toBe(1); expect(result.ordered.intervalOpenSearchUnit).toBe('h'); expect(result.ordered.intervalOpenSearchValue).toBe(1); - expect(result.ordered.min.format()).toBe('2023-01-01T00:00:00+00:00'); - expect(result.ordered.max.format()).toBe('2023-01-02T00:00:00+00:00'); + expect(result.ordered.min.format()).toBe(moment('2023-01-01T00:00:00+00:00').format()); + expect(result.ordered.max.format()).toBe(moment('2023-01-02T00:00:00+00:00').format()); expect(result.yAxisLabel).toEqual('Y Axis'); expect(result.values).toEqual([ { x: 10, y: 100 }, diff --git a/src/plugins/discover_legacy/opensearch_dashboards.json b/src/plugins/discover_legacy/opensearch_dashboards.json new file mode 100644 index 000000000000..6a4259a41d75 --- /dev/null +++ b/src/plugins/discover_legacy/opensearch_dashboards.json @@ -0,0 +1,27 @@ +{ + "id": "discoverLegacy", + "version": "opensearchDashboards", + "server": false, + "ui": true, + "requiredPlugins": [ + "charts", + "data", + "embeddable", + "inspector", + "opensearchDashboardsLegacy", + "urlForwarding", + "navigation", + "uiActions", + "visualizations" + ], + "optionalPlugins": [ + "home", + "share" + ], + "requiredBundles": [ + "opensearchDashboardsUtils", + "savedObjects", + "opensearchDashboardsReact", + "discover" + ] +} \ No newline at end of file From 15e489192743a4142c3a3d4adc81e9e18bafee72 Mon Sep 17 00:00:00 2001 From: Thanh Date: Mon, 2 Oct 2023 23:32:48 -0400 Subject: [PATCH 2/2] Fix wrong test case Signed-off-by: Thanh --- CHANGELOG.md | 1 + .../osd-i18n/angular/.package.json.icloud | Bin 159 -> 0 bytes .../opensearch_dashboards.json | 27 ------------------ 3 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 packages/osd-i18n/angular/.package.json.icloud delete mode 100644 src/plugins/discover_legacy/opensearch_dashboards.json diff --git a/CHANGELOG.md b/CHANGELOG.md index d414598dd927..18bdda17c2ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Correct the generated path for downloading plugins by their names on Windows ([#4953](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4953)) - [BUG] Fix buildPointSeriesData unit test fails due to local timezone ([#4992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4992)) - [BUG][Data Explorer][Discover] Fix total hits issue for no time based data ([#5087](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5087)) +- [BUG] Fix wrong test due to time conversion ([#5174](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5174)) ### 🚞 Infrastructure diff --git a/packages/osd-i18n/angular/.package.json.icloud b/packages/osd-i18n/angular/.package.json.icloud deleted file mode 100644 index 1ee248ff9bfb6e5525f5356d394bbe5a55a69017..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 159 zcmYc)$jK}&F)+By$i&RT$`<1n92(@~mzbOComv?$AOPmNW#*&?XI4RkB;Z0psm1xF zMaiill?5QFn1aOQ?8Nj`y{zK=Jb}7+0U4|+gHqE=a}tX<_+|9H!Xp{LfRPbGGq6Kx H7*zoP#jGn# diff --git a/src/plugins/discover_legacy/opensearch_dashboards.json b/src/plugins/discover_legacy/opensearch_dashboards.json deleted file mode 100644 index 6a4259a41d75..000000000000 --- a/src/plugins/discover_legacy/opensearch_dashboards.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "id": "discoverLegacy", - "version": "opensearchDashboards", - "server": false, - "ui": true, - "requiredPlugins": [ - "charts", - "data", - "embeddable", - "inspector", - "opensearchDashboardsLegacy", - "urlForwarding", - "navigation", - "uiActions", - "visualizations" - ], - "optionalPlugins": [ - "home", - "share" - ], - "requiredBundles": [ - "opensearchDashboardsUtils", - "savedObjects", - "opensearchDashboardsReact", - "discover" - ] -} \ No newline at end of file