Пример #1
0
        public void EnterContactInformationThenPressCancel(string firstName, string lastName, string phoneNumber)
        {
            ContactsListPage.TapAddContactButton();

            App.WaitForElement(ContactDetailsPage.Title);

            ContactDetailsPage.PopulateAllTextFields(firstName, lastName, phoneNumber, false);
            ContactDetailsPage.TapCancelButton();

            Assert.IsFalse(ContactsListPage.DoesViewCellExist($"{firstName} {lastName}"));
        }
Пример #2
0
        public async Task AddContactTest(string firstName, string lastName, string phoneNumber, bool shouldUseReturnKey)
        {
            ContactsListPage.TapAddContactButton();

            App.WaitForElement(ContactDetailsPage.Title);

            ContactDetailsPage.PopulateAllTextFields(firstName, lastName, phoneNumber, shouldUseReturnKey);

            switch (shouldUseReturnKey)
            {
            case false:
                ContactDetailsPage.TapSaveButton();
                break;
            }

            await ContactsListPage.WaitForPullToRefreshActivityIndicatorAsync();

            await ContactsListPage.WaitForNoPullToRefreshActivityIndicatorAsync();

            Assert.IsTrue(ContactsListPage.DoesViewCellExist($"{firstName} {lastName}"));
            Assert.IsTrue(ContactsListPage.DoesViewCellExist(phoneNumber));
        }