Пример #1
0
        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
            };
        }
Пример #2
0
        public SalesPage clickOnGoToSalesLink()
        {
            goToSalesLink.Click();
            var _SalesPage = new SalesPage(this.driver);

            PageFactory.InitElements(driver, _SalesPage);
            return(_SalesPage);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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();
        }
Пример #5
0
        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
            };
        }
Пример #6
0
        public App()
        {
            InitializeComponent();

            MainPage = new SalesPage();
        }
Пример #7
0
 public void WhenIkNaarDeSalespaginaNavigeer()
 {
     _salesPage = Browser.GotoSalesPage();
 }
Пример #8
0
 public void ThenDoorverwezenNaarDeSalespagina()
 {
     _salesPage = Browser.GotoSalesPage();
     Assert.AreEqual(_salesPage.GetPageUrl(), Browser.Url);
 }