You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just recently I have learned that multiple = TRUE in fileInput is just a hint and is entirely enforced by the browser. For example, here is a short example of bypassing this limitation by dragging files:
CleanShot.2023-12-13.at.16.46.37.mp4
I have implemented a server-side validation to ensure that user uploads only a single file. If there is more than one file, then an error message is displayed. I want to write a test using {shinytest2} to check if a correct message is displayed.
Issue
Given a fileInput("f", multiple = FALSE) and the following {shinytest2} code only first file will make it to input$f during testing.
Context
Just recently I have learned that
multiple = TRUEinfileInputis just a hint and is entirely enforced by the browser. For example, here is a short example of bypassing this limitation by dragging files:CleanShot.2023-12-13.at.16.46.37.mp4
I have implemented a server-side validation to ensure that user uploads only a single file. If there is more than one file, then an error message is displayed. I want to write a test using
{shinytest2}to check if a correct message is displayed.Issue
Given a
fileInput("f", multiple = FALSE)and the following{shinytest2}code only first file will make it toinput$fduring testing.However, if we provide
multiple = TRUE, then both files will appear ininput$f.Reprex
app.Rtest-shinytest2.R