示例#1
0
        public void VerifyCategoryEditing()
        {
            string categoryName = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss.fff");

            LoginHelper.Login();

            new MainPage().GetCategoriesButton().Click();
            CategoriesPage categoriesPage = new CategoriesPage();

            categoriesPage.GetCreateNewCategoryButton().Click();

            CreateCategoryPage createCategoryPage = new CreateCategoryPage();

            createCategoryPage.GetCategotyNameTextField().SetValue(categoryName);
            createCategoryPage.GetSubmitButton().Click();
            categoriesPage = new CategoriesPage();
            categoriesPage.GetCategoryRowByName(categoryName).WaitForElementToBePresent().AssertExists();

            categoriesPage.GetEditButtonByCategoryName(categoryName).Click();

            string           newCategoryName  = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss.fff");
            EditCategoryPage editCategoryPage = new EditCategoryPage();

            editCategoryPage.GetCategotyNameTextField().SetValue(newCategoryName);
            editCategoryPage.GetSubmitButton().Click();

            categoriesPage = new CategoriesPage();
            categoriesPage.GetCategoryRowByName(newCategoryName).WaitForElementToBePresent().AssertExists();
        }
示例#2
0
        public void VerifyCategoryCreationWithEmptyName()
        {
            LoginHelper.Login();

            new MainPage().GetCategoriesButton().Click();
            CategoriesPage categoriesPage = new CategoriesPage();

            categoriesPage.GetCreateNewCategoryButton().Click();

            CreateCategoryPage createCategoryPage = new CreateCategoryPage();

            createCategoryPage.GetSubmitButton().Click();
            createCategoryPage.GetRequiredFildMissingMessage().WaitForElementToBePresent().AssertExists();
        }
示例#3
0
        public void VerifyCreationAndDeletionOfCategory()
        {
            string categoryName = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss.fff");

            LoginHelper.Login();

            new MainPage().GetCategoriesButton().Click();
            CategoriesPage categoriesPage = new CategoriesPage();

            categoriesPage.GetCreateNewCategoryButton().Click();

            CreateCategoryPage createCategoryPage = new CreateCategoryPage();

            createCategoryPage.GetCategotyNameTextField().SetValue(categoryName);
            createCategoryPage.GetSubmitButton().Click();
            categoriesPage = new CategoriesPage();
            categoriesPage.GetCategoryRowByName(categoryName).WaitForElementToBePresent().AssertExists();

            categoriesPage.GetDeleteButtonByCategoryName(categoryName).Click();
            WebdriverFactory.GetCurrentDriver().SwitchTo().Alert().Accept();

            categoriesPage.GetCategoryRowByName(categoryName).WaitForElementToBeAbsent().AssertAbsent();
        }
示例#4
0
        private async Task RenderCreatePage(string param)
        {
            Page page;

            switch (param)
            {
            case "account":
                page = new CreateAccountPage();
                break;

            case "category":
                page = new CreateCategoryPage();
                break;

            case "budget":
                page = new CreateBudgetPage();
                break;

            default:
                page = new CreateTransactionPage();
                break;
            }
            await _navigation.PushAsync(page);
        }