public void CancelEstimation() { var button = PlanningPokerDeskElement.FindElement(By.CssSelector("div.actionsBar a")); Assert.AreEqual("Cancel estimation", button.Text); button.Click(); }
public void SelectEstimation(string estimation) { int index = Array.IndexOf <string>(_availableEstimations, estimation); var availableEstimationElements = PlanningPokerDeskElement.FindElements(By.CssSelector("div.availableEstimations ul li a")); availableEstimationElements[index].Click(); }
public void AssertAvailableEstimations() { var availableEstimationElements = PlanningPokerDeskElement.FindElements(By.CssSelector("div.availableEstimations ul li a")); Assert.AreEqual(13, availableEstimationElements.Count); CollectionAssert.AreEqual(_availableEstimations, availableEstimationElements.Select(e => e.Text).ToList()); }
public void AssertAvailableEstimations(ICollection <string> estimations = null) { var availableEstimationElements = PlanningPokerDeskElement.FindElements(By.CssSelector("div.availableEstimations ul li a")); var expectedEstimations = estimations?.ToArray() ?? _availableEstimations; Assert.AreEqual(expectedEstimations.Length, availableEstimationElements.Count); CollectionAssert.AreEqual(expectedEstimations, availableEstimationElements.Select(e => e.Text).ToList()); }
public void AssertTeamName(string team, string member) { var teamNameHeader = PlanningPokerDeskElement.FindElement(By.CssSelector("div.team-title h2")); Assert.AreEqual(team, teamNameHeader.Text); var userHeader = PlanningPokerDeskElement.FindElement(By.CssSelector("div.team-title h3")); Assert.AreEqual(member, userHeader.Text); }
public void StartEstimation() { var button = PlanningPokerDeskElement.FindElement(By.CssSelector("div.actionsBar a")); Assert.AreEqual("Start estimation", button.Text); button.Click(); PlanningPokerDeskElement.FindElement(By.CssSelector("div.availableEstimations")); }
public void AssertSelectedEstimation(params KeyValuePair <string, string>[] estimations) { var estimationResultElements = PlanningPokerDeskElement.FindElements(By.CssSelector("div.estimationResult ul li")); Assert.AreEqual(estimations.Length, estimationResultElements.Count); for (int i = 0; i < estimations.Length; i++) { var estimation = estimations[i]; var estimationResultElement = estimationResultElements[i]; var valueElement = estimationResultElement.FindElement(By.XPath("./span[1]")); var nameElement = estimationResultElement.FindElement(By.XPath("./span[2]")); Assert.AreEqual(estimation.Key, nameElement.Text); Assert.AreEqual(estimation.Value, valueElement.Text); } }
public void AssertNotAvailableEstimations() { var availableEstimationElements = PlanningPokerDeskElement.FindElements(By.CssSelector("div.availableEstimations")); Assert.AreEqual(0, availableEstimationElements.Count); }
public void SelectEstimation(int index) { var availableEstimationElements = PlanningPokerDeskElement.FindElements(By.CssSelector("div.availableEstimations ul li a")); availableEstimationElements[index].Click(); }