mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Focus file upload modal on open (#32188)
GitOrigin-RevId: 89ad65e4ad5af59d46f04ca4e057f88120e8293f
This commit is contained in:
+2
-1
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user