-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
execute navigateTo automatically for every test #11 -
the path can now be defined as part of the spec. The IntegrationSpec will then execute "go to" before each test, using the stored url (defined as $host$projectRoot$path). If some tests need to change the path, they might do so by calling the afterChangingPathTo method.
- Loading branch information
Daniel.Rey
committed
Oct 23, 2016
1 parent
6cc8180
commit 3c2c483
Showing
13 changed files
with
115 additions
and
25 deletions.
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
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
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
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
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
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
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
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
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
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
23 changes: 23 additions & 0 deletions
23
integration_test/src/it/scala/org/scalawebtest/integration/navigation/ChangePathSpec.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,23 @@ | ||
package org.scalawebtest.integration.navigation | ||
|
||
import org.scalawebtest.integration.ScalaWebTestBaseSpec | ||
|
||
class ChangePathSpec extends ScalaWebTestBaseSpec { | ||
path = "/a.jsp" | ||
|
||
"When url is defined it" should "automatically navigate to page A" in { | ||
webDriver.findElementByTagName("h1").getText shouldEqual "a" | ||
} | ||
afterChangingPathTo("/b.jsp") | ||
it should "navigate to page B" in { | ||
webDriver.findElementByTagName("h1").getText shouldEqual "b" | ||
} | ||
afterChangingPathTo("/a.jsp") | ||
it should "navigate to page A again" in { | ||
webDriver.findElementByTagName("h1").getText shouldEqual "a" | ||
} | ||
afterChangingPathTo("/b.jsp") | ||
it should "navigate to page B again" in { | ||
webDriver.findElementByTagName("h1").getText shouldEqual "b" | ||
} | ||
} |
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,9 @@ | ||
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | ||
<html> | ||
<head> | ||
<title>a</title> | ||
</head> | ||
<body> | ||
<h1>a</h1> | ||
</body> | ||
</html> |
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,9 @@ | ||
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | ||
<html> | ||
<head> | ||
<title>b</title> | ||
</head> | ||
<body> | ||
<h1>b</h1> | ||
</body> | ||
</html> |