diff options
Diffstat (limited to 'src/main/java/com/mavlushechka/a1qa/pages/GamePage.java')
-rw-r--r-- | src/main/java/com/mavlushechka/a1qa/pages/GamePage.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/main/java/com/mavlushechka/a1qa/pages/GamePage.java b/src/main/java/com/mavlushechka/a1qa/pages/GamePage.java new file mode 100644 index 0000000..740f634 --- /dev/null +++ b/src/main/java/com/mavlushechka/a1qa/pages/GamePage.java @@ -0,0 +1,38 @@ +package com.mavlushechka.a1qa.pages; + +import com.mavlushechka.a1qa.elements.Label; +import com.mavlushechka.a1qa.models.Interest; +import com.mavlushechka.a1qa.models.User; +import org.openqa.selenium.By; + +public class GamePage extends BaseForm { + + private final FirstCardForm firstCardForm = new FirstCardForm(); + private final SecondCardForm secondCardForm = new SecondCardForm(); + + + public GamePage() { + super(new Label(By.xpath("//*[@id='app']//*[contains(@class, 'game')]"), "Game view"), "Game"); + } + + public boolean isFirstCardFormOpened() { + return firstCardForm.isOpened(); + } + + public void performAuthorization(User user) { + firstCardForm.performAuthorization(user); + } + + public boolean isSecondCardOpened() { + return secondCardForm.isOpened(); + } + + public void select(Interest interest) { + secondCardForm.select(interest); + } + + public void clickDownloadImageButton() { + secondCardForm.clickDownloadImageButton(); + } + +} |