コード例 #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));
            });
        }
コード例 #2
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));
            });
        }