public void SearchModeKeywordBasicVisibilityTest() { var categories = new categories(); var searchViewModel = Mediator.Index(null, ApprenticeshipSearchMode.Keyword, false).ViewModel; var view = categories.RenderAsHtml(searchViewModel); view.GetElementbyId("categories").Attributes["class"].Value.Contains(" active").Should().BeFalse(); }
public void SearchModeCategoryBasicVisibilityTest() { var categories = new categories(); var searchViewModel = Mediator.Index(ApprenticeshipSearchMode.Category).ViewModel; var view = categories.RenderAsHtml(searchViewModel); view.GetElementbyId("categories").Attributes["class"].Value.Contains(" active").Should().BeTrue(); view.GetElementbyId("category-load-failed").Should().BeNull(); }
public void CategorySelected() { var categories = new categories(); var searchViewModel = Mediator.Index(null, ApprenticeshipSearchMode.Category, false).ViewModel; searchViewModel.Category = "3"; var view = categories.RenderAsHtml(searchViewModel); view.GetElementbyId("category-" + searchViewModel.Category.ToLower()).Should().NotBeNull(); }
public void SearchModeCategoryNullCategoriesVisibilityTest() { ReferenceDataService.Setup(rds => rds.GetCategories()); var categories = new categories(); var searchViewModel = Mediator.Index(null, ApprenticeshipSearchMode.Category, false).ViewModel; var view = categories.RenderAsHtml(searchViewModel); view.GetElementbyId("category-load-failed").Should().NotBeNull(); }
public void CategoryListPopulation() { var categories = new categories(); var searchViewModel = Mediator.Index(null, ApprenticeshipSearchMode.Category, false).ViewModel; var view = categories.RenderAsHtml(searchViewModel); var categoryListLeft = view.GetElementbyId("category-list-left"); categoryListLeft.Should().NotBeNull(); categoryListLeft.ChildNodes.Count(n => n.Name == "li").Should().Be(2); var categoryListRight = view.GetElementbyId("category-list-right"); categoryListRight.Should().NotBeNull(); categoryListRight.ChildNodes.Count(n => n.Name == "li").Should().Be(1); }