Added a unit test for hidden fields (should have a 'hidden' CSS class).

pull/7/head
Ferry Boender 9 years ago
parent 8e01b3de75
commit dc7e2669ce
  1. 4
      test/test.py
  2. 14
      test/test_webapp.json

@ -322,6 +322,10 @@ class WebAppTest(unittest.TestCase):
f_orig = file('static/ssh_server.png', 'rb').read()
self.assertEquals(f_orig, f_served)
def testHiddenField(self):
r = requests.get('http://localhost:8002/form?form_name=hidden_field', auth=self.auth_user)
self.assertIn('class="hidden"', r.text)
class WebAppSingleTest(unittest.TestCase):
"""

@ -139,6 +139,20 @@
"type": "file"
}
]
},
{
"name": "hidden_field",
"title": "Hidden field",
"description": "Hidden field",
"script": "test.sh",
"fields": [
{
"name": "Hidden class",
"title": "This field has a 'hidden' class.",
"type": "string",
"hidden": true
}
]
}
]
}

Loading…
Cancel
Save