From f7ab019a6e3c0c2f72ab906d80e02fed8d87fa98 Mon Sep 17 00:00:00 2001 From: StroevaJ Date: Mon, 7 May 2018 14:12:52 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=B7=D0=B0=D0=BC=D0=B5=D1=87=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Stroeva/src/test/java/AccountTests.java | 4 ++-- Stroeva/src/test/java/FilterTests.java | 2 +- Stroeva/src/test/java/NavigationTests.java | 14 +++++++------- Stroeva/src/test/java/page/AccUserPage.java | 6 +++--- Stroeva/src/test/java/page/HolderPage.java | 2 +- Stroeva/src/test/java/page/MainPage.java | 2 +- Stroeva/src/test/java/page/NavFilterPage.java | 6 +++--- Stroeva/src/test/java/page/SearchPage.java | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Stroeva/src/test/java/AccountTests.java b/Stroeva/src/test/java/AccountTests.java index 61773f5..bd055e1 100644 --- a/Stroeva/src/test/java/AccountTests.java +++ b/Stroeva/src/test/java/AccountTests.java @@ -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(); } diff --git a/Stroeva/src/test/java/FilterTests.java b/Stroeva/src/test/java/FilterTests.java index 3e5f077..30a0642 100644 --- a/Stroeva/src/test/java/FilterTests.java +++ b/Stroeva/src/test/java/FilterTests.java @@ -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 diff --git a/Stroeva/src/test/java/NavigationTests.java b/Stroeva/src/test/java/NavigationTests.java index b3dc2d3..077490a 100644 --- a/Stroeva/src/test/java/NavigationTests.java +++ b/Stroeva/src/test/java/NavigationTests.java @@ -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()); } } diff --git a/Stroeva/src/test/java/page/AccUserPage.java b/Stroeva/src/test/java/page/AccUserPage.java index 8ec7439..589b626 100644 --- a/Stroeva/src/test/java/page/AccUserPage.java +++ b/Stroeva/src/test/java/page/AccUserPage.java @@ -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(); } } diff --git a/Stroeva/src/test/java/page/HolderPage.java b/Stroeva/src/test/java/page/HolderPage.java index 258bf94..4bba510 100644 --- a/Stroeva/src/test/java/page/HolderPage.java +++ b/Stroeva/src/test/java/page/HolderPage.java @@ -14,7 +14,7 @@ public class HolderPage { this.driver = driver; } - public boolean isUserPresent() { + public boolean isHolderPresent() { return holderElement.isDisplayed(); } } diff --git a/Stroeva/src/test/java/page/MainPage.java b/Stroeva/src/test/java/page/MainPage.java index 2761e52..e8fe5d2 100644 --- a/Stroeva/src/test/java/page/MainPage.java +++ b/Stroeva/src/test/java/page/MainPage.java @@ -71,7 +71,7 @@ public class MainPage { menuElement.click(); } - public boolean isUserPresent() { + public boolean isFilterPresent() { return filterElement.isDisplayed(); } } diff --git a/Stroeva/src/test/java/page/NavFilterPage.java b/Stroeva/src/test/java/page/NavFilterPage.java index 50d5ab1..fb7b707 100644 --- a/Stroeva/src/test/java/page/NavFilterPage.java +++ b/Stroeva/src/test/java/page/NavFilterPage.java @@ -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(); } } diff --git a/Stroeva/src/test/java/page/SearchPage.java b/Stroeva/src/test/java/page/SearchPage.java index 81989c0..b8ac6d7 100644 --- a/Stroeva/src/test/java/page/SearchPage.java +++ b/Stroeva/src/test/java/page/SearchPage.java @@ -14,7 +14,7 @@ public class SearchPage { this.driver = driver; } - public boolean isUserPresent() { + public boolean isSearchPresent() { return searchElement.isDisplayed(); } }