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

feat(upload): accept filter option #562

Merged
merged 5 commits into from
Feb 28, 2021
Merged

feat(upload): accept filter option #562

merged 5 commits into from
Feb 28, 2021

Conversation

ph-fritsche
Copy link
Member

@ph-fritsche ph-fritsche commented Feb 23, 2021

What:

Add applyAccept option to userEvent.upload that defaults to false.

Why:

Filtering the files for the the input causes problems for those testing their own filters.
#558 (comment)

Those who want to test their accept attributes can opt-in per:

  userEvent.upload(element, files, undefined, { applyAccept: true })

How:

Add an options parameter to the API.

Checklist:

  • Documentation
  • Tests
  • Typings
  • Ready to be merged

@codecov
Copy link

codecov bot commented Feb 23, 2021

Codecov Report

Merging #562 (14c7090) into master (5a4b1b7) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #562   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          706       717   +11     
  Branches       222       226    +4     
=========================================
+ Hits           706       717   +11     
Impacted Files Coverage Δ
src/upload.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a4b1b7...14c7090. Read the comment docs.

@ph-fritsche
Copy link
Member Author

@LauraBeatris @pleunv

@LauraBeatris
Copy link
Contributor

It's all good from my side regarding the filter option

@pleunv
Copy link

pleunv commented Feb 23, 2021

:shipit:

@ph-fritsche ph-fritsche marked this pull request as ready for review February 23, 2021 14:56
@ph-fritsche ph-fritsche merged commit ede2df1 into master Feb 28, 2021
@ph-fritsche ph-fritsche deleted the fix-558 branch February 28, 2021 15:02
@github-actions
Copy link

🎉 This PR is included in version 12.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants