Advertisement
zhytnytskyi

CSS Task

Apr 20th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1. package ua.com.azhytnytskyi.csstask;
  2.  
  3. import com.codeborne.selenide.Configuration;
  4. import org.junit.Test;
  5.  
  6. import static com.codeborne.selenide.CollectionCondition.exactTexts;
  7. import static com.codeborne.selenide.Selenide.*;
  8.  
  9. public class TodoMvcTest {
  10.  
  11.     @Test
  12.     public void completeTask() {
  13.         open("http://todomvc.com/examples/emberjs");
  14.  
  15.         $("#new-todo").setValue("a").pressEnter();
  16.         $("#new-todo").setValue("b").pressEnter();
  17.         $("#new-todo").setValue("c").pressEnter();
  18.  
  19.         $$("#todo-list li").shouldHave(exactTexts("a", "b", "c"));
  20.  
  21.         $("#todo-list li:nth-of-type(2) .toggle").click();
  22.  
  23.         $$("#todo-list li.completed").shouldHave(exactTexts("b"));
  24.  
  25.         $$("#todo-list li:not(.completed)").shouldHave(exactTexts("a","c"));
  26.  
  27.     }
  28.  
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement