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 64b99527ea1a..2c45776f62e0 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 @@ -197,9 +197,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', () => { @@ -211,17 +213,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', () => { @@ -233,7 +237,9 @@ 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); }); test('test get default dataset ', async () => { 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 641e0a7a3334..9f47448c5324 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 {