From 9eb0b72a3aec46995309db41be961359252c1f57 Mon Sep 17 00:00:00 2001 From: Almira Date: Wed, 12 Dec 2018 11:56:38 +0000 Subject: [PATCH] =?UTF-8?q?Update=20FilterByTest.java=20=D0=A1=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B0=D0=BB=D0=B0=20=D1=81=D1=80=D0=B0=D0=B2=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0=D0=BA=D1=82=D0=B8=D1=87=D0=B5?= =?UTF-8?q?=D1=81=D0=BA=D0=BE=D0=B3=D0=BE=20=D1=80=D0=B5=D0=B7=D1=83=D0=BB?= =?UTF-8?q?=D1=8C=D1=82=D0=B0=D1=82=D0=B0=20=D0=B8=20=D0=BE=D0=B6=D0=B8?= =?UTF-8?q?=D0=B4=D0=B0=D0=B5=D0=BC=D0=BE=D0=B3=D0=BE=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=B2=D1=81=D0=B5=D1=85=20=D1=82=D0=B5=D1=81=D1=82=D0=BE?= =?UTF-8?q?=D0=B2=20=D1=81=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D0=BC=D0=B8.=D0=94=D1=80=D1=83=D0=B3=D0=B8=D0=B5=20=D1=82?= =?UTF-8?q?=D1=80=D0=B8=20=D1=82=D0=B5=D1=81=D1=82=D0=B0=20=D1=8D=D1=82?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D0=B0=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D1=8F=D1=8E=D1=82,=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=8F=D0=B2=D0=B8=D0=BB=D0=BE=D1=81=D1=8C=20=D0=BB?= =?UTF-8?q?=D0=B8=20=D1=81=D0=BB=D0=B5=D0=B4=D1=83=D1=8E=D1=89=D0=B5=D0=B5?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=BB=D0=B5=20=D0=B4=D0=BB=D1=8F=20=D0=B2=D1=8B?= =?UTF-8?q?=D0=B1=D0=BE=D1=80=D0=B0=20=D0=BA=D1=80=D0=B8=D1=82=D0=B5=D1=80?= =?UTF-8?q?=D0=B8=D1=8F,=20=D0=BF=D1=80=D0=B8=20=D0=B8=D1=81=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B8=20=D1=84?= =?UTF-8?q?=D0=B8=D0=BB=D1=8C=D1=82=D1=80=D0=B0=20"=D0=9D=D0=BE=D0=B2?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=B8=20=D0=BC=D0=BE=D0=B5=D0=B9=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D1=8B"=20(useFilterForNewsOfMyCo?= =?UTF-8?q?mand()).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/ru/sports/tests/FilterByTest.java | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Zamaldinova/src/test/java/ru/sports/tests/FilterByTest.java b/Zamaldinova/src/test/java/ru/sports/tests/FilterByTest.java index b430565..806cc33 100644 --- a/Zamaldinova/src/test/java/ru/sports/tests/FilterByTest.java +++ b/Zamaldinova/src/test/java/ru/sports/tests/FilterByTest.java @@ -59,7 +59,7 @@ public class FilterByTest { filterBy.AustriaClick(); filterBy.AssertComand(); } - @Test + @Test public void useFilterForNewsOfMyComand() { context.getDriver().get(APP_URL); FilterBy filterBy = PageFactory.initElements(context.getDriver(), FilterBy.class); @@ -73,7 +73,11 @@ public class FilterByTest { filterBy.AustriaClick(); filterBy.comandClick(); filterBy.saveParametersClick(); - filterBy.AssertUseFilter(); + WebElement News = context.getDriver().findElement(By.cssSelector("#branding-layout > div.page-layout > div > div > div > div " + + "> aside > section:nth-child(3) > div > div > ul > li > a")); + String NewsText = News.getText(); + Assert.assertEquals("Жеребьевка Евро-2020. Россия сыграет с Бельгией, Шотландией, Кипром, Казахстаном и Сан-Марино", NewsText); + } @Test @@ -82,7 +86,12 @@ public class FilterByTest { FilterBy filterBy = PageFactory.initElements(context.getDriver(), FilterBy.class); filterBy.selectTypeOfSportClick(); filterBy.BaseballClick(); - filterBy.AssertUseFilterForNewsFromUsers(); + WebElement News = context.getDriver().findElement(By.cssSelector("#branding-layout > div.page-layout > div > div > div > div > aside > section:nth-child(16) > div > div.users-news__tabs.tabs_state_horizontal.tabs.tabs_animate.tabs_animate_horizontal-slide > div.tabs__body >" + + " div.users-news__tabs-panel.users-news__top-panel.tabs__panel.tabs__panel_active " + + "> ul:nth-child(2) > li > a")); + String NewsText = News.getText(); + Assert.assertEquals("МЛБ. Определились все участники плей-офф", NewsText); + } @Test @@ -91,7 +100,11 @@ public class FilterByTest { FilterBy filterBy = PageFactory.initElements(context.getDriver(), FilterBy.class); filterBy.selectTypeClick(); filterBy.TurkeyClick(); - filterBy.AssertUseFilterForStatistics(); + WebElement NameOfTeam = context.getDriver().findElement(By.cssSelector("#branding-layout > div.page-layout > div > div > aside > section:nth-child(6) > div > div.gadget__tournament-data > div > div:nth-child(1) > " + + "div.accordion__body > table > tbody > tr:nth-child(2) > td:nth-child(2) > a")); + String NameOfTeamText = NameOfTeam.getText(); + Assert.assertEquals("Истанбул", NameOfTeamText); + } }