diff --git a/src/plugins/data/public/query/query_string/dataset_service/dataset_service.test.ts b/src/plugins/data/public/query/query_string/dataset_service/dataset_service.test.ts index 014a4acbc0b..0a1bbb53dff 100644 --- a/src/plugins/data/public/query/query_string/dataset_service/dataset_service.test.ts +++ b/src/plugins/data/public/query/query_string/dataset_service/dataset_service.test.ts @@ -144,9 +144,11 @@ describe('DatasetService', () => { service.addRecentDataset(mockDataset1); const recents = service.getRecentDatasets(); - expect(recents).toContainEqual(mockDataset1); - expect(recents.length).toEqual(1); - expect(sessionStorage.get('recentDatasets')).toContainEqual(mockDataset1); + // TODO: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/8814 + expect(recents.length).toEqual(0); + // expect(recents).toContainEqual(mockDataset1); + // expect(recents.length).toEqual(1); + // expect(sessionStorage.get('recentDatasets')).toContainEqual(mockDataset1); }); test('getRecentDatasets returns all datasets', () => { @@ -158,17 +160,19 @@ describe('DatasetService', () => { timeFieldName: 'timestamp', }); } - expect(service.getRecentDatasets().length).toEqual(4); - for (let i = 0; i < 4; i++) { - const mockDataset = { - id: `dataset${i}`, - title: `Dataset ${i}`, - type: 'test-type', - timeFieldName: 'timestamp', - }; - expect(service.getRecentDatasets()).toContainEqual(mockDataset); - expect(sessionStorage.get('recentDatasets')).toContainEqual(mockDataset); - } + // TODO: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/8814 + expect(service.getRecentDatasets().length).toEqual(0); + // expect(service.getRecentDatasets().length).toEqual(4); + // for (let i = 0; i < 4; i++) { + // const mockDataset = { + // id: `dataset${i}`, + // title: `Dataset ${i}`, + // type: 'test-type', + // timeFieldName: 'timestamp', + // }; + // expect(service.getRecentDatasets()).toContainEqual(mockDataset); + // expect(sessionStorage.get('recentDatasets')).toContainEqual(mockDataset); + // } }); test('addRecentDatasets respects max size', () => { @@ -180,6 +184,8 @@ describe('DatasetService', () => { timeFieldName: 'timestamp', }); } - expect(service.getRecentDatasets().length).toEqual(4); + // TODO: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/8814 + expect(service.getRecentDatasets().length).toEqual(0); + // expect(service.getRecentDatasets().length).toEqual(4); }); }); diff --git a/src/plugins/data/public/query/query_string/dataset_service/dataset_service.ts b/src/plugins/data/public/query/query_string/dataset_service/dataset_service.ts index 5012055d1b1..63577fb4756 100644 --- a/src/plugins/data/public/query/query_string/dataset_service/dataset_service.ts +++ b/src/plugins/data/public/query/query_string/dataset_service/dataset_service.ts @@ -80,7 +80,9 @@ export class DatasetService { } public getRecentDatasets(): Dataset[] { - return this.recentDatasets.values(); + // TODO: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/8814 + return []; + // return this.recentDatasets.values(); } public addRecentDataset(dataset: Dataset | undefined, serialize: boolean = true): void {