private void AssertCanSetBrand(IRegisteredUser member, VerticalTestData data) { // Login and go to the visibility page. LogIn(member); GetPage <VisibilitySettingsBasic>(); // The style atribute is set on the containing div so the control will always be "visible", ie contained within the page. Assert.AreEqual(_communityCheckBox.IsVisible, member.AffiliateId != null); if (member.AffiliateId != null) { // Should be able to see the community controls. AssertPageContains("You joined through " + data.Name); AssertPageContains(new ApplicationUrl(data.CandidateImageUrl).PathAndQuery); } else { AssertPageDoesNotContain(data.Name); AssertPageDoesNotContain(new ApplicationUrl(data.CandidateImageUrl).PathAndQuery); } // Log out. LogOut(); }
private void AssertBrand(VerticalTestData data, bool expectBrand) { // Look for the header if appropriate. var imageUrl = new ApplicationUrl(data.CandidateImageUrl); if (expectBrand) { AssertPageContains(imageUrl.FileName); } else { AssertPageDoesNotContain(imageUrl.FileName); } }
private void Search(Community community, VerticalTestData data, bool isDeleted) { // Search. var searchUrl = _searchUrl.AsNonReadOnly(); searchUrl.QueryString["JobTitle"] = BusinessAnalyst; searchUrl.QueryString["CommunityId"] = community.Id.ToString(); Get(searchUrl); // Assert that the member is returned. AssertPageContains("Results <span class=\"start\">1</span> - <span class=\"end\">1</span> of <span class=\"total\">1</span>"); AssertCandidateLogo(data, isDeleted); }
private void AssertBrand(IRegisteredUser member, VerticalTestData memberCommunityTestData, VerticalTestData communityData, bool showCommunity) { // Look for the brand if appropriate. if (member.AffiliateId != null && showCommunity) { var imageUrl = new ReadOnlyApplicationUrl(memberCommunityTestData.CandidateImageUrl); AssertPageContains(imageUrl.FileName); } else { var imageUrl = new ReadOnlyApplicationUrl(communityData.CandidateImageUrl); AssertPageDoesNotContain(imageUrl.FileName); } }
private void AssertDefaultAndProfilePages(VerticalTestData data) { if (data == null || !data.RequiresExternalLogin) { Get(HomeUrl); AssertHeader(data == null ? null : data.HeaderSnippet); AssertFavicon(data == null ? null : data.ImageRootFolder, data == null ? null : data.FaviconRelativePath); AssertHomePageTitle(data == null ? null : data.HomePageTitle); GetPage <Friends>(); AssertHeader(data == null ? null : data.HeaderSnippet); AssertFavicon(data == null ? null : data.ImageRootFolder, data == null ? null : data.FaviconRelativePath); Get(_profileUrl); AssertHeader(data == null ? null : data.HeaderSnippet); AssertFavicon(data == null ? null : data.ImageRootFolder, data == null ? null : data.FaviconRelativePath); } }
private void AssertCandidateLogo(VerticalTestData data, bool isDeleted) { // If there is a logo look for it. if (!string.IsNullOrEmpty(data.CandidateImageUrl)) { var url = new ApplicationUrl(data.CandidateImageUrl); if (!isDeleted) { AssertPageContains(url.Path); } else { AssertPageDoesNotContain(url.Path); } } }
private void AssertSearch(VerticalTestData data, bool expectBrand) { // Make sure non remnent of association with the community is present for the search. Browser.Cookies = new CookieContainer(); // Search. var searchUrl = _searchUrl.AsNonReadOnly(); searchUrl.QueryString["JobTitle"] = "business analyst"; Get(searchUrl); // Assert that the member is returned. AssertPageContains("Results <span class=\"start\">1</span> - <span class=\"end\">1</span> of <span class=\"total\">1</span>"); AssertBrand(data, expectBrand); }
private void AssertJobApplicant(ICommunicationRecipient member, IUser employer, VerticalTestData data, bool isDeleted, Guid jobAdId) { // Log in as employer. LogIn(employer); Get(new ReadOnlyUrl(string.Format("{0}/{1}", _manageCandidatesUrl, jobAdId))); AssertPageContains("<span>New (<span class=\"count new-candidates-count\">1</span>)</span>"); AssertPageContains(member.FullName); AssertCandidateLogo(data, isDeleted); }
private ReadOnlyUrl GetCommunityHomeUrl(VerticalTestData data, Community community) { return(string.IsNullOrEmpty(data.Host) || IsTestCommunityDeleted ? HomeUrl : GetCommunityUrl(community, "")); }