WIP: Zamaldinova #15

Closed
AlmiraZ wants to merge 4 commits from Zamaldinova into master
Showing only changes of commit 9eb0b72a3a - Show all commits

View File

@ -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);
}
}