예제 #1
0
 @Step
 public static void commentCreatedPost(String postText, String commentText) {
   Post.findBy(text(postText)).$(".media .bd .feedback .info").$(byText("Comment")).click();
   Post.findBy(text(postText))
       .$(".media .bd .comments .bd .new_comment .comment_box")
       .setValue(commentText);
   Post.findBy(text(postText))
       .$(".media .bd .comments .bd .new_comment .submit_button .creation")
       .click();
 }
예제 #2
0
 public static void assertDislike(String postText) {
   Post.findBy(text(postText)).$(".media .bd .likes").shouldBe(hidden);
 }
예제 #3
0
 @Step
 public static void dislikeCreatedPost(String postText) {
   Post.findBy(text(postText)).$(".media .bd .feedback .info").$(byText("Unlike")).click();
 }
예제 #4
0
 public static void assertCreatedComment(String postText, String commentText) {
   Post.findBy(text(postText))
       .$$(".media .bd .comments .comment_stream .comments .comment .bd .comment-content")
       .shouldHave(exactTexts(commentText));
 }
예제 #5
0
 public static void assertDeletedPost(String postText) {
   Post.findBy(text(postText)).shouldNotBe(present);
 }
예제 #6
0
 @Step
 public static void likeCreatedPost(String postText) {
   Post.findBy(text(postText)).$(".like").click();
 }
예제 #7
0
 public static void assertCreatedPost(String contactName, String... postText) {
   Post.findBy(text(contactName))
       .$$(".media .bd .post-content .collapsible .markdown-content")
       .shouldHave(exactTexts(postText));
 }
예제 #8
0
 @Step
 public static void deleteCreatedPost(String postText) {
   Post.findBy(text(postText)).$(".media .bd .control-icons").hover().$(".delete .trash").click();
   confirm();
 }
예제 #9
0
 private void assertNoTasks() {
   tasks.shouldBe(empty);
 }
예제 #10
0
 private void assertNoVisibleTasks() {
   tasks.filter(visible).shouldBe(empty);
 }
예제 #11
0
 private void assertVisibleTasksAre(String... texts) {
   tasks.filter(visible).shouldHave(exactTexts(texts));
 }
예제 #12
0
 private void assertTasksAre(String... texts) {
   tasks.shouldHave(exactTexts(texts));
 }
예제 #13
0
 private SelenideElement startEdit(String oldName, String newName) {
   tasks.find(exactText(oldName)).find("label").doubleClick();
   return tasks.find(cssClass("editing")).find(".edit").setValue(newName);
 }
예제 #14
0
 private void toggle(String taskText) {
   tasks.find(exactText(taskText)).find(".toggle").click();
 }
예제 #15
0
 private void deleteTask(String taskText) {
   tasks.find(exactText(taskText)).hover().find(".destroy").shouldBe(enabled).click();
 }