We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I got error: Unable to find an accessible element with the role "listitem". I cannot get list of content to test action on that.
import {render, screen} from '@testing-library/react' import {FileArray, FileBrowser} from 'chonky' import {describe, expect, it} from 'vitest' const DATA: {data: FileArray} = { data: [ { name: '2024-02-05.jpg', id: '2024-02-05.jpg', thumbnailUrl: 'TEST', size: 122161, modDate: '2024-06-12T02:03:31.000Z' } ] } describe('FileBrowser', () => { it('should display file list', () => { render(<FileBrowser files={DATA.data} />) const fileItems = screen.getAllByRole('listitem') expect(fileItems).toHaveLength(2) expect(fileItems[0]).toHaveTextContent('2024-02-05.jpg') }) })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I got error: Unable to find an accessible element with the role "listitem".
I cannot get list of content to test action on that.
The text was updated successfully, but these errors were encountered: