Exemple #1
0
        public void AllResultsHaveSearchingInTitle()
        {
            MainPageService.GotoBasePage();
            MainPageService.Search("Rammstein");
            var x = SearchResultsPage.GetSearchTitles();

            Assert.That(x.All(el => el.Contains("rammstein")), "The element without search word is exist");
        }
Exemple #2
0
        public void TwoPageSearchResultsAreDifferent()
        {
            MainPageService.GotoBasePage();
            MainPageService.Search("reddit");
            var searchResultFromFirstPage = SearchResultsPage.GetSearchTitles();

            SearchResultsPage.GoToNextSearchResultPage();
            CollectionAssert.AreNotEquivalent(searchResultFromFirstPage, SearchResultsPage.GetSearchTitles(), "Search results are the same on two pages");
        }
Exemple #3
0
 public void RecommendedSearchHasSearchString()
 {
     MainPageService.GotoBasePage();
     MainPageService.Search("GitHub");
     Assert.That(SearchResultsPage.RecommendedSearchList().All(el => el.Contains("github")), "The element without search word is exist");
 }
Exemple #4
0
 public void MatchLinkOfResult()
 {
     MainPageService.GotoBasePage();
     MainPageService.Search("linkedin");
     Assert.That(SearchResultsPage.GetSearchLinks()[0].Contains("www.linkedin.com"), "The link of result of searching string doesn't match");
 }
Exemple #5
0
 public void MachDescriptionOfResult()
 {
     MainPageService.GotoBasePage();
     MainPageService.Search("stack overflow");
     Assert.That(SearchResultsPage.GetDescriptionResultByIndex(0).Contains("Stack Overflow is the largest, most trusted online community for"), "The description of result of searching string doesn't match");
 }
Exemple #6
0
 public void SecondFailedTest()
 {
     MainPageService.GotoBasePage();
     MainPageService.Search("films 2010");
     Assert.AreEqual(SearchResultsPage.GetDescriptionByCategories("Toy Story 3"), "action");
 }
Exemple #7
0
 public void GoogleImageIsDisplayed()
 {
     MainPageService.GotoBasePage();
     Assert.That(MainPageService.GetPage().GoogleImage.Displayed(), "Google image isn't displayed or isn't found");
 }
Exemple #8
0
 public void FirstFailedTest()
 {
     MainPageService.GotoBasePage();
     MainPageService.Search("actions films");
     Assert.That(SearchResultsPage.GetNamesByDescription("2015").Count != 2, "Not enough films in category");
 }
Exemple #9
0
 public void TakeAllFilmsByDescription()
 {
     MainPageService.GotoBasePage();
     MainPageService.Search("Comedies");
     Assert.That(SearchResultsPage.GetNamesByDescription("2004").Count == 6, "Not enough films in category");
 }
Exemple #10
0
 public void SearchCategoryDisplayed()
 {
     MainPageService.GotoBasePage();
     MainPageService.Search("films 2010");
     Assert.That(SearchResultsPage.SearchCategories().All(el => el.WrappedElement.Displayed), "Search category isn't displayed");
 }
Exemple #11
0
 public void AllSearchResultsHaveDescription()
 {
     MainPageService.GotoBasePage();
     MainPageService.Search("films 2010");
     Assert.That(SearchResultsPage.SearchCategories().All(el => el.Description.Length > 0), "Any search result doesn't have a description");
 }
Exemple #12
0
 public void TheDescriptionOfSearchIsMatched()
 {
     MainPageService.GotoBasePage();
     MainPageService.Search("films 2010");
     Assert.AreEqual(SearchResultsPage.GetDescriptionByCategories("Toy Story 3"), "Comedy");
 }