public ECommerce(Traffic traffic, LandingPage landingPage, SalesPage salesPage, UpSell upSell) { (Traffic, LandingPage, SalesPage, UpSell) = (traffic, landingPage, salesPage, upSell); double actions = Traffic.Amount * LandingPage.CTR * SalesPage.CR; Costs = new Number { Name = "Total Costs", Total = Traffic.TotalCost + (actions * SalesPage.Cost) + (actions * UpSell.CR * UpSell.Cost) }; Profits = new Number { Name = "Total Profits", Total = (actions * SalesPage.Price) + (actions * UpSell.CR * UpSell.Price) }; Balance = new Number { Name = "Balance", Total = Profits.Total - Costs.Total }; }
public SalesPage clickOnGoToSalesLink() { goToSalesLink.Click(); var _SalesPage = new SalesPage(this.driver); PageFactory.InitElements(driver, _SalesPage); return(_SalesPage); }
public IEnumerable <ProductTileViewModel> SearchOnSale(SalesPage currentContent, out List <int> pages, int catalogId = 0, int page = 1, int pageSize = 12) { var market = _currentMarket.GetCurrentMarket(); var currency = _currencyService.GetCurrentCurrency(); var query = BaseInlcusionExclusionQuery(currentContent, catalogId); query = query.Filter(x => (x as GenericProduct).OnSale.Match(true)); var result = query.GetContentResult(); var searchProducts = CreateProductViewModels(result, currentContent, "").ToList(); GetManaualInclusion(searchProducts, currentContent as SalesPage, market, currency); pages = GetPages(currentContent, page, searchProducts.Count()); return(searchProducts); }
public void GivenIHaveCreatedANewRepeatingInvoice() { WebBrowser.Current.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(10)); WebBrowser.Current.Navigate().GoToUrl("https://login.xero.com/"); driver = WebBrowser.Current; loginPage = new LoginPage(driver); PageFactory.InitElements(driver, loginPage); loginPage.SetEmail("*****@*****.**"); loginPage.SetPassword("123Xero1"); DashBoardPage dashBoard = loginPage.ClickSave(); dashBoard = dashBoard.topToolBar.clickDashboard(); SalesPage salesPage = dashBoard.clickOnGoToSalesLink(); invoicePage = salesPage.clickOnRepeating(); nrOfInvoices = invoicePage.nrOfInvoices(); newRepeatingInvoicePage = invoicePage.clickNewRepeatingInvoice(); }
public CashOnDelivery(Traffic traffic, LandingPage landingPage, SalesPage salesPage, UpSell upSell, CallCenter callCenter, Shipping shipping) : base(traffic, landingPage, salesPage, upSell) { (CallCenter, Shipping) = (callCenter, shipping); double actions = Traffic.Amount * LandingPage.CTR * CallCenter.CR; Costs = new Number { Name = "Total Costs", Total = Traffic.TotalCost + (actions * SalesPage.CR * SalesPage.Cost) + (actions * UpSell.CR * UpSell.Cost) + (actions * Shipping.Cost) + (Traffic.Amount * LandingPage.CTR * CallCenter.Cost) }; Profits = new Number { Name = "Total Profits", Total = ( (Traffic.Amount * LandingPage.CTR * CallCenter.CR * SalesPage.TotalProfitPerAction * SalesPage.TotalProfitPerAction) + (Traffic.Amount * LandingPage.CTR * CallCenter.CR * UpSell.TotalProfitPerAction * UpSell.TotalProfitPerAction) ) * Shipping.Deliverability }; Balance = new Number { Name = "Balance", Total = Profits.Total - Costs.Total }; }
public App() { InitializeComponent(); MainPage = new SalesPage(); }
public void WhenIkNaarDeSalespaginaNavigeer() { _salesPage = Browser.GotoSalesPage(); }
public void ThenDoorverwezenNaarDeSalespagina() { _salesPage = Browser.GotoSalesPage(); Assert.AreEqual(_salesPage.GetPageUrl(), Browser.Url); }