Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added tests for readonly and disabled attributes check in input/texta…

…rea elements
  • Loading branch information...
commit e0bc4bf5264ed57f306aeeaa7c851e2176218167 1 parent f44225d
Iván Loire iloire authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 spec/
14 spec/
@@ -20,6 +20,8 @@ Vows.describe("Forms").addBatch(
<input type="badtype" name="invalidtype" id="field-invalidtype" />
<input type="text" name="email2" id="field-email2" />
<input type="text" name="email3" id="field-email3" />
+ <input type="text" name="disabled_input_field" disabled id="disabled_input_field" />
+ <input type="text" name="readonly_input_field" readonly id="readonly_input_field" />
<label>You bet<input type="checkbox" name="hungry[]" value="you bet" id="field-hungry"></label>
@@ -173,6 +175,18 @@ Vows.describe("Forms").addBatch(
"should fire change event": (browser)->
assert.ok browser.email2Changed
+ "disabled input can not be modified":
+ topic: (browser)->
+ browser.fill browser.querySelector("#disabled_input_field"), "yeahh"
+ "should raise error": (browser)->
+ assert.ok (browser instanceof Error)
+ "readonly input can not be modified":
+ topic: (browser)->
+ browser.fill browser.querySelector("#readonly_input_field"), "yeahh"
+ "should raise error": (browser)->
+ assert.ok (browser instanceof Error)
"should callback":
topic: (browser)->
browser.fill browser.querySelector("#field-email3"), "", @callback
Please sign in to comment.
Something went wrong with that request. Please try again.