@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(); }
public static void assertDislike(String postText) { Post.findBy(text(postText)).$(".media .bd .likes").shouldBe(hidden); }
@Step public static void dislikeCreatedPost(String postText) { Post.findBy(text(postText)).$(".media .bd .feedback .info").$(byText("Unlike")).click(); }
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)); }
@Step public static void likeCreatedPost(String postText) { Post.findBy(text(postText)).$(".like").click(); }
public static void assertDeletedPost(String postText) { Post.findBy(text(postText)).shouldNotBe(present); }
@Step public static void deleteCreatedPost(String postText) { Post.findBy(text(postText)).$(".media .bd .control-icons").hover().$(".delete .trash").click(); confirm(); }
public static void assertCreatedPost(String contactName, String... postText) { Post.findBy(text(contactName)) .$$(".media .bd .post-content .collapsible .markdown-content") .shouldHave(exactTexts(postText)); }