-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
test-project/src/test/scala/net/liftmodules/ng/test/DelayedInitSpecs.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package net.liftmodules.ng.test | ||
|
||
import org.scalatest.time.{Millis, Seconds, Span} | ||
|
||
class DelayedInitSpecs extends BaseSpec { | ||
implicit override val patienceConfig = | ||
PatienceConfig(timeout = scaled(Span(3, Seconds)), interval = scaled(Span(5, Millis))) | ||
|
||
"The Delay page" should "load" in { | ||
go to s"$index/delay" | ||
eventually { pageTitle should be ("App: Delay") } | ||
} | ||
|
||
"The integers" should "load starting at 6" in { | ||
eventually { id("last-msg").element.text should be ("6") } | ||
eventually { id("last-msg").element.text should be ("7") } | ||
eventually { id("last-msg").element.text should be ("8") } | ||
eventually { id("last-msg").element.text should be ("9") } | ||
eventually { id("last-msg").element.text should be ("10") } | ||
} | ||
|
||
"The final list" should "contain all integers in order" in { | ||
val divs = findAll(className("early-emit-out")) | ||
divs.drop(1).zipWithIndex.foreach { case (div, i) => | ||
div.text should be (i.toString) | ||
} | ||
} | ||
} |