File Uploader Inspection Test

Expected Behavior:

  • There is a File Upload icon, but no "Choose File" box
  • The file upload icon has a title of "FileUploader" (mouse over to see it)
  • Clicking the File Upload icon opens a file upload dialogue
  • The file upload dialogue displays that only .json files are valid
  • Selecting a valid .json file results in the JSON content getting printed below the uploader
  • That JSON content is pretty printed with spaces (verifies that the result was provided as JSON, not as a string)
  • Selecting an invalid file results in an error being thrown to the console
  • It's possible to navigate to the file uploader via the keyboard

The File Uploader

The Uploaded File

No JSON uploaded.