Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

userEvent.upload can't pass validation if the input element is required #1106

Closed
ysgk opened this issue Mar 12, 2023 · 1 comment
Closed

Comments

@ysgk
Copy link

ysgk commented Mar 12, 2023

Reproduction example

https://codesandbox.io/s/determined-dan-emcumz?file=/src/App.test.js

Prerequisites

  1. Render <input type="file" required /> element.
  2. userEvent.upload() a file to it.

Expected behavior

userEvent.upload should pass valueMissing constraint.

Actual behavior

Validation fails due to valueMissing constraint. Consequently, forms that contain a required file input cannot be submitted using userEvent.

User-event version

14.4.3

Environment

No response

Additional context

No response

@ysgk ysgk added bug Something isn't working needs assessment This needs to be looked at by a team member labels Mar 12, 2023
@ph-fritsche
Copy link
Member

ph-fritsche commented Mar 14, 2023

Closing this as duplicate of #801 .
Impact on form submit also reported in #1094

@ph-fritsche ph-fritsche closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2023
@ph-fritsche ph-fritsche removed bug Something isn't working needs assessment This needs to be looked at by a team member labels Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants