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 HealthCheckHeadlineIndicatorIslesOfScillyNoDataTest() { var parameters = new HashParameters(); parameters.AddAreaCode(AreaCodes.IslesOfScilly); parameters.AddParentAreaCode(AreaCodes.England); LoadHealthChecksAreaDetailsPage(driver, parameters.HashParameterString); var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(d => d.FindElement(By.Id("main_ranking"))); Assert.IsTrue(driver.FindElement(By.Id("main_ranking")).GetAttribute("class").Contains("no-data")); }
public static void LoadMortalityAreaDetailsForNorthumberlandPage( IWebDriver driver) { var parameters = new HashParameters(); parameters.AddAreaCode(AreaCodes.Northumberland); parameters.AddParentAreaCode(AreaCodes.England); driver.Navigate().GoToUrl(AppConfig.Instance.BridgeWsUrl + "topic/mortality/area-details" + parameters.HashParameterString); // ImplicitlyWait for the area filter to render new WaitFor(driver).MortalityAreaDetailRankingToLoad(); }
public void HealthChecksValidDataForAreaTest() { var parameters = new HashParameters(); parameters.AddAreaCode(AreaCodes.Croydon); parameters.AddParentAreaCode(AreaCodes.England); LoadHealthChecksAreaDetailsPage(driver, parameters.HashParameterString); // ImplicitlyWait for the area filter to render var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(d => d.FindElement(By.Id("main_ranking"))); Assert.IsFalse(driver.FindElement(By.Id("main_ranking")).Text.Contains("NO DATA")); }
public void HealthChecksValidValueUnitTest() { var parameters = new HashParameters(); parameters.AddAreaCode(AreaCodes.Croydon); parameters.AddParentAreaCode(AreaCodes.England); LoadHealthChecksAreaDetailsPage(driver, parameters.HashParameterString); // ImplicitlyWait for the area filter to render var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(d => d.FindElement(By.Id("main_ranking"))); IList<IWebElement> percentSigns = driver.FindElements(By.CssSelector(".unit.arial")); Assert.IsTrue(percentSigns.Count > 0); }
public void DrugsAndAlcoholHeaderTest() { var parameters = new HashParameters(); parameters.AddAreaCode(AreaCodes.Croydon); parameters.AddParentAreaCode(AreaCodes.England); LoadDrugsAndAlcoholAreaDetailsPage(driver, parameters.HashParameterString); var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(d => d.FindElement(By.Id("data_page_table"))); Assert.IsTrue(driver.FindElement(By.Id("data_page_header")).Text.Contains("Croydon")); }
public void DrugsAndAlcoholIslesOfScillyNoDataTest() { var parameters = new HashParameters(); parameters.AddAreaCode(AreaCodes.IslesOfScilly); parameters.AddParentAreaCode(AreaCodes.England); LoadDrugsAndAlcoholAreaDetailsPage(driver, parameters.HashParameterString); var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(d => d.FindElement(By.Id("data_page_table"))); var rankingTableElements = driver.FindElements(By.Id("a_row")); foreach (var webElement in rankingTableElements) { Assert.AreEqual("none", webElement.GetAttribute("class")); Assert.AreEqual(string.Empty, webElement.FindElement(By.ClassName("drugs-n-alcohol")).Text); } }
public void DrugsAndAlcoholAreaRankingTableNameTest() { var parameters = new HashParameters(); parameters.AddAreaCode(AreaCodes.Croydon); parameters.AddParentAreaCode(AreaCodes.England); LoadDrugsAndAlcoholAreaDetailsPage(driver, parameters.HashParameterString); var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(d => d.FindElement(By.Id("data_page_table"))); Assert.AreEqual("Drugs and Alcohol", driver.FindElement(By.XPath(XPaths.DrugsAndAlcoholAreaRankingsTableName)).Text); }