Focus file upload modal on open (#32188)

GitOrigin-RevId: 89ad65e4ad5af59d46f04ca4e057f88120e8293f
This commit is contained in:
Alf Eaton
2026-03-20 09:06:13 +00:00
committed by Copybot
parent 46d1064837
commit 616f99fece
2 changed files with 46 additions and 26 deletions
@@ -530,13 +530,14 @@ describe('<FileTreeModalCreateFile/>', function () {
// the submit button should not be present
cy.findByRole('button', { name: 'Create' }).should('not.exist')
cy.findByRole('button', { name: 'Select files' }).should('be.focused')
cy.wrap(null).then(() => {
const clipboardData = new DataTransfer()
clipboardData.items.add(
new File(['test'], 'test.tex', { type: 'text/plain' })
)
cy.findByLabelText('Uppy Dashboard').trigger('paste', { clipboardData })
cy.focused().trigger('paste', { clipboardData })
})
cy.wait('@uploadFile')