Esempio n. 1
0
        public void CancelEstimation()
        {
            var button = PlanningPokerDeskElement.FindElement(By.CssSelector("div.actionsBar a"));

            Assert.AreEqual("Cancel estimation", button.Text);
            button.Click();
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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());
        }
Esempio n. 4
0
        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());
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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"));
        }
Esempio n. 7
0
        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);
            }
        }
Esempio n. 8
0
        public void AssertNotAvailableEstimations()
        {
            var availableEstimationElements = PlanningPokerDeskElement.FindElements(By.CssSelector("div.availableEstimations"));

            Assert.AreEqual(0, availableEstimationElements.Count);
        }
Esempio n. 9
0
        public void SelectEstimation(int index)
        {
            var availableEstimationElements = PlanningPokerDeskElement.FindElements(By.CssSelector("div.availableEstimations ul li a"));

            availableEstimationElements[index].Click();
        }