test(desktop): fix attachment list test not querying the selector correctly

This commit is contained in:
ethernet 2026-07-08 19:24:17 -04:00
parent 66c097ab78
commit 92025df393

View file

@ -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', () => {