Example #1
0
 @Test
 public void tamagotchiIsDisplayedTest() {
   goTo("http://localhost:4567/");
   fill("#name").with("lil dragon");
   submit(".btn");
   assertThat(pageSource()).contains("Hello, my name is lil dragon");
 }
 @Test
 public void returnTie() {
   goTo("http://localhost:4567/");
   find("#oneRock").click();
   find("#twoRock").click();
   submit(".btn");
   assertThat(pageSource()).contains("Tie");
 }
 @Test
 public void returnCorrectWinner() {
   goTo("http://localhost:4567/");
   find("#oneRock").click();
   find("#twoPaper").click();
   submit(".btn");
   assertThat(pageSource()).contains("Paper");
 }
 @Test
 public void submitArticle() {
   goTo("http://localhost:" + serverPort + "/articles/new");
   fill("#author").with("Santeri");
   fill("#title").with("Eeppinen kandi");
   fill("#citation").with("artsu");
   fill("#journal").with("test");
   fill("#year").with("1999");
   fill("#volume").with("1");
   submit("button[type=submit]");
   assertTrue(pageSource().contains("New article created"));
 }
Example #5
0
 @Test
 public void rootTest() {
   goTo("http://localhost:4567/");
   assertThat(pageSource()).contains("");
 }