diff options
Diffstat (limited to 'src/test/java/com')
-rw-r--r-- | src/test/java/com/mavlushechka/a1qa/TestCase1.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/java/com/mavlushechka/a1qa/TestCase1.java b/src/test/java/com/mavlushechka/a1qa/TestCase1.java index c6b3b2d..a1477c5 100644 --- a/src/test/java/com/mavlushechka/a1qa/TestCase1.java +++ b/src/test/java/com/mavlushechka/a1qa/TestCase1.java @@ -47,19 +47,19 @@ public class TestCase1 extends BaseTest { LoggerUtils.step("[API] Create post on the wall with randomly generated text using API-request and save id of the post from the API-response."); Post post = new Post(VkApiUtils.createPost(postRandomText), user, postRandomText, null); LoggerUtils.step("[UI] Check that post with the sent text from the correct user appeared on the wall without refreshing the page."); - Assert.assertTrue(profilePage.contains(post), "This is not the correct post."); + Assert.assertTrue(profilePage.containsPost(post), "This is not the correct post."); Attachment picture = new Attachment(com.mavlushechka.a1qa.constants.Attachment.PHOTO, user.getId(), Integer.parseInt(JsonParser.parseData("testData", "vkontakte.photoFromAlbum.id"))); LoggerUtils.step("[API] Edit the added post using API-request - change text and add(upload) a picture."); Post editedPost = new Post(post.id(), user, post.message() + "[edited]", picture); VkApiUtils.editPost(post, editedPost); profilePage.waitForPostUpdate(editedPost); LoggerUtils.step("[UI] Check that text was updated and the picture was uploaded(make sure that pictures are the same) without refreshing the page."); - Assert.assertTrue(profilePage.contains(editedPost), "This is not the correct post."); + Assert.assertTrue(profilePage.containsPost(editedPost), "This is not the correct post."); String commentRandomText = StringUtils.generateRandomText(textLettersLowerBound, textLettersUpperBound, textLength); LoggerUtils.step("[API] Add a comment to the post with the randomly generated text using API-request."); Comment comment = new Comment(VkApiUtils.createComment(editedPost.id(), commentRandomText), user, editedPost, commentRandomText); LoggerUtils.step("[UI] Check that comment from the correct user was added to the post without refreshing the page."); - Assert.assertTrue(profilePage.contains(comment), "This is not the correct comment."); + Assert.assertTrue(profilePage.containsComment(comment), "This is not the correct comment."); LoggerUtils.step("[UI] Like the post using UI."); profilePage.clickPostLikeButton(post); LoggerUtils.step("[API] Check that the post received like from the correct user using API-request."); @@ -67,7 +67,7 @@ public class TestCase1 extends BaseTest { LoggerUtils.step("[API] Delete the post using API-request."); VkApiUtils.deletePost(editedPost); profilePage.waitForPostDelete(editedPost); - Assert.assertTrue(profilePage.notContains(editedPost), "The post is not deleted."); + Assert.assertTrue(profilePage.notContainsPost(editedPost), "The post is not deleted."); } } |