From f8501d374dbd39a66078bad11384ea241848acc6 Mon Sep 17 00:00:00 2001 From: Mavlushechka Date: Fri, 7 Oct 2022 23:46:46 +0500 Subject: Solve 1st test case --- .../com/mavlushechka/a1qa/pages/ProfilePage.java | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/main/java/com/mavlushechka/a1qa/pages/ProfilePage.java (limited to 'src/main/java/com/mavlushechka/a1qa/pages/ProfilePage.java') diff --git a/src/main/java/com/mavlushechka/a1qa/pages/ProfilePage.java b/src/main/java/com/mavlushechka/a1qa/pages/ProfilePage.java new file mode 100644 index 0000000..816517d --- /dev/null +++ b/src/main/java/com/mavlushechka/a1qa/pages/ProfilePage.java @@ -0,0 +1,41 @@ +package com.mavlushechka.a1qa.pages; + +import aquality.selenium.browser.AqualityServices; +import com.mavlushechka.a1qa.models.Comment; +import com.mavlushechka.a1qa.models.Post; +import org.openqa.selenium.By; + +public class ProfilePage extends BaseForm { + + private final ProfileWallForm profileWallForm = new ProfileWallForm(); + + + public ProfilePage() { + super(AqualityServices.getElementFactory().getLabel(By.id("profile"), "Profile"), "Profile"); + } + + public boolean contains(Post post) { + return profileWallForm.contains(post); + } + + public boolean contains(Comment comment) { + return profileWallForm.contains(comment); + } + + public boolean notContains(Post post) { + return profileWallForm.notContains(post); + } + + public void clickPostLikeButton(Post post) { + profileWallForm.clickPostLikeButton(post); + } + + public void waitForPostUpdate(Post post) { + profileWallForm.waitForPostUpdate(post); + } + + public void waitForPostDelete(Post post) { + profileWallForm.waitForPostDelete(post); + } + +} -- cgit v1.2.3