Stroeva #7

Closed
StroevaJ wants to merge 6 commits from Stroeva into master
8 changed files with 19 additions and 19 deletions
Showing only changes of commit f7ab019a6e - Show all commits

View File

@ -74,7 +74,7 @@ public class AccountTests {
page.clickAccUser(); page.clickAccUser();
AccUserPage pageAn = PageFactory.initElements(context.getDriver(), AccUserPage.class); AccUserPage pageAn = PageFactory.initElements(context.getDriver(), AccUserPage.class);
pageAn.clickToFavorite(); pageAn.clickToFavorite();
Assertions.assertTrue(pageAn.isFavoritePage()); Assertions.assertTrue(pageAn.isListPage());
page.clickAccUser(); page.clickAccUser();
page.clickExitAccUser(); page.clickExitAccUser();
} }
@ -87,7 +87,7 @@ public class AccountTests {
page.clickAccUser(); page.clickAccUser();
AccUserPage pageAn = PageFactory.initElements(context.getDriver(), AccUserPage.class); AccUserPage pageAn = PageFactory.initElements(context.getDriver(), AccUserPage.class);
pageAn.clickToFuture(); pageAn.clickToFuture();
Assertions.assertTrue(pageAn.isFavoritePage()); Assertions.assertTrue(pageAn.isListPage());
page.clickAccUser(); page.clickAccUser();
page.clickExitAccUser(); page.clickExitAccUser();
} }

View File

@ -34,7 +34,7 @@ public class FilterTests {
page.insertSearchText("Древние"); page.insertSearchText("Древние");
page.insertEnterSearchText(); page.insertEnterSearchText();
SearchPage pageAn = PageFactory.initElements(context.getDriver(), SearchPage.class); SearchPage pageAn = PageFactory.initElements(context.getDriver(), SearchPage.class);
Assertions.assertTrue(pageAn.isUserPresent()); Assertions.assertTrue(pageAn.isSearchPresent());
} }
@Test @Test

View File

@ -30,7 +30,7 @@ public class NavigationTests {
context.getDriver().get(APP_URL); context.getDriver().get(APP_URL);
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class); MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickLogo(); page.clickLogo();
Assertions.assertTrue(page.isUserPresent()); Assertions.assertTrue(page.isFilterPresent());
} }
@Test @Test
@ -39,7 +39,7 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class); MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickFooter(); page.clickFooter();
HolderPage pageAn = PageFactory.initElements(context.getDriver(), HolderPage.class); HolderPage pageAn = PageFactory.initElements(context.getDriver(), HolderPage.class);
Assertions.assertTrue(pageAn.isUserPresent()); Assertions.assertTrue(pageAn.isHolderPresent());
} }
@Test @Test
@ -48,7 +48,7 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class); MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickRating(); page.clickRating();
NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class); NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class);
Assertions.assertTrue(pageAn.isUserPresent()); Assertions.assertTrue(pageAn.isContentPresent());
} }
@Test @Test
@ -57,7 +57,7 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class); MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickYear(); page.clickYear();
NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class); NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class);
Assertions.assertTrue(pageAn.isUserPresent()); Assertions.assertTrue(pageAn.isContentPresent());
} }
@Test @Test
@ -66,7 +66,7 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class); MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickCountry(); page.clickCountry();
NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class); NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class);
Assertions.assertTrue(pageAn.isUserPresent()); Assertions.assertTrue(pageAn.isContentPresent());
} }
@Test @Test
@ -75,7 +75,7 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class); MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickGenre(); page.clickGenre();
NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class); NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class);
Assertions.assertTrue(pageAn.isUserPresent()); Assertions.assertTrue(pageAn.isContentPresent());
} }
@Test @Test
@ -84,6 +84,6 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class); MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickMenu(); page.clickMenu();
NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class); NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class);
Assertions.assertTrue(pageAn.isUserPresent()); Assertions.assertTrue(pageAn.isContentPresent());
} }
} }

View File

@ -16,7 +16,7 @@ public class AccUserPage {
private WebElement favoritButton; private WebElement favoritButton;
@FindBy(css = ".short-film") @FindBy(css = ".short-film")
private WebElement favoritElement; private WebElement filmElement;
@FindBy(xpath = "//a[@href='/tosee/']") @FindBy(xpath = "//a[@href='/tosee/']")
private WebElement futureButton; private WebElement futureButton;
@ -51,7 +51,7 @@ public class AccUserPage {
email.clear(); email.clear();
} }
public boolean isFavoritePage() { public boolean isListPage() {
return favoritElement.isDisplayed(); return filmElement.isDisplayed();
} }
} }

View File

@ -14,7 +14,7 @@ public class HolderPage {
this.driver = driver; this.driver = driver;
} }
public boolean isUserPresent() { public boolean isHolderPresent() {
return holderElement.isDisplayed(); return holderElement.isDisplayed();
} }
} }

View File

@ -71,7 +71,7 @@ public class MainPage {
menuElement.click(); menuElement.click();
} }
public boolean isUserPresent() { public boolean isFilterPresent() {
return filterElement.isDisplayed(); return filterElement.isDisplayed();
} }
} }

View File

@ -8,13 +8,13 @@ public class NavFilterPage {
WebDriver driver; WebDriver driver;
@FindBy(id = "dle-content") @FindBy(id = "dle-content")
private WebElement ratingElement; private WebElement contentElement;
public NavFilterPage(WebDriver driver) { public NavFilterPage(WebDriver driver) {
this.driver = driver; this.driver = driver;
} }
public boolean isUserPresent() { public boolean isContentPresent() {
return ratingElement.isDisplayed(); return contentElement.isDisplayed();
} }
} }

View File

@ -14,7 +14,7 @@ public class SearchPage {
this.driver = driver; this.driver = driver;
} }
public boolean isUserPresent() { public boolean isSearchPresent() {
return searchElement.isDisplayed(); return searchElement.isDisplayed();
} }
} }