Update FilterByTest.java
This commit is contained in:
parent
9eb0b72a3a
commit
14862c7ce3
@ -24,13 +24,13 @@ public class FilterByTest {
|
|||||||
context.close();
|
context.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void selectTypeOfSport() {
|
public void selectTypeOfSport() {
|
||||||
context.getDriver().get(APP_URL);
|
context.getDriver().get(APP_URL);
|
||||||
FilterBy filterBy = PageFactory.initElements(context.getDriver(), FilterBy.class);
|
FilterBy filterBy = PageFactory.initElements(context.getDriver(), FilterBy.class);
|
||||||
filterBy.typeOfSportClick();
|
filterBy.typeOfSportClick();
|
||||||
filterBy.footballClick();
|
filterBy.footballClick();
|
||||||
filterBy.AssertSelectTypeOfSport();
|
Assert.assertTrue(filterBy.AssertSelectTypeOfSport());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -42,7 +42,7 @@ public class FilterByTest {
|
|||||||
filterBy.typeOfSportClick();
|
filterBy.typeOfSportClick();
|
||||||
filterBy.tourneerClick();
|
filterBy.tourneerClick();
|
||||||
filterBy.leagueOfNationClick();
|
filterBy.leagueOfNationClick();
|
||||||
filterBy.AssertTourneer();
|
Assert.assertTrue(filterBy.AssertTourneer());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -57,9 +57,9 @@ public class FilterByTest {
|
|||||||
filterBy.tourneerClick();
|
filterBy.tourneerClick();
|
||||||
filterBy.comandClick();
|
filterBy.comandClick();
|
||||||
filterBy.AustriaClick();
|
filterBy.AustriaClick();
|
||||||
filterBy.AssertComand();
|
Assert.assertTrue(filterBy.AssertComand());
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void useFilterForNewsOfMyComand() {
|
public void useFilterForNewsOfMyComand() {
|
||||||
context.getDriver().get(APP_URL);
|
context.getDriver().get(APP_URL);
|
||||||
FilterBy filterBy = PageFactory.initElements(context.getDriver(), FilterBy.class);
|
FilterBy filterBy = PageFactory.initElements(context.getDriver(), FilterBy.class);
|
||||||
@ -73,10 +73,7 @@ public class FilterByTest {
|
|||||||
filterBy.AustriaClick();
|
filterBy.AustriaClick();
|
||||||
filterBy.comandClick();
|
filterBy.comandClick();
|
||||||
filterBy.saveParametersClick();
|
filterBy.saveParametersClick();
|
||||||
WebElement News = context.getDriver().findElement(By.cssSelector("#branding-layout > div.page-layout > div > div > div > div " +
|
Assert.assertTrue(filterBy.AssertUseFilterForNewsOfMyComand());
|
||||||
"> aside > section:nth-child(3) > div > div > ul > li > a"));
|
|
||||||
String NewsText = News.getText();
|
|
||||||
Assert.assertEquals("Жеребьевка Евро-2020. Россия сыграет с Бельгией, Шотландией, Кипром, Казахстаном и Сан-Марино", NewsText);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,11 +83,7 @@ public class FilterByTest {
|
|||||||
FilterBy filterBy = PageFactory.initElements(context.getDriver(), FilterBy.class);
|
FilterBy filterBy = PageFactory.initElements(context.getDriver(), FilterBy.class);
|
||||||
filterBy.selectTypeOfSportClick();
|
filterBy.selectTypeOfSportClick();
|
||||||
filterBy.BaseballClick();
|
filterBy.BaseballClick();
|
||||||
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 >" +
|
Assert.assertTrue(filterBy.AssertUseFilterForNewsFromUsers());
|
||||||
" 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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,10 +93,7 @@ public class FilterByTest {
|
|||||||
FilterBy filterBy = PageFactory.initElements(context.getDriver(), FilterBy.class);
|
FilterBy filterBy = PageFactory.initElements(context.getDriver(), FilterBy.class);
|
||||||
filterBy.selectTypeClick();
|
filterBy.selectTypeClick();
|
||||||
filterBy.TurkeyClick();
|
filterBy.TurkeyClick();
|
||||||
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) > " +
|
Assert.assertTrue(filterBy.AssertUseFilterForStatistics());
|
||||||
"div.accordion__body > table > tbody > tr:nth-child(2) > td:nth-child(2) > a"));
|
|
||||||
String NameOfTeamText = NameOfTeam.getText();
|
|
||||||
Assert.assertEquals("Истанбул", NameOfTeamText);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user