Exemplo n.º 1
0
        public void DataStoringBetweenLaunchesTest()
        {
            var locationName = "New York";

            var itemsPage = new ItemsPage(DriverInstance);

            Assert.IsTrue(itemsPage.IsOppened());

            var selectedItemName = itemsPage.ClickAddLocationButton()
                                   .SetValueToSearch(locationName).ClickSearchButton()
                                   .SelectFirstLocationNameItem();

            Assert.IsTrue(itemsPage.IsOppened());

            var resultList = itemsPage.WaitForValueAddedInList(selectedItemName, 5).GetLocationsList();

            Assert.IsTrue(resultList.Contains(selectedItemName));

            DriverInstance.CloseApp();
            DriverInstance.Quit();

            SetupSession();

            var reloadedItemsPage = new ItemsPage(DriverInstance);

            Assert.IsTrue(reloadedItemsPage.IsOppened());

            resultList = reloadedItemsPage.WaitForValueAddedInList(selectedItemName, 5).GetLocationsList();
            Assert.IsTrue(resultList.Contains(selectedItemName));
            reloadedItemsPage.SelectLocationInList(selectedItemName).ClickDeleteLocationButton();
        }
Exemplo n.º 2
0
        public void AddAndDeleteLoactionTest()
        {
            var cityName = "New York";

            var itemsPage = new ItemsPage(DriverInstance);

            Assert.IsTrue(itemsPage.IsOppened());

            var selectedItemName = itemsPage.ClickAddLocationButton()
                                   .SetValueToSearch(cityName).ClickSearchButton()
                                   .SelectFirstLocationNameItem();

            Assert.IsTrue(itemsPage.IsOppened());

            var resultList = itemsPage.WaitForValueAddedInList(selectedItemName, 5).GetLocationsList();

            Assert.IsTrue(resultList.Contains(selectedItemName));

            itemsPage.SelectLocationInList(selectedItemName).ClickDeleteLocationButton();
            resultList = itemsPage.GetLocationsList();
            Assert.IsFalse(resultList.Contains(selectedItemName));
        }
Exemplo n.º 3
0
        public void SearchLoactionByLocationNameTest()
        {
            var cityName = "New York";

            var itemsPage = new ItemsPage(DriverInstance);

            Assert.IsTrue(itemsPage.IsOppened());

            var firstItem = itemsPage.ClickAddLocationButton()
                            .SetValueToSearch(cityName).ClickSearchButton()
                            .GetSearchResultLocationNames().First();

            Assert.AreEqual(cityName, firstItem);
        }
Exemplo n.º 4
0
        public void SearchLoactionByPostalCodeTest()
        {
            var postalCode = "16801";

            var itemsPage = new ItemsPage(DriverInstance);

            Assert.IsTrue(itemsPage.IsOppened());

            var firstItem = itemsPage.ClickAddLocationButton()
                            .SetValueToSearch(postalCode).ClickSearchButton()
                            .GetSearchResultPostalCodes().First();

            Assert.AreEqual(postalCode, firstItem);
        }