mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-03-03 18:40:39 +00:00
28 lines
815 B
TypeScript
28 lines
815 B
TypeScript
import { render, screen } from '@testing-library/react';
|
|
import { BrowserRouter } from 'react-router-dom';
|
|
import ProcessBreadcrumb from './ProcessBreadcrumb';
|
|
|
|
test('renders home link', () => {
|
|
// render(
|
|
// <BrowserRouter>
|
|
// <ProcessBreadcrumb />
|
|
// </BrowserRouter>
|
|
// );
|
|
// const homeElement = screen.getByText(/Process Groups/);
|
|
// 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();
|
|
});
|