abramenal / cypress-file-upload

File upload testing made easy
https://npm.im/cypress-file-upload
MIT License
496 stars 89 forks source link

[Bug] Imaged uploaded to dropzone, not available in dropzone but test passes. #309

Closed alucardu closed 3 years ago

alucardu commented 3 years ago

Current behavior:

Imaged is not getting attached to dropzone:

image

As you can see on the screenshot the test succeeded:

it('Add passport front to file upload', () => {
  const fixtureFile = 'paspoort-voorkant.jpg'
  cy.get('[data-cy="dropzone_front"]').attachFile(fixtureFile)
})

The console also shows the file, but the file is not available in the actual dropzone component in the browser.

Desired behavior:

Uploaded file should be inserted into dropzone component

Versions

7.5.0 Windows 10 Chrome 91.0.4472.77

alucardu commented 3 years ago

Closed.

it('Add passport back to file upload', () => {
  cy.get('[data-cy="file-input"]')
    .attachFile('paspoort-voorkant.jpg', { subjectType: 'drag-n-drop' })
})