code: def test_file_uploader_error_message_disallowed_files(
      app: Page, assert_snapshot: ImageCompareFunction
  ):
      """Test that shows error message for disallowed files."""
      file_name1 = "example.json"
      file_content1 = b"{}"
  
      uploader_index = 0
  
      with app.expect_file_chooser() as fc_info:
          app.get_by_test_id("stFileUploadDropzone").nth(
              uploader_index
          ).click()
  
      file_chooser = fc_info.value
      file_chooser.set_files(
          files=[
              {
                  "name": file_name1,
                  "mimeType": "application/json",
                  "buffer": file_content1,
              }
          ]
      )
  
      wait_for_app_run(app)
      app.wait_for_timeout(1000)
  
      expect(
          app.get_by_test_id("stUploadedFileErrorMessage").nth(
              uploader_index
          )
      ).to_have_text(
          "application/json files are not allowed.", use_inner_text=True
      )
  
      file_uploader_in_error_state = app.get_by_test_id(
          "stFileUploader"
      ).nth(uploader_index)
  
      assert_snapshot(
          file_uploader_in_error_state, name="st_file_uploader-error"
      )
  
imports: from playwright.sync_api import Page, expect
  from e2e_playwright.conftest import ImageCompareFunction, wait_for_app_run
label_desc: Use image node_id 2 for calling a global function with example usage: test_file_uploader_error_message_disallowed_files(app, assert_snapshot) without return types