diff --git a/CHANGELOG.md b/CHANGELOG.md index e60c9cb01909..86874fd9d83a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,9 +63,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix errors in conditions for activating `vizAugmenter` ([#5213](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5213)) - [Data Explorer][Discover] Automatically load solo added default index pattern ([#5171](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5171)) - [Data Explorer][Discover] Allow data grid to auto adjust size based on fetched data count ([#5191](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5191)) +- [BUG] Fix wrong test due to time conversion ([#5174](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5174)) - [BUG][Data Explorer][Discover] Allow filter and query persist when refresh page or paste url to a new tab ([#5206](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5206)) - ### 🚞 Infrastructure - Re-enable CI workflows for feature branches ([#2908](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2908)) 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 },