test(desktop): fix attachment list test not querying the selector correctly
This commit is contained in:
@@ -31,12 +31,11 @@ describe('AttachmentList', () => {
|
||||
})
|
||||
|
||||
it('renders empty list without error', () => {
|
||||
renderWithI18n(<AttachmentList attachments={[]} />)
|
||||
const { container } = renderWithI18n(<AttachmentList attachments={[]} />)
|
||||
|
||||
const container =
|
||||
screen.getByTestId?.('composer-attachments') ?? document.querySelector('[data-slot="composer-attachments"]')
|
||||
const attachmentList = container.querySelector('[data-slot="composer-attachments"]')
|
||||
|
||||
expect(container).toBeDefined()
|
||||
expect(attachmentList).toBeDefined()
|
||||
})
|
||||
|
||||
it('does not crash when attachments array contains undefined entries', () => {
|
||||
|
||||
Reference in New Issue
Block a user