Skip to content

Commit

Permalink
tidy up a spec a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
alltonp committed Aug 13, 2015
1 parent 95028f4 commit 73c0965
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import im.mange.driveby.Id
import im.mange.driveby.conditions._
import org.scalatest.Matchers

//TIP: this is a good spec to copy
class ElementVisibleSpec extends WebSpecification with Matchers {
def `work for id` {
val id = "ElementVisible"
Expand All @@ -18,7 +19,7 @@ class ElementVisibleSpec extends WebSpecification with Matchers {
val b = given.page(<b id={id} style="display:none">{id}</b>)

val thrown = the [ConditionNotMetException] thrownBy { b.assert(ElementVisible(Id(id))) }
thrown.getMessage should equal("""> FAILED: Assert ElementVisible("Id(ElementVisibleWhenHidden)") but was "hidden" (not met within 2000 millis)""")
thrown.getMessage should equal(s"""> FAILED: Assert ElementVisible("Id($id)") but was "hidden" (not met within 2000 millis)""")
}

def `fail for id not exist` {
Expand Down

0 comments on commit 73c0965

Please sign in to comment.