mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	add/fix tests
This commit is contained in:
		
							parent
							
								
									68dfaaf767
								
							
						
					
					
						commit
						bbb4d10718
					
				| @ -12,8 +12,8 @@ describe('Cameras Route', () => { | ||||
|     useConfigMock = jest.spyOn(Api, 'useConfig').mockImplementation(() => ({ | ||||
|       data: { | ||||
|         cameras: { | ||||
|           front: { name: 'front', objects: { track: ['taco', 'cat', 'dog'] } }, | ||||
|           side: { name: 'side', objects: { track: ['taco', 'cat', 'dog'] } }, | ||||
|           front: { name: 'front', objects: { track: ['taco', 'cat', 'dog'] }, record: { enabled: true } }, | ||||
|           side: { name: 'side', objects: { track: ['taco', 'cat', 'dog'] }, record: { enabled: false } }, | ||||
|         }, | ||||
|       }, | ||||
|       status: 'loaded', | ||||
| @ -41,6 +41,14 @@ describe('Cameras Route', () => { | ||||
|     expect(screen.queryByText('side').closest('a')).toHaveAttribute('href', '/cameras/side'); | ||||
|   }); | ||||
| 
 | ||||
|   test('shows recordings link', async () => { | ||||
|     render(<Cameras />); | ||||
| 
 | ||||
|     expect(screen.queryByLabelText('Loading…')).not.toBeInTheDocument(); | ||||
| 
 | ||||
|     expect(screen.queryAllByText('Recordings')).toHaveLength(1); | ||||
|   }); | ||||
| 
 | ||||
|   test('buttons toggle detect, clips, and snapshots', async () => { | ||||
|     const sendDetect = jest.fn(); | ||||
|     const sendClips = jest.fn(); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user