Beispiel #1
0
        public void OnConnexion_ShoppingCartShouldBeEmpty()
        {
            _shoppingCartViewObject = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_SHOPPING_CART_PAGE) as ShoppingCartViewObject;

            const string EXPECTED_STRING = "Le coût total est 0 $";

            Assert.IsTrue(_shoppingCartViewObject.IsTextDisplayed(EXPECTED_STRING));
            Assert.IsTrue(_shoppingCartViewObject.IsTextDisplayed(UiText.SHOPPING_CART_PAGE_MAIN_TITLE));
        }
Beispiel #2
0
        public void InvalidCreditCard_BuyShoppingCart_ShouldDisplayAlertMessage()
        {
            const string DOG_TO_SELECT = UiText.ANY_DOG_NAME;

            _dogDetailViewObject = _dogsListViewObject.OpenDogDetailViewPage(DOG_TO_SELECT);
            _dogDetailViewObject.TapAddDogToTheShoppingCart();
            _shoppingCartViewObject = _dogDetailViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_SHOPPING_CART_PAGE) as ShoppingCartViewObject;
            const string INVALID_CREDIT_CARD = "123";

            _shoppingCartViewObject.EnterCreditCard(INVALID_CREDIT_CARD);
            _shoppingCartViewObject.TapButton(UiText.BUTTON_BUY_SHOPPING_CART);

            Assert.IsTrue(_shoppingCartViewObject.IsTextDisplayed(UiText.WARNING));
            Assert.IsTrue(_shoppingCartViewObject.IsTextDisplayed(UiText.INVALID_CONFIRMATION_CREDIT_CARD));
            Assert.IsTrue(_shoppingCartViewObject.IsTextDisplayed(UiText.OK));
        }
Beispiel #3
0
        public void DogInShoppingCart_CancelShoppingCart_ShouldReinitializeTheShoppingCart()
        {
            const string DOG_TO_SELECT = UiText.ANY_DOG_NAME;

            _dogDetailViewObject = _dogsListViewObject.OpenDogDetailViewPage(DOG_TO_SELECT);
            _dogDetailViewObject.TapAddDogToTheShoppingCart();
            _shoppingCartViewObject = _dogDetailViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_SHOPPING_CART_PAGE) as ShoppingCartViewObject;

            _dogsListViewObject     = _shoppingCartViewObject.TapCancelShoppingCart();
            _shoppingCartViewObject = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_SHOPPING_CART_PAGE) as ShoppingCartViewObject;

            const string EXPECTED_PRICE = "Le coût total est 0 $";

            Assert.IsTrue(_shoppingCartViewObject.IsTextDisplayed(EXPECTED_PRICE));
            const string NON_EXPECTED_NAME = DOG_TO_SELECT;

            Assert.IsFalse(_shoppingCartViewObject.IsTextDisplayed(NON_EXPECTED_NAME));
        }