Exemplo n.º 1
0
        public void AddToWishlistTest()
        {
            Test(() =>
            {
                var user       = UserCreator.CreateUser(_configuration);
                var wishlist   = WishlistCreator.CreateWishlist(_configuration);
                var homePage   = new HomePage(_driver);
                var phoneTitle = homePage
                                 .GoTo()
                                 .GoToLoginPage()
                                 .WriteCredentials(user)
                                 .GoToProfilePage()
                                 .GoToWishlistPage()
                                 .CreateWishlist(wishlist)
                                 .GoToHomePage()
                                 .GoToPhonesPage()
                                 .SearchProduct(wishlist.Phone)
                                 .OpenPhone()
                                 .AddToWishlist()
                                 .GoToHomePage()
                                 .GoTo()
                                 .GoToProfilePage()
                                 .GoToWishlistPage()
                                 .GetWishedPhone();

                var wishlistPage = new WishlisthPage(_driver);
                wishlistPage.RemoveWishlist();

                Assert.IsTrue(phoneTitle.Contains(wishlist.Phone));
            });
        }
Exemplo n.º 2
0
        public void RemoveWishlistTest()
        {
            Test(() =>
            {
                var user           = UserCreator.CreateUser(_configuration);
                var wishlist       = WishlistCreator.CreateWishlist(_configuration);
                var homePage       = new HomePage(_driver);
                var wishlistsCount = homePage
                                     .GoTo()
                                     .GoToLoginPage()
                                     .WriteCredentials(user)
                                     .GoToProfilePage()
                                     .GoToWishlistPage()
                                     .CreateWishlist(wishlist)
                                     .RemoveWishlist()
                                     .CountWishlists();

                Assert.Zero(wishlistsCount);
            });
        }
Exemplo n.º 3
0
        public void CreateWishlistTest()
        {
            Test(() =>
            {
                var user          = UserCreator.CreateUser(_configuration);
                var wishlist      = WishlistCreator.CreateWishlist(_configuration);
                var homePage      = new HomePage(_driver);
                var wishlistTitle = homePage
                                    .GoTo()
                                    .GoToLoginPage()
                                    .WriteCredentials(user)
                                    .GoToProfilePage()
                                    .GoToWishlistPage()
                                    .CreateWishlist(wishlist)
                                    .GetWishlistTitle();

                var wishlistPage = new WishlisthPage(_driver);
                wishlistPage.RemoveWishlist();

                Assert.IsTrue(wishlistTitle.Contains(wishlist.Title));
            });
        }