-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add simple titleMatches test and a skeleton for another test
- Loading branch information
1 parent
3a3c2b4
commit 9e79d69
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/selenium/java/is/ru/arnlaugsson/chuck_joke/TestChuckWeb.java
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,25 @@ | ||
package is.ru.arnlaugsson.chuck_joke; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import org.junit.Test; | ||
|
||
public class TestChuckWeb extends SeleniumTestWrapper { | ||
@Test | ||
public void titleMatches() { | ||
driver.get(baseUrl); | ||
assertEquals("Chuck Norris Jokes", driver.getTitle()); | ||
} | ||
|
||
@Test | ||
public void assertUpdatingNameChangesSpecificJoke() { | ||
driver.get(baseUrl + "/config.html"); | ||
/* | ||
1. Fill in some name (first name, last name) | ||
2. Submit form. | ||
3. Assert that form notifies of success ("Name set as: ...") | ||
4. Navigate to page to get specific Joke | ||
5. Enter a specific joke number | ||
6. Assert the name is used in the joke. | ||
*/ | ||
} | ||
} |