public static string GetPracticeDetailsHashParametersString() { var parameters = new HashParameters(); parameters.AddAreaCode(AreaCodes.GpPracticeThatchedHouseMedicalCentre); parameters.AddParentAreaCode(AreaCodes.CcgWalthamForest); parameters.AddParentAreaTypeId(AreaTypeIds.CCG); parameters.AddAreaTypeId(AreaTypeIds.CCG); return parameters.HashParameterString; }
public void TestIndicatorAndSexAndAgeCanBeBookmarked() { var parameters = new HashParameters(); parameters.AddAreaTypeId(AreaTypeIds.CountyAndUnitaryAuthority); parameters.AddIndicatorId(IndicatorIds.GapInLifeExpectancyAtBirth); parameters.AddSexId(SexIds.Female); parameters.AddAgeId(AgeIds.AllAges); parameters.AddTabId(TabIds.BarChart); navigateTo.GoToUrl(UrlKey + parameters.HashParameterString); waitFor.FingertipsBarChartTableToLoad(); // Check area menu contains searched for area var text = driver.FindElement(By.Id("indicatorDetailsHeader")).Text; TestHelper.AssertTextContains(text, "gap in life expectancy at birth"); TestHelper.AssertTextContains(text, "(Female)"); }
public void TestPdfsNotAvailableMessageIsDisplayedForDistrictUa() { // Navigate to PHOF data page for district & UA var parameters = new HashParameters(); parameters.AddAreaTypeId(AreaTypeIds.DistrictAndUnitaryAuthority); navigateTo.GoToUrl(UrlKey + parameters.HashParameterString); waitFor.FingertipsTartanRugToLoad(); // Select download tab FingertipsHelper.SelectFingertipsTab(driver, FingertipsIds.TabDownload); waitFor.ExpectedElementToBeVisible(By.Id("pdf-download-text")); // Assert no PDF message is displayed var text = driver.FindElement(By.Id("pdf-download-text")).Text; TestHelper.AssertTextContains(text, "PDF profiles are not currently available for District & UA"); }
public void TestAreaCodeCanBeBookmarked() { var parameters = new HashParameters(); parameters.AddAreaCode(AreaCodes.Hartlepool); parameters.AddAreaTypeId(AreaTypeIds.CountyAndUnitaryAuthority); navigateTo.GoToUrl(UrlKey + parameters.HashParameterString); waitFor.FingertipsTartanRugToLoad(); // Check area menu contains searched for area Assert.AreEqual("Hartlepool", FingertipsHelper.GetSelectedAreaNameFromMenu(driver)); }
public void TestChangingAreaTypeRepopulatesButRetainsSelectedSupportingIndicator() { var parameters = new HashParameters(); parameters.AddAreaTypeId(AreaTypeIds.CountyAndUnitaryAuthority); parameters.AddIndicatorId(IndicatorIds.GapInLifeExpectancyAtBirth); parameters.AddSexId(SexIds.Persons); parameters.AddAgeId(AgeIds.AllAges); parameters.AddTabId(TabIds.ScatterPlot); navigateTo.GoToUrl(UrlKey + parameters.HashParameterString); waitFor.FingertipsScatterPlotChartToLoad(); var countyUaAreaCount = driver.FindElements(By.CssSelector("#supportingIndicators option")); //Set supporting indicator driver.FindElement(By.CssSelector("div.chosen-container a.chosen-single")).Click(); var searchText = driver.FindElement(By.CssSelector("div.chosen-search input")); searchText.SendKeys("pupil absence"); searchText.SendKeys(Keys.Return); //Change the area type from CountyUa to District var areaTypeDropdown = driver.FindElement(By.Id("areaTypes")); SelectElement clickThis = new SelectElement(areaTypeDropdown); clickThis.SelectByText("District & UA"); waitFor.FingertipsScatterPlotChartToLoad(); var distictUaAreaCount = driver.FindElements(By.CssSelector("#supportingIndicators option")); var selectedSupportinIndicator = driver.FindElement(By.CssSelector("div.chosen-container a.chosen-single span")); Assert.AreNotEqual(countyUaAreaCount, distictUaAreaCount); TestHelper.AssertTextContains(selectedSupportinIndicator.Text, "Pupil absence"); }