sforkowany z mirror/soapbox
Fix PendingGroupsRow test
rodzic
2196d9e3e5
commit
a8be701ea0
|
@ -16,7 +16,7 @@ interface IPendingItemsRow {
|
||||||
|
|
||||||
const PendingItemsRow: React.FC<IPendingItemsRow> = ({ to, count, size = 'md' }) => {
|
const PendingItemsRow: React.FC<IPendingItemsRow> = ({ to, count, size = 'md' }) => {
|
||||||
return (
|
return (
|
||||||
<Link to={to} className='group'>
|
<Link to={to} className='group' data-testid='pending-items-row'>
|
||||||
<HStack alignItems='center' justifyContent='between'>
|
<HStack alignItems='center' justifyContent='between'>
|
||||||
<HStack alignItems='center' space={2}>
|
<HStack alignItems='center' space={2}>
|
||||||
<div className={clsx('rounded-full bg-primary-200 text-primary-500 dark:bg-primary-800 dark:text-primary-200', {
|
<div className={clsx('rounded-full bg-primary-200 text-primary-500 dark:bg-primary-800 dark:text-primary-200', {
|
||||||
|
|
|
@ -45,7 +45,7 @@ describe('<PendingGroupRows />', () => {
|
||||||
|
|
||||||
it('should not render', () => {
|
it('should not render', () => {
|
||||||
renderApp(store);
|
renderApp(store);
|
||||||
expect(screen.queryAllByTestId('pending-groups-row')).toHaveLength(0);
|
expect(screen.queryAllByTestId('pending-items-row')).toHaveLength(0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ describe('<PendingGroupRows />', () => {
|
||||||
|
|
||||||
it('should not render', () => {
|
it('should not render', () => {
|
||||||
renderApp(store);
|
renderApp(store);
|
||||||
expect(screen.queryAllByTestId('pending-groups-row')).toHaveLength(0);
|
expect(screen.queryAllByTestId('pending-items-row')).toHaveLength(0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ describe('<PendingGroupRows />', () => {
|
||||||
renderApp(store);
|
renderApp(store);
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(screen.queryAllByTestId('pending-groups-row')).toHaveLength(1);
|
expect(screen.queryAllByTestId('pending-items-row')).toHaveLength(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,7 +17,6 @@ export default () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PendingItemsRow
|
<PendingItemsRow
|
||||||
data-testid='pending-groups-row'
|
|
||||||
to='/groups/pending-requests'
|
to='/groups/pending-requests'
|
||||||
count={groups.length}
|
count={groups.length}
|
||||||
size='lg'
|
size='lg'
|
||||||
|
|
Ładowanie…
Reference in New Issue