Исправлены замечания

This commit is contained in:
StroevaJ 2018-05-07 14:12:52 +04:00
parent 54217223b6
commit f7ab019a6e
8 changed files with 19 additions and 19 deletions

View File

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

View File

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

View File

@ -30,7 +30,7 @@ public class NavigationTests {
context.getDriver().get(APP_URL);
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickLogo();
Assertions.assertTrue(page.isUserPresent());
Assertions.assertTrue(page.isFilterPresent());
}
@Test
@ -39,7 +39,7 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickFooter();
HolderPage pageAn = PageFactory.initElements(context.getDriver(), HolderPage.class);
Assertions.assertTrue(pageAn.isUserPresent());
Assertions.assertTrue(pageAn.isHolderPresent());
}
@Test
@ -48,7 +48,7 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickRating();
NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class);
Assertions.assertTrue(pageAn.isUserPresent());
Assertions.assertTrue(pageAn.isContentPresent());
}
@Test
@ -57,7 +57,7 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickYear();
NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class);
Assertions.assertTrue(pageAn.isUserPresent());
Assertions.assertTrue(pageAn.isContentPresent());
}
@Test
@ -66,7 +66,7 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickCountry();
NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class);
Assertions.assertTrue(pageAn.isUserPresent());
Assertions.assertTrue(pageAn.isContentPresent());
}
@Test
@ -75,7 +75,7 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickGenre();
NavFilterPage pageAn = PageFactory.initElements(context.getDriver(), NavFilterPage.class);
Assertions.assertTrue(pageAn.isUserPresent());
Assertions.assertTrue(pageAn.isContentPresent());
}
@Test
@ -84,6 +84,6 @@ public class NavigationTests {
MainPage page = PageFactory.initElements(context.getDriver(), MainPage.class);
page.clickMenu();
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;
@FindBy(css = ".short-film")
private WebElement favoritElement;
private WebElement filmElement;
@FindBy(xpath = "//a[@href='/tosee/']")
private WebElement futureButton;
@ -51,7 +51,7 @@ public class AccUserPage {
email.clear();
}
public boolean isFavoritePage() {
return favoritElement.isDisplayed();
public boolean isListPage() {
return filmElement.isDisplayed();
}
}

View File

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

View File

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

View File

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

View File

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