Ejemplo n.º 1
0
        public void MarkMultipleListItems()
        {
            // Arrange
            // Situation to create: there are 10 list items on the to do list
            HomePage.Navigate();
            HomePage.AddListItem("8th list item");
            HomePage.AddListItem("9th list item");
            HomePage.AddListItem("10th list item");

            // Act
            HomePage.MarkListItem(0);
            HomePage.MarkListItem(9);
            HomePage.MarkListItem(6);
            HomePage.MarkListItem(1);
            HomePage.MarkListItem(4);
            var actualListOfDoneListItems = HomePage.GetAllDoneListItems();

            string[] expectedListOfDoneListItems = new string[]
            {
                "Drag the list, Example template, over this lists title above.",
                "All changes are saved locally, automatically.",
                "All done. Tick all the items off then hit the trash icon below.",
                "10th list item",
                "Howdy. Let's get you up and running."
            };

            // Assert
            Assert.Equal(expectedListOfDoneListItems, actualListOfDoneListItems);
        }
Ejemplo n.º 2
0
        public void AddOneItemToTheList()
        {
            // Arrange
            HomePage.Navigate();
            HomePage.RemoveAllListItems();

            // Act
            HomePage.AddListItem("Start testing");
            var actualList = HomePage.GetAllActiveListItems();

            string[] expectedList = new string[]
            {
                "Start testing"
            };

            // Assert
            Assert.Equal(expectedList, actualList);
        }
Ejemplo n.º 3
0
        public void DoneProgressBarShowsFiftyPercentDone()
        {
            // Arrange
            // Situation to create: there are 10 list items on the to do list
            HomePage.Navigate();
            HomePage.AddListItem("8th list item");
            HomePage.AddListItem("9th list item");
            HomePage.AddListItem("10th list item");

            // Act
            HomePage.MarkListItem(0);
            HomePage.MarkListItem(1);
            HomePage.MarkListItem(2);
            HomePage.MarkListItem(3);
            HomePage.MarkListItem(4);
            string actualString = HomePage.GetDoneProgressBarPercentage();
            string expectedDoneProgressBarPercentage = "50%";

            // Assert
            Assert.Contains(expectedDoneProgressBarPercentage, actualString);
        }