mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: uri decode breadcrumbs (#6557)
This commit is contained in:
parent
98c1c101ee
commit
05c014cde7
@ -0,0 +1,22 @@
|
||||
import { render } from 'utils/testRenderer';
|
||||
import { Route, Routes } from 'react-router-dom';
|
||||
import BreadcrumbNav from './BreadcrumbNav';
|
||||
import { screen } from '@testing-library/react';
|
||||
|
||||
test('decode URI encoded path in breadcrumbs nav', async () => {
|
||||
render(
|
||||
<Routes>
|
||||
<Route
|
||||
path={'/applications/:name/:instance'}
|
||||
element={<BreadcrumbNav />}
|
||||
/>
|
||||
</Routes>,
|
||||
{
|
||||
route: '/applications/my%20app/my%20instance',
|
||||
},
|
||||
);
|
||||
|
||||
await screen.findByText('applications');
|
||||
await screen.findByText('my app');
|
||||
await screen.findByText('my instance');
|
||||
});
|
@ -49,7 +49,8 @@ const BreadcrumbNav = () => {
|
||||
item !== 'create-toggle' &&
|
||||
item !== 'settings' &&
|
||||
item !== 'profile',
|
||||
);
|
||||
)
|
||||
.map(decodeURI);
|
||||
|
||||
return (
|
||||
<StyledBreadcrumbContainer>
|
||||
|
Loading…
Reference in New Issue
Block a user