public void UserHasOneDog_WhenNavigatedToDogShopPage_DogInformationsShouldBeDisplayed()
        {
            _dogShopViewObject = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_DOG_SHOP_PAGE) as DogShopViewObject;

            Assert.IsTrue(_mainPageViewObject.IsTextDisplayed(UiText.ANY_DOG_NAME));
            Assert.IsTrue(_mainPageViewObject.IsTextDisplayed(UiText.ANY_DOG_DESCRIPTION));
            Assert.IsTrue(_mainPageViewObject.IsTextDisplayed(UiText.ANY_DOG_RACE));
        }
        public void UserHasOneDog_SaveChangesButton_ShouldDisplayAlertMessage()
        {
            _dogShopViewObject = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_DOG_SHOP_PAGE) as DogShopViewObject;

            _dogShopViewObject.TapButton(UiText.BUTTON_SAVE_CHANGES);

            Assert.IsTrue(_dogShopViewObject.IsTextDisplayed(UiText.SUCCESS));
            Assert.IsTrue(_dogShopViewObject.IsTextDisplayed(UiText.DOG_INFO_MODIFIED));
        }
예제 #3
0
        public void OnAddNewDogPage_TitleIsDisplayed()
        {
            _dogsListViewObject = _mainPageViewObject.UserHasNoDogSignIn();
            _dogShopViewObject  = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_DOG_SHOP_PAGE) as DogShopViewObject;
            _dogShopViewObject.TapButton(UiText.CONFIRM);

            _addNewDogViewObject = _dogShopViewObject.OpenAddNewDogPage();

            Assert.IsTrue(_addNewDogViewObject.IsTextDisplayed(UiText.ADD_NEW_DOG_PAGE_MAIN_TITLE));
        }
        public void UserHasNoDog_WhenNavigatedToDogShopPage_ButtonAddNewDogAndMessageAlertShoulBeDisplayed()
        {
            UserProfileViewObject userProfileViewObject = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_USER_PROFIL_PAGE) as UserProfileViewObject;

            _dogsListViewObject = userProfileViewObject.TapDeleteDogShop();

            _dogShopViewObject = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_DOG_SHOP_PAGE) as DogShopViewObject;

            Assert.IsTrue(_dogShopViewObject.IsTextDisplayed(UiText.WARNING));
            Assert.IsTrue(_dogShopViewObject.IsTextDisplayed(UiText.NO_CURRENT_DOG));
            Assert.IsTrue(_dogShopViewObject.IsTextDisplayed(UiText.BUTTON_ADD_NEW_DOG));
        }
        public void DeleteMyDog_ShouldRemoveMyDogFromDogShopPageAndDisplayAddNewDogButton()
        {
            _userProfileViewObject = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_USER_PROFIL_PAGE) as UserProfileViewObject;

            _dogsListViewObject = _userProfileViewObject.TapDeleteDogShop();
            DogShopViewObject dogShopViewObject = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_DOG_SHOP_PAGE) as DogShopViewObject;

            Assert.IsFalse(dogShopViewObject.IsTextDisplayed(UiText.ANY_DOG_NAME));
            Assert.IsFalse(dogShopViewObject.IsTextDisplayed(UiText.ANY_DOG_DESCRIPTION));
            Assert.IsTrue(dogShopViewObject.IsTextDisplayed(UiText.WARNING));
            Assert.IsTrue(dogShopViewObject.IsTextDisplayed(UiText.NO_CURRENT_DOG));
            Assert.IsTrue(dogShopViewObject.IsTextDisplayed(UiText.BUTTON_ADD_NEW_DOG));
        }
예제 #6
0
        public void InvalidNameAndPrice_ConfirmAddNewDog_ShouldDisplayErrorMessages()
        {
            _dogsListViewObject = _mainPageViewObject.UserHasNoDogSignIn();
            _dogShopViewObject  = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_DOG_SHOP_PAGE) as DogShopViewObject;
            _dogShopViewObject.TapButton(UiText.CONFIRM);
            _addNewDogViewObject = _dogShopViewObject.OpenAddNewDogPage();

            _addNewDogViewObject.EnterName(null);
            _addNewDogViewObject.EnterPrice(0);
            _addNewDogViewObject.TapButton(UiText.BUTTON_CONFIRM_ADD_NEW_DOG);

            Assert.IsTrue(_dogsListViewObject.IsTextDisplayed(UiText.DOG_NEED_A_GOOD_PRICE));
            Assert.IsTrue(_dogsListViewObject.IsTextDisplayed(UiText.DOG_NEED_A_NAME));
        }
예제 #7
0
        public void ConfirmAddNewDog_ShouldNavigateToDogsListAndAddNewDog()
        {
            _dogsListViewObject = _mainPageViewObject.UserHasNoDogSignIn();
            _dogShopViewObject  = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_DOG_SHOP_PAGE) as DogShopViewObject;
            _dogShopViewObject.TapButton(UiText.CONFIRM);
            _addNewDogViewObject = _dogShopViewObject.OpenAddNewDogPage();

            const string DOG_NEW_NAME = "Donald";

            _addNewDogViewObject.EnterName(DOG_NEW_NAME);
            _addNewDogViewObject.EnterPrice(500);
            _dogsListViewObject = _addNewDogViewObject.AddNewDog();

            const string EXPECTED_RACE = "affenpinscher";

            _dogsListViewObject.Search(EXPECTED_RACE);
            Assert.IsTrue(_dogsListViewObject.IsTextDisplayed(EXPECTED_RACE));
            Assert.IsTrue(_dogsListViewObject.IsTextDisplayed(DOG_NEW_NAME));
        }
        public void UserHasOneDog_SaveChangesButton_ShouldModifyMyDogInformationsInDogListPage()
        {
            _dogShopViewObject = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_DOG_SHOP_PAGE) as DogShopViewObject;
            const string NEW_NAME        = "newName";
            const string NEW_DESCRIPTION = "newDescription";
            const string NEW_RACE        = "newRace";
            const string NEW_SEX         = "newSex";

            _dogShopViewObject.EnterTextEntry(NEW_NAME, ID_NAME_ENTRY);
            _dogShopViewObject.EnterTextEntry(NEW_DESCRIPTION, ID_DESCRIPTION_ENTRY);
            _dogShopViewObject.EnterTextEntry(NEW_RACE, ID_RACE_ENTRY);
            _dogShopViewObject.EnterTextEntry(NEW_SEX, ID_SEX_ENTRY);

            _dogShopViewObject.TapButton(UiText.BUTTON_SAVE_CHANGES);
            _dogShopViewObject.AlertConfirm();
            _dogsListViewObject = _dogShopViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_DOGS_LIST_PAGE) as DogsListViewObject;

            Assert.IsFalse(_dogsListViewObject.IsTextDisplayed(UiText.ANY_DOG_NAME));
            Assert.IsFalse(_dogsListViewObject.IsTextDisplayed(UiText.ANY_DOG_DESCRIPTION));
            Assert.IsTrue(_dogsListViewObject.IsTextDisplayed(NEW_NAME));
            Assert.IsTrue(_dogsListViewObject.IsTextDisplayed(NEW_DESCRIPTION));
            Assert.IsTrue(_dogsListViewObject.IsTextDisplayed(NEW_RACE));
            Assert.IsTrue(_dogsListViewObject.IsTextDisplayed(NEW_SEX));
        }
        public void MainTitleIsDisplayed()
        {
            _dogShopViewObject = _dogsListViewObject.FromMasterDetailPageNavigateTo(UiText.BUTTON_TO_DOG_SHOP_PAGE) as DogShopViewObject;

            Assert.IsTrue(_mainPageViewObject.IsTextDisplayed(UiText.DOG_SHOP_PAGE_MAIN_TITLE));
        }