public void InitiatePages() { changePasswordPage = new ChangePasswordPage(driver); itemInfoPage = new ItemInfoPage(driver); landingPage = new LandingPage(driver); tacticalBootsPage = new TacticalBootsPage(driver); wishListPage = new WishListPage(driver); }
public void SearchInvalidWishList() { HomePage myHomePage = new HomePage(Driver); WishListPage myWishListPage = new WishListPage(Driver); myHomePage.GoToWishListPage(); myWishListPage.SearchForWishList("euijgerugherhgkfwi914u8"); Assert.IsTrue(myWishListPage.NoWishListFoundText.Displayed); }
public void ClearWishList() { TopBar navBar = new TopBar(); WishListPage wishList = navBar.WishListButtonClick(); while (!wishList.IsEmpty()) { wishList.GetProduct().ClickRemoveFromWishListButton(); } }
public void CheckPriceIsInCorrectCurrencyFormat(Currency currency, string puttern) { homePage = homePage.ChooseCurrency(currency); homePage.ClickWishList(); WishListPage wishListPage = homePage.GotoWishListPage(); WishListComponent iPhone = wishListPage.GetWishListComponentsContainer().GetWishListComponentByName(ProductRepository.GetIPhone().GetName()); string actualResult = iPhone.GetWishListComponentUnitPriceText(); Console.WriteLine(actualResult); StringAssert.IsMatch(puttern, actualResult); }
public void CheckChangeProductPriceCurrencyInWishList(string productName) { //Act cm.AddProductToWishList(productName); WishListPage wishList = cm.GoToWishList(); cm.ChooseEuro(); string actualResult = cm.GetCurrencyFromWishList(wishList); string expectedResult = cm.CurrentCurrencyFromMain; //Assert Assert.AreEqual(expectedResult, actualResult); }
//[Test, TestCaseSource(nameof(ProductToAdd))] public void CheckAdding(Product addingProduct) { HomePage homePage = LoadApplication(); homePage.GotoLoginPage().LoggingIn("*****@*****.**", "TESTER_PASWORD").GotoHomePage(); ProductsContainerComponent productsContainerComponent = homePage.getProductComponentsContainer(); ProductComponent productComponent = productsContainerComponent.GetProductComponentByName(addingProduct.Title); productComponent.ClickAddToWishButton(); WishListPage wishListPage = homePage.GotoWishListPage(); Assert.IsTrue(wishListPage.getWishListComponentsContainer().GetWishListComponentByName(addingProduct.Title) .GetWishListComponentProductNameText().Contains(productComponent.Name.Text)); }
public string GetCurrencyFromWishList(WishListPage wishListPage) { WishListTableItem product = wishListPage.GetProduct(); string productPrice = product.GetProductPrice(); string cleanProductPrice = productPrice.Trim(); if (CurrentCurrencyFromMain == "€") { return(cleanProductPrice[cleanProductPrice.Length - 1].ToString()); } else { return(cleanProductPrice[0].ToString()); } }
public void ChekingWishList() { homePage = new HomePage(driver); productPage = new ProductPage(driver); basePage = new BasePage(driver); wishListPage = new WishListPage(driver); homePage.SwitchToHomePageByUrl(); homePage.SelectCity(); homePage.SearchProductByText("311722"); productPage.LogIn(); productPage.AddProductToWishList(); productPage.SearchProductByText("250346"); productPage.AddProductToWishList(); productPage.SwitchToWishListPageByMenuButton(); //wishListPage.CheckProductsAreInWishList(); wishListPage.ClearWishList(); wishListPage.LogOut(); }
public void CheckAdding(Product addingProduct, IUser user) { HomePage homePage = LoadApplication() .GotoLoginPage() .LoggingIn(user.Email, user.Password) .GotoHomePage(); Thread.Sleep(2000); //for presentation only homePage.getProductComponentsContainer() .GetProductComponentByName(addingProduct.Title) .AddItemToWishList(); Thread.Sleep(2000); //for presentation only wishListPage = homePage .GotoWishListPage(); Thread.Sleep(2000); //for presentation only Assert.IsTrue(wishListPage .GetWishListComponentsContainer() .GetWishListComponentNames() .Contains(addingProduct.Title)); }
public virtual WishListViewModel CreateWishListViewModel(ICart cart, WishListPage wishListPage) { if (cart == null) { return new WishListViewModel(wishListPage) { ItemCount = 0, CartItems = Array.Empty<CartItemViewModel>(), Total = new Money(0, _currencyService.GetCurrentCurrency()) }; } var contact = PrincipalInfo.CurrentPrincipal.GetCustomerContact(); return new WishListViewModel(wishListPage) { ItemCount = GetLineItemsTotalQuantity(cart), CartItems = _shipmentViewModelFactory.CreateShipmentsViewModel(cart).SelectMany(x => x.CartItems), Total = _orderGroupCalculator.GetSubTotal(cart), HasOrganization = contact?.OwnerId != null }; }
public void ThenPaintShouldBeAddedInWishListPage() { WishListPage mypage = new WishListPage(); mypage.VerifyWIshListItem(); }
public WishListPageBL(IWebDriver webDriver) : base(webDriver) { wishListPage = new WishListPage(webDriver); }