mirror of
https://github.com/sartography/spiffworkflow-frontend.git
synced 2025-02-24 04:08:10 +00:00
add basic test for new breadcrumb stuff
This commit is contained in:
parent
bd3be87ac9
commit
56e8efb76c
@ -12,6 +12,20 @@ test('renders home link', () => {
|
||||
expect(homeElement).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('renders hotCrumbs', () => {
|
||||
render(
|
||||
<BrowserRouter>
|
||||
<ProcessBreadcrumb
|
||||
hotCrumbs={[['Process Groups', '/admin'], [`Process Group: hey`]]}
|
||||
/>
|
||||
</BrowserRouter>
|
||||
);
|
||||
const homeElement = screen.getByText(/Process Groups/);
|
||||
expect(homeElement).toBeInTheDocument();
|
||||
const nextElement = screen.getByText(/Process Group: hey/);
|
||||
expect(nextElement).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('renders process group when given processGroupId', async () => {
|
||||
render(
|
||||
<BrowserRouter>
|
||||
|
@ -27,7 +27,7 @@ export default function ProcessBreadcrumb({
|
||||
const valueLabel = crumb[0];
|
||||
const url = crumb[1];
|
||||
return (
|
||||
<Breadcrumb.Item linkAs={Link} linkProps={{ to: url }}>
|
||||
<Breadcrumb.Item key={valueLabel} linkAs={Link} linkProps={{ to: url }}>
|
||||
{valueLabel}
|
||||
</Breadcrumb.Item>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user