public void PurchaseItem(string itemUrl, string itemPrice, ClientLoginInfo clientLoginInfo, ClientPurchaseInfo clientPurchaseInfo)
        {
            _itemPage.Navigate(itemUrl);
            _itemPage.ClickBuyNowButton();
            _previewShoppingCartPage.ClickProceedToCheckoutButton();
            _signInPage.Login(clientLoginInfo.Email, clientLoginInfo.Password);
            _shippingAddressPage.FillShippingInfo(clientPurchaseInfo);
            _shippingAddressPage.ClickDifferentBillingCheckBox(clientPurchaseInfo);
            _shippingAddressPage.ClickContinueButton();
            _shippingPaymentPage.ClickBottomContinueButton();
            _shippingAddressPage.FillBillingInfo(clientPurchaseInfo);
            _shippingAddressPage.ClickContinueButton();
            _shippingPaymentPage.ClickTopContinueButton();
            double couponDiscount = 0;

            if (_purchasePromotionalCodeStrategy != null)
            {
                _purchasePromotionalCodeStrategy.AssertPromotionalCodeDiscount();
                couponDiscount = _purchasePromotionalCodeStrategy.GetPromotionalCodeDiscountAmount();
            }
            var totalPrice = double.Parse(itemPrice);

            _placeOrderPage.AssertOrderTotalPrice(totalPrice, couponDiscount);
            // Some other actions...
            if (_purchasePromotionalCodeStrategy != null)
            {
                _purchasePromotionalCodeStrategy.AssertPromotionalCodeDiscount();
            }
        }
        public void PurchaseItem(
            string itemUrl,
            string itemPrice,
            ClientLoginInfo clientLoginInfo,
            ClientPurchaseInfo clientPurchaseInfo)
        {
            _itemPage.Navigate(itemUrl);
            _itemPage.ClickBuyNowButton();
            _previewShoppingCartPage.ClickProceedToCheckoutButton();
            _signInPage.Login(clientLoginInfo.Email, clientLoginInfo.Password);
            _shippingAddressPage.FillShippingInfo(clientPurchaseInfo);
            _shippingAddressPage.ClickDifferentBillingCheckBox(clientPurchaseInfo);
            _shippingAddressPage.ClickContinueButton();
            _shippingPaymentPage.ClickBottomContinueButton();
            _shippingAddressPage.FillBillingInfo(clientPurchaseInfo);
            _shippingAddressPage.ClickContinueButton();
            _shippingPaymentPage.ClickTopContinueButton();
            var totalPrice = double.Parse(itemPrice);

            _placeOrderPage.AssertOrderTotalPrice(totalPrice);
        }
        protected override void Assert()
        {
            var totalPrice = double.Parse(_itemPrice);

            _placeOrderPage.AssertOrderTotalPrice(totalPrice);
        }
Пример #4
0
        public override void PerformAct()
        {
            var totalPrice = double.Parse(PurchaseTestContext.ItemPrice);

            _placeOrderPage.AssertOrderTotalPrice(totalPrice);
        }