public void DogInShoppingCart_CancelShoppingCart_ShouldNavigateToDogsListPage() { _shoppingCartViewObject = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_SHOPPING_CART_PAGE) as ShoppingCartViewObject; _dogsListViewObject = _shoppingCartViewObject.TapCancelShoppingCart(); Assert.IsTrue(_dogsListViewObject.IsTextDisplayed(UiText.DOGS_LIST_PAGE_MAIN_TITLE)); Assert.IsTrue(_dogsListViewObject.IsTextDisplayed(UiText.DOGS_LIST_PAGE_MAIN_LABEL)); }
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)); }