Skip to content

Commit a1bde46

Browse files
[FIX] RHOAIENG-50669 : [Product bug] Data sources in Feature store doesn't show up (opendatahub-io#6374)
* fix(feature-store): correct Data sources route to fix blank page * test(cypress): add regression test for Data sources sidebar navigation
1 parent 3ad9680 commit a1bde46

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

packages/cypress/cypress/tests/mocked/featureStore/featureDataSources.cy.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import { mockFeatureStoreService } from '@odh-dashboard/feature-store/mocks/mock
44
import { mockFeatureStoreProject } from '@odh-dashboard/feature-store/mocks/mockFeatureStoreProject';
55
import { mockFeatureView } from '@odh-dashboard/feature-store/mocks/mockFeatureViews';
66
import { mockDataSource } from '@odh-dashboard/feature-store/mocks/mockDataSources';
7+
import {
8+
mockResourceCounts,
9+
mockPopularTags,
10+
mockRecentlyVisited,
11+
} from '@odh-dashboard/feature-store/mocks/mockMetrics';
712
import { mockDashboardConfig } from '@odh-dashboard/internal/__mocks__/mockDashboardConfig';
813
import { mockDscStatus } from '@odh-dashboard/internal/__mocks__/mockDscStatus';
914
import { mockK8sResourceList } from '@odh-dashboard/internal/__mocks__/mockK8sResourceList';
@@ -215,6 +220,24 @@ const mockDataSourceDetailsIntercept = () => {
215220
).as('getDataSourceDetails');
216221
};
217222

223+
const mockOverviewMetricsIntercept = () => {
224+
cy.intercept(
225+
'GET',
226+
`/api/featurestores/${k8sNamespace}/${fsName}/api/v1/metrics/resource_counts*`,
227+
mockResourceCounts(),
228+
);
229+
cy.intercept(
230+
'GET',
231+
`/api/featurestores/${k8sNamespace}/${fsName}/api/v1/metrics/popular_tags*`,
232+
mockPopularTags(),
233+
);
234+
cy.intercept(
235+
'GET',
236+
`/api/featurestores/${k8sNamespace}/${fsName}/api/v1/metrics/recently_visited*`,
237+
mockRecentlyVisited(),
238+
);
239+
};
240+
218241
const mockDataSourceFeatureViewsIntercept = () => {
219242
cy.intercept(
220243
'GET',
@@ -273,6 +296,16 @@ describe('Feature Data Sources for all projects', () => {
273296
mockAllDataSourcesIntercept();
274297
});
275298

299+
it('should load Data sources page when navigating via sidebar', () => {
300+
mockOverviewMetricsIntercept();
301+
featureStoreGlobal.visitOverview();
302+
featureStoreGlobal.navigateToDataSources();
303+
304+
cy.url().should('include', '/feature-store/data-sources');
305+
featureStoreGlobal.findHeading().should('have.text', 'Data sources');
306+
featureDataSourcesTable.findTable().should('be.visible');
307+
});
308+
276309
it('should display all data sources when no project is selected', () => {
277310
featureStoreGlobal.visitDataSources();
278311

packages/feature-store/extensions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ const extensions: (AreaExtension | HrefNavItemExtension | RouteExtension | NavSe
6666
properties: {
6767
id: 'featureStore-data-sources',
6868
title: 'Data sources',
69-
href: '/develop-train/feature-store/datasources',
69+
href: '/develop-train/feature-store/data-sources',
7070
section: 'feature-store',
71-
path: '/develop-train/feature-store/datasources/*',
71+
path: '/develop-train/feature-store/data-sources/*',
7272
},
7373
},
7474
{

0 commit comments

Comments
 (0)