Skip to content

Commit

Permalink
rename again
Browse files Browse the repository at this point in the history
  • Loading branch information
alltonp committed Jul 8, 2015
1 parent 7fc3156 commit 55191cb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import org.scalatest.Matchers

class ElementCheckedSpec extends WebSpecification with Matchers {
def `pass for id when checked - checkbox` {
val id = Id("ElementChecked-Checkbox")
val id = Id("ElementCheckedCheckbox")
given.page(<body><form><input type="checkbox" checked="checked" id={id.id}/></form></body>)
.assert(ElementChecked(id))
}

def `fail for id not checked - checkbox` {
val id = Id("ElementCheckedWhenNotChecked-Checkbox")
val id = Id("ElementCheckedWhenNotCheckedCheckbox")
val b = given.page(<body><form><input type="checkbox" id={id.id}/></form></body>)

val thrown = the [ConditionNotMetException] thrownBy { b.assert(ElementChecked(id)) }
thrown.getMessage should equal("""> FAILED: Assert ElementChecked("Id(ElementCheckedCheckboxWhenNotChecked)") but was "null" (not met within 2000 millis)""")
thrown.getMessage should equal("""> FAILED: Assert ElementChecked("Id(ElementCheckedWhenNotCheckedCheckbox)") but was "null" (not met within 2000 millis)""")
}
}

0 comments on commit 55191cb

Please sign in to comment.