-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Navigation): Remove items unrelated to current schema
fix: #1444
- Loading branch information
Showing
7 changed files
with
923 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { render } from '@testing-library/react'; | ||
import { BrowserRouter as Router } from 'react-router-dom'; | ||
import { EntitiesContextResult } from '../hooks/entities'; | ||
import { SourceSchemaType } from '../models/camel'; | ||
import { EntitiesContext } from '../providers'; | ||
import { Navigation } from './Navigation'; | ||
|
||
describe('Navigation Component', () => { | ||
it.each([ | ||
SourceSchemaType.Route, | ||
SourceSchemaType.Kamelet, | ||
SourceSchemaType.Pipe, | ||
SourceSchemaType.KameletBinding, | ||
SourceSchemaType.Integration, | ||
])('navigation sidebar for: %s', (currentSchemaType) => { | ||
const wrapper = render( | ||
<Router> | ||
<EntitiesContext.Provider value={{ currentSchemaType } as EntitiesContextResult}> | ||
<Navigation isNavOpen /> | ||
</EntitiesContext.Provider> | ||
</Router>, | ||
); | ||
|
||
expect(wrapper.asFragment()).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.