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' }) => {
|
||||
return (
|
||||
<Link to={to} className='group'>
|
||||
<Link to={to} className='group' data-testid='pending-items-row'>
|
||||
<HStack alignItems='center' justifyContent='between'>
|
||||
<HStack alignItems='center' space={2}>
|
||||
<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', () => {
|
||||
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', () => {
|
||||
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);
|
||||
|
||||
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 (
|
||||
<>
|
||||
<PendingItemsRow
|
||||
data-testid='pending-groups-row'
|
||||
to='/groups/pending-requests'
|
||||
count={groups.length}
|
||||
size='lg'
|
||||
|
|
Ładowanie…
Reference in New Issue