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(); private final HelpForm helpForm = new HelpForm(); private final CookiesForm cookiesForm = new CookiesForm(); 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(); } public void hideHelpForm() { helpForm.hide(); } public boolean isHelpFormHidden() { return helpForm.isHidden(); } public void acceptCookies() { cookiesForm.accept(); } public boolean isCookiesFormHidden() { return cookiesForm.isHidden(); } }