Skip to content

Commit

Permalink
fix ts for removed homeRef prop
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Jun 13, 2023
1 parent b7e3731 commit 2d61cca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ describe('<Navigation />', () => {
navLinks$={navLinks$}
onProjectNavigationChange={onProjectNavigationChange}
>
<Navigation homeRef="https://elastic.co">
<Navigation>
<Navigation.Group id="root">
<Navigation.Group id="group1">
<Navigation.Item<any> id="item1" link="notRegistered" />
Expand All @@ -306,8 +306,8 @@ describe('<Navigation />', () => {
</NavigationProvider>
);

expect(await queryByTestId('nav-group-root.group1')).toBeNull();
expect(await queryByTestId('nav-item-root.group2.item1')).toBeVisible();
expect(queryByTestId('nav-group-root.group1')).toBeNull();
expect(queryByTestId('nav-item-root.group2.item1')).toBeVisible();

expect(onProjectNavigationChange).toHaveBeenCalled();
const lastCall =
Expand Down Expand Up @@ -500,7 +500,7 @@ describe('<Navigation />', () => {

render(
<NavigationProvider {...services} onProjectNavigationChange={onProjectNavigationChange}>
<Navigation homeRef="https://elastic.co">
<Navigation>
<Navigation.Group id="group1">
<Navigation.Item id="item1" title="Item 1" href="https://example.com" />
</Navigation.Group>
Expand Down Expand Up @@ -546,7 +546,7 @@ describe('<Navigation />', () => {
const expectToThrow = () => {
render(
<NavigationProvider {...services} onProjectNavigationChange={onProjectNavigationChange}>
<Navigation homeRef="https://elastic.co">
<Navigation>
<Navigation.Group id="group1">
<Navigation.Item id="item1" title="Item 1" href="../dashboards" />
</Navigation.Group>
Expand Down
4 changes: 0 additions & 4 deletions packages/shared-ux/chrome/navigation/src/ui/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ export interface NavigationTreeDefinition {
* or when calling `setNavigation()` on the serverless plugin.
*/
export interface ProjectNavigationDefinition {
/**
* The URL href for the home link
*/
homeRef: string;
/**
* A navigation tree structure with object items containing labels, links, and sub-items
* for a project. Use it if you only need to configure your project navigation and leave
Expand Down

0 comments on commit 2d61cca

Please sign in to comment.