Пример #1
0
        /// <summary>
        /// This method edits the income added
        /// </summary>
        public static void EditIncome(string amt)
        {
            // Log Info
            Report.Log(ReportLevel.Info, "In EditExpense");

            // Validate we are on edit expense page
            Validate.IsTrue(MonefyAppRepository.Instance.MonefyAppElements.HomePage.BalancePage.EditPageTitle.TextValue == "Edit income");
            Report.Log(ReportLevel.Info, "We are on the edit expense page");

            // Tap backspace button
            MonefyAppRepository.Instance.MonefyAppElements.HomePage.BalancePage.BackSpaceButton.Touch();
            MonefyAppRepository.Instance.MonefyAppElements.HomePage.BalancePage.BackSpaceButton.Touch();
            MonefyAppRepository.Instance.MonefyAppElements.HomePage.BalancePage.BackSpaceButton.Touch();
            Report.Log(ReportLevel.Info, "Tapped on backspace");

            // Enter new amount
            NewTransferScreen.EnterValues(amt);
            Report.Log(ReportLevel.Info, "New amount added");

            // Select category
            MonefyAppRepository.Instance.MonefyAppElements.HomePage.BalancePage.ChangeCategoryButton.Touch();
            SelectNewIncomeCategoryOption(CategoriesOptions.IncomeCategoryOptions.Salary);
            Report.Log(ReportLevel.Info, "New category selected");

            // Verify record updated
            Validate.IsTrue(MonefyAppRepository.Instance.MonefyAppElements.HomePage.BalancePage.ChangesUpdatedMessage.TextValue == "Record was updated");
            Report.Log(ReportLevel.Info, "Expense was modified successfully");

            // Back to home page
            MonefyAppRepository.Instance.MonefyAppElements.HomePage.BalanceButton.Touch();
            Report.Log(ReportLevel.Info, "We are back on the home page");

            // Log Info
            Report.Log(ReportLevel.Info, "Out EditExpense");
        }
Пример #2
0
        /// <summary>
        /// This method adds new expense by selecting expense image from home page
        /// </summary>
        public static void AddNewExpenseBySelectingExpenseImage(string amt)
        {
            // Report
            Report.Log(ReportLevel.Info, "In AddNewExpense");

            // Enter amount
            MonefyAppRepository.Instance.MonefyAppElements.HomePage.NewExpensePage.INRInputField.Touch();
            NewTransferScreen.EnterValues(amt);
            Report.Log(ReportLevel.Info, "Amount added");

            // Choose Category
            MonefyAppRepository.Instance.MonefyAppElements.HomePage.NewExpensePage.AddButton.Touch();
            Report.Log(ReportLevel.Info, "Category selected");

            // Validate expense added successfully
            Validate.IsTrue(MonefyAppRepository.Instance.MonefyAppElements.HomePage.NewExpensePage.Message.TextValue.Contains("added"));
            Report.Log(ReportLevel.Info, "Expense added successfully");

            // Report
            Report.Log(ReportLevel.Info, "Out AddNewExpense");
        }
Пример #3
0
        /// <summary>
        /// This method adds new income by tapping the plus sign from home page
        /// </summary>
        public static void AddNewIncomeByTappingPlusSign(string amt)
        {
            // Report
            Report.Log(ReportLevel.Info, "In AddNewIncomeByTappingPlusSign");

            // Enter amount
            MonefyAppRepository.Instance.MonefyAppElements.HomePage.NewExpensePage.INRInputField.Touch();
            NewTransferScreen.EnterValues(amt);
            Report.Log(ReportLevel.Info, "Amount added");

            // Choose Category
            MonefyAppRepository.Instance.MonefyAppElements.HomePage.NewExpensePage.ChooseCategoryButton.Touch();
            SelectNewIncomeCategoryOption(CategoriesOptions.IncomeCategoryOptions.Deposits);
            Report.Log(ReportLevel.Info, "Category selected");

            // Validate income added successfully
            Validate.IsTrue(MonefyAppRepository.Instance.MonefyAppElements.HomePage.NewIncomePage.IncomeAddedMessage.TextValue.Contains("Deposits:"));
            Report.Log(ReportLevel.Info, "Income added successfully");

            // Report
            Report.Log(ReportLevel.Info, "Out AddNewIncomeByTappingPlusSign");
        }