Skip to content

Commit

Permalink
update unit tests for page header change
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Wang <[email protected]>
  • Loading branch information
Wei Wang committed Aug 26, 2024
1 parent 249c39a commit 96fcf39
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { CreateDataSourcePanelHeader } from './create_data_source_panel_header';
import { CreateDataSourceCardView } from './create_data_source_card_view';
import { useOpenSearchDashboards } from '../../../../opensearch_dashboards_react/public';
import { getCreateBreadcrumbs } from '../breadcrumbs';
import { DataSourceManagementContext } from '../../types';
import { RouteComponentProps } from 'react-router-dom';
import { navigationPluginMock } from 'src/plugins/navigation/public/mocks';

jest.mock('../../../../opensearch_dashboards_react/public');
jest.mock('../breadcrumbs');
Expand All @@ -34,6 +34,7 @@ describe('CreateDataSourcePanel', () => {
},
},
uiSettings: {},
navigation: navigationPluginMock.createStartContract(),
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { EuiTab } from '@elastic/eui';
import { DataSourceHomePanel } from './data_source_home_panel';
import { DataSourceTableWithRouter } from '../data_source_table/data_source_table';
import { ManageDirectQueryDataConnectionsTable } from '../direct_query_data_sources_components/direct_query_data_connection/manage_direct_query_data_connections_table';
import { CreateButton } from '../create_button';
import { useOpenSearchDashboards } from '../../../../opensearch_dashboards_react/public';
import { getListBreadcrumbs } from '../breadcrumbs';
import { navigationPluginMock } from 'src/plugins/navigation/public/mocks';

jest.mock('../../../../opensearch_dashboards_react/public');
jest.mock('../breadcrumbs');
Expand Down Expand Up @@ -42,6 +42,16 @@ describe('DataSourceHomePanel', () => {
savedObjects: {},
uiSettings: {},
application: { capabilities: { dataSource: { canManage: true } } },
docLinks: {
links: {
opensearchDashboards: {
dataSource: {
guide: 'https://opensearch.org/docs/latest/dashboards/discover/multi-data-sources/',
},
},
},
},
navigation: navigationPluginMock.createStartContract(),
},
};

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 96fcf39

Please sign in to comment.