/// <summary> /// Navigate browser to contact list page /// </summary> public static void GoToContacts() { if (ContactsPage.IsAt) { ContactsPage.ResetFilters(); Commands.ClearSearchbox(); return; } try { var contactsBtn = Driver.Instance.FindElement(By.CssSelector("#Contacts")); Driver.MoveToElement(contactsBtn); contactsBtn.Click(); // wait for organization list to load var wait = new WebDriverWait(Driver.Instance, TimeSpan.FromSeconds(10)); wait.Until(ExpectedConditions.VisibilityOfAllElementsLocatedBy(By.Id("main-content"))); } catch (NoSuchElementException e) { Report.Report.ToLogFile(MessageType.Exception, "Browser was expected to be in Contacts Page but is not or page is not loaded properly", e); throw e; } catch (WebDriverTimeoutException e) { Report.Report.ToLogFile(MessageType.Exception, "Failed to load Contacts Page on time.", e); throw e; } }
public void TestIniti() { this.TestInitialize(); this.applicationMainPage = new ApplicationMainPage(this.Driver); this.loginPage = new LoginPage(this.Driver); this.loanParamPage = new LoanParametersPage(this.Driver); this.personalDataPage = new PersonalDataPage(this.Driver); this.addressPage = new AddressPage(this.Driver); this.contactsPage = new ContactsPage(this.Driver); this.additionalInfoPage = new AdditionalInfoPage(this.Driver); this.creditsPage = new OtherCreditsPage(this.Driver); this.incomePage = new IncomePage(this.Driver); this.otherIncomePage = new OtherIncomePage(this.Driver); this.homePage = new HomePage(this.Driver); this.loanPaymentPage = new LoanPaymentPage(this.Driver); this.printingDocumentsPage = new PrintingDocumentsPage(this.Driver); this.uploadDocumentsPage = new UploadDocumentsPage(this.Driver); this.clientOpinionPage = new ClientOpinionPage(this.Driver); this.fraudSuspicionsPage = new FraudSuspicionPage(this.Driver); var user = AccessExcelData.GetTestData <User>("TestName", "TestUser", "Users", BaseConstants.UsersXlsxFilename); this.loginPage.AnotherUserLogin(user, BaseConstants.TestCRMUrl); Thread.Sleep(1500); this.homePage.Applications.Click(); this.applicationMainPage.OpenNewApplication(); }
public void ContactsButton_LeadsToCorrespondingPage() { _navigationBar.On_HomePage(); ContactsPage contactsPage = _navigationBar.ClickOnContactsButton(); contactsPage.ContactsRedirectionAssertion(); }
public ContactsViewModel(ContactsPage source) { Source = source; Contacts = new ObservableCollection <Person>(); MessagingCenter.Subscribe <ModifyContactViewModel, Person>(this, "AddItem", async(sender, person) => { try { await DataStore.AddItemAsync(person); } catch (Exception e) { Console.WriteLine($"Exception trying to add to Store:{e}"); } }); //This Could need update if User changes data that is visible in contacts list MessagingCenter.Subscribe <ModifyContactViewModel, Person>(this, "UpdateItem", async(sender, person) => { await DataStore.UpdateItemAsync(person); //this.UpdateContactsCommand.Execute(null); }); MessagingCenter.Subscribe <ModifyContactViewModel, Person>(this, "RemoveItem", async(sender, person) => { await DataStore.DeleteItemAsync(person.Id); //this.UpdateContactsCommand.Execute(null); }); }
public App() { InitializeComponent(); // MainPage = new MainPage(); MainPage = new ContactsPage(); }
public void Assert_That_Page_Paths_Are_Correct() { VerifyThat.IsTrue(ContactsPage.IsAt, "Contact page path is not the expected one"); ContactsPage.OpenFirstContact(); VerifyThat.IsTrue(ContactViewPage.IsAt, "Contact view page path is not the expected one"); EditContactPage.GoTo(); VerifyThat.IsTrue(EditContactPage.IsAt, "Edit contact page path is not the expected one"); EditContactPage.ClickSaveContactButton(); VerifyThat.IsTrue(ContactViewPage.IsAt, "Contact view page path is not the expected one"); LeftSideMenu.GoToContacts(); NewContactPage.GoTo(); VerifyThat.IsTrue(NewContactPage.IsAt, "New contact page path is not the expected one"); ContactCreator.CreateSimpleContact(); OrganizationsPage.FindOrganization().WithOrganizationName(ContactCreator.FirstContact.OrganizationName).Open(); OrganizationViewPage.FindContactFromOrganizationContactList().WithFirstName(ContactCreator.FirstContact.FirstName).AndLastName(ContactCreator.FirstContact.LastName).Open(); VerifyThat.IsTrue(ContactViewPage.IsAtFromWithinOrganizationViewPage, "Contact view page path from within organization view page is not the expected one"); EditContactPage.GoTo(); VerifyThat.IsTrue(EditContactPage.IsAtFromWithinOrganizationViewPage, "Edit contact page path from within organization view page is not the expected one"); EditContactPage.ClickSaveContactButton(); VerifyThat.IsTrue(ContactViewPage.IsAtFromWithinOrganizationViewPage, "Contact view page path from within organization view page is not the expected one"); OrganizationsPage.FindOrganization().WithOrganizationName(ContactCreator.FirstContact.OrganizationName).Open(); OrganizationViewPage.CreateContact(); VerifyThat.IsTrue(NewContactPage.IsAtFromWithinOrganizationViewPage, "Contact view page path from within organization view page is not the expected one"); }
public void Test_CreateContactValidData() { CreateContactPage createContactPage = new CreateContactPage(); createContactPage.Open(); Assert.Multiple(() => { Assert.IsTrue(createContactPage.IsOpen()); Assert.AreEqual("Create Contact", createContactPage.PageTitle.Text); }); ContactData newContact = new ContactData() { FirstName = Helpers.GetRandomString(10), LastName = Helpers.GetRandomString(10), Email = "*****@*****.**", Phone = "+1234567890", Comments = "Random comment: " + Helpers.GetRandomString(20) }; createContactPage.CreateNewContact(newContact); ContactsPage contactsPage = new ContactsPage(); List <ContactData> listContacts = contactsPage.GetAllContactsInTable(); Assert.That(listContacts.Any(cont => cont.FirstName == newContact.FirstName)); }
public ContactsViewModel(MegaSDK megaSdk, AppInformation appInformation, ContactsPage contactsPage) : base(megaSdk, appInformation) { _contactsPage = contactsPage; ReinviteRequestCommand = new DelegateCommand(ReinviteRequest); DeleteRequestCommand = new DelegateCommand(DeleteRequest); AcceptRequestCommand = new DelegateCommand(AcceptRequest); IgnoreRequestCommand = new DelegateCommand(IgnoreRequest); DeclineRequestCommand = new DelegateCommand(DeclineRequest); ViewContactCommand = new DelegateCommand(ViewContact); DeleteContactCommand = new DelegateCommand(DeleteContact); UpdateUserData(); InitializeMenu(HamburgerMenuItemType.Contacts); SetEmptyContentTemplate(true); MegaContactsSortMode = ListSortMode.Ascending; MultiSelectCheckBoxStyle = (Style)Application.Current.Resources["DefaultCheckBoxStyle"]; MegaContactsList = new ObservableCollection <Contact>(); MegaContactsList.CollectionChanged += MegaContacts_CollectionChanged; CreateContactsGroupDescriptors(); CreateContactSortDescriptors(); ReceivedContactRequests = new ObservableCollection <ContactRequest>(); ReceivedContactRequests.CollectionChanged += ReceivedContactRequests_CollectionChanged; SentContactRequests = new ObservableCollection <ContactRequest>(); SentContactRequests.CollectionChanged += SentContactRequests_CollectionChanged; }
public void Add_Contact_To_Organization_Contact_List() { ContactCreator.CreateSimpleOrphanContact(); OrganizationCreator.CreateSimpleOrganization(); OrganizationViewPage.AddContactsToContactList().WithFirstName(ContactCreator.FirstContact.FirstName).AndLastName(ContactCreator.FirstContact.LastName).Add(); OrganizationsPage.FindOrganization().WithOrganizationName(OrganizationCreator.FirstOrganization.OrganizationName).Open(); AssertThat.IsTrue( OrganizationViewPage.FindContactFromOrganizationContactList() .WithFirstName(ContactCreator.FirstContact.FirstName) .AndLastName(ContactCreator.FirstContact.LastName) .Find(), $"Contact {ContactCreator.FirstContact.FullName} does not exist within organization {OrganizationCreator.FirstOrganization.OrganizationName} contacts, although it was added previously"); OrganizationViewPage.FindContactFromOrganizationContactList().BySequence(1).Remove(); AssertThat.IsFalse( OrganizationViewPage.FindContactFromOrganizationContactList() .WithFirstName(ContactCreator.FirstContact.FirstName) .AndLastName(ContactCreator.FirstContact.LastName) .Find(), $"Contact {ContactCreator.FirstContact.FullName} exists within organization {OrganizationCreator.FirstOrganization.OrganizationName} contacts, although it was removed previously"); ContactsPage.FindContact().WithFirstName(ContactCreator.FirstContact.FirstName).AndLastName(ContactCreator.FirstContact.LastName).Open(); AssertThat.AreEqual(ContactViewPage.OrganizationName, "", $"Contact {ContactCreator.FirstContact.FullName} is not orphan though it should because it was removed from organization '{OrganizationCreator.FirstOrganization.OrganizationName}' contacts"); }
public void Check_Share_Contact_Email_Input_Filter() { ContactsPage.OpenFirstContact(); VerifyThat.IsFalse(ContactViewPage.IsContactShareableTo(DummyData.NonsenseValue), "Email field input does not follows email syntaxt but, it was accepted by the filter."); VerifyThat.IsFalse(ContactViewPage.IsContactShareableTo("[email protected]"), "Email field input does not follows email syntaxt but, it was accepted by the filter."); VerifyThat.IsFalse(ContactViewPage.IsContactShareableTo(DummyData.SimpleWord), "Email field input does not follows email syntaxt but, it was accepted by the filter."); }
public ContactsVM(ContactsPage _ContactsPage) { ContactsPage = _ContactsPage; OnCallClickedCommand = new Command <Contact>(CallContact); OnDeleteClickedCommand = new Command <Contact>(DeleteContactFromDetails); }
public void setUp() { initialization(); testUtil = new TestUtil(); contactsPage = new ContactsPage(); loginPage = new LoginPage(); homePage = loginPage.Login(ConfigurationManager.AppSettings["username"], ConfigurationManager.AppSettings["password"]); }
public void User_Can_Remove_Buttons_from_Contacts_tab() { ContactsPage.GoTo(); ContactPage.RemoveButtons(); Assert.IsTrue(ContactPage.ButtonsRemoved(), "Removal of one of the Text Message buttons failed."); ContactPage.ReturnToHomePage(); }
public void setUp() { Initialize(); testutil = new TestUtil(); loginpage = new LoginPage(); contactspage = new ContactsPage(); homepage = loginpage.validateLogin(ConfigurationManager.AppSettings.Get("username"), ConfigurationManager.AppSettings.Get("password")); Thread.Sleep(2000); }
public void ContactRepresentative() { MainPage mainPage = new MainPage(Driver); mainPage.ClickContactUs(); ContactsPage contactsPage = new ContactsPage(Driver); Assert.AreEqual("Помощь и поддержка", contactsPage.GetHeaderHelpAndSupport()); }
public async void DeleteContactFromDetails(Contact deleteContact) { var result = await ContactsPage.DisplayAlert("Cuidado!!!", "Estas seguro que quieres eliminarlo?", "Yes", "No"); if (result) { Contact.DeleteContactFromDB(deleteContact: deleteContact); ContactsPage.UpdateListView(); } }
public ContactViewModel(ContactsPage _ContactsPage) { ContactsPage = _ContactsPage; AllContacts = new ObservableCollection <Contact>(Contacts.Get()); AddButtonClickedCommand = new Command(AddBtnClickedOperation); OnDetailClickedCommand = new Command <Contact>(CallContact); OnDeleteClickedCommand = new Command <Contact>(DeleteContactFromDetails); }
public void Import_Contact_That_Already_Exists() { ContactCreator.ImportOutlookCsvContactsThatAlreadyExists(); AssertThat.IsTrue(ContactCreator.IsContactFileImportedWithDuplicates, "Contact was imported successfully but it does not contain value for last name field"); ContactsPage.FindContact() .WithFirstName(ContactCreator.FirstContact.FirstName) .AndLastName(ContactCreator.FirstContact.LastName) .Find(); AssertThat.AreEqual(ContactsPage.TotalContactsCountByLabel, 1, $"There should be only one contact with name '{ContactCreator.FirstContact.FullName}' being displayed. It seems that the second twin contact was imported successfully"); }
public async void DeleteContactFromDetails(Contact deleteContact) { var result = await ContactsPage.DisplayAlert("Alert!", "Are you sure you want to delete this contact?", "Yes", "No"); if (result) { Contact.DeleteContactFromDB(deleteContact: deleteContact); ContactsPage.UpdateListView(); } }
public void Filter_Using_Filter_By() { ContactsPage.FilterBy().SelectingAllowEmail().Filter(); var expectedResult1 = 85; VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult1, $"The sum of contacts being displayed, with Allow Emails = True, is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult1}"); ContactsPage.ResetFilters(); ContactsPage.FilterBy().SelectingAllowSMS().Filter(); var expectedResult2 = 75; VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult2, $"The sum of contacts being displayed, with Allow SMS = True, is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult2}"); ContactsPage.ResetFilters(); ContactsPage.FilterBy().SelectingAllowPhones().Filter(); var expectedResult3 = 49; VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult3, $"The sum of contacts being displayed, with Allow Phones = True, is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult3}"); ContactsPage.ResetFilters(); ContactsPage.FilterBy().SelectingOrphans().Filter(); var expectedResult4 = 17; VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult4, $"The sum of orphan contacts being displayed is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult4}"); ContactsPage.ResetFilters(); ContactsPage.FilterBy().SelectingDepartment(Department.Logistics).Filter(); var expectedResult5 = 13; VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult5, $"The sum of contacts being displayed and belong to Logistics department, is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult5}"); ContactsPage.ResetFilters(); ContactsPage.FilterBy().SelectingDepartment(Department.Consulting).Filter(); var expectedResult6 = 57; VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult6, $"The sum of contacts being displayed and belong to Consulting department, is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult6}"); ContactsPage.ResetFilters(); ContactsPage.FilterBy().SelectingAllowEmail().SelectingDepartment(Department.RnD).Filter(); var expectedResult7 = 7; VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult7, $"The sum of contacts being displayed, with Allow Email = True and belong to RnD department, is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult7}"); ContactsPage.ResetFilters(); ContactsPage.FilterBy() .SelectingAllowSMS() .SelectingAllowEmail() .SelectingDepartment(Department.Sales) .SelectingDepartment(Department.Administration) .Filter(); var expectedResult8 = 6; VerifyThat.AreEqual(ContactsPage.TotalContactsCountByLabel, expectedResult8, $"The sum of contacts being displayed, with Allow SMS and Emails and belong either to the Sales or Administration departments, is different from the expected. ContactsDisplayed={ContactsPage.TotalContactsCount}, Expected={expectedResult8}"); }
public App() { InitializeComponent(); //MainPage = new MainPage(); //MainPage = new StackLayout(); //MainPage = new GridLayoutPage(); //MainPage = new ContactPage(); MainPage = new ContactsPage(); }
void LoginClicked(object sender, EventArgs args) { // // Validação do login // // Direcionar para a página de contatos var page = new ContactsPage(); Navigation.PushAsync(page); }
public void SetUp() { initialization(); testUtil = new TestUtil(); contactsPage = new ContactsPage(); loginPage = new LoginPage(); homePage = loginPage.Login(ConfigurationManager.AppSettings["username"], ConfigurationManager.AppSettings["password"]); //TestUtil.runTimeInfo("error", "login successful"); testUtil.switchToFrame(); contactsPage = homePage.clickOnContactsLink(); }
public async void DeleteContactFromDetails(Contact deleteContact) { Console.WriteLine(deleteContact.FullName); var result = await ContactsPage.DisplayAlert("Alert!", "Are you sure you want to delete this contact?", "Yes", "No"); if (result) { this.AllContacts.Remove(AllContacts.Single(i => i.UserId == deleteContact.UserId)); } }
public void Import_Contact_That_Already_Exist_Within_Contacts() { ContactCreator.ImportTemplateWithAnExistingContact(); AssertThat.IsTrue(ContactCreator.IsContactFileImportedWithDuplicates, "At least one of the 2 duplicate contacts should have been imported but neither did."); ContactsPage.FindContact() .WithFirstName(ContactCreator.FirstContact.FirstName) .AndLastName(ContactCreator.FirstContact.LastName) .Find(); AssertThat.AreEqual(ContactsPage.TotalContactsCountByLabel, 1, $"There should be only one contact with name '{ContactCreator.FirstContact.FullName}' being displayed. It seems that the second twin contact was imported successfully"); }
public void CheckContactsPage() { var page = new ContactsPage(); const string TEST_TEXT = "Text which rewrote"; page.SaveContent("Some text.."); page.SaveContent(TEST_TEXT); var sameAboutPage = new ContactsPage(); string actual = sameAboutPage.GetPlainContent(); Assert.AreEqual(TEST_TEXT, actual); }
public void SendBlankEMail() { string expectingMessage = "Поле 'E-mail' должно быть заполнено!\r\nПоле 'Тема' должно быть заполнено!\r\nПоле 'Ваше сообщение' должно быть заполнено!\r\nПодтвердите что вы не робот"; ContactsPage contactsPage = new ContactsPage(webDriver); string errorMessage = contactsPage.GoToContactsPage(webDriver) .SendMessage(new Message()) .GetMessageText(); Assert.AreEqual(expectingMessage, errorMessage); }
public void setUp() { string testMethodName = TestContext.TestName; logger = reports.StartTest(testMethodName); contactspage = new ContactsPage(); loginpage = new LoginPage(); homepage = loginpage.validateLogin(ConfigurationManager.AppSettings.Get("username"), ConfigurationManager.AppSettings.Get("password")); testutil.switchToFrame(); // contactspage = homepage.clickonContactsLink(); }
public void FirstTest(bool isPositive, string email, string message) { ContactsPage contactsPage = mainPage.ClickOnContacts(); bool isContactAdded = contactsPage.OpenThemeMenu() .ChooseTheme() .EmailInput(email) .MessageInput(message) .ClickButtonAdd() .isEmailOk(); Assert.That(isContactAdded, Is.EqualTo(isPositive), $"Contact was added {(isContactAdded ? "succesfully" : "unsuccesfully")}"); }
public void SendEMailIncorrectEMailAdr() { string expectingMessage = "Неправильный E-mail\r\nПодтвердите что вы не робот"; Message message = new Message("Test topic", "testMail", "375298947333", "My message"); // fields "Тема", "E-mail","Номер","Сообщение" ContactsPage contactsPage = new ContactsPage(webDriver); string errorMessage = contactsPage.GoToContactsPage(webDriver) .SendMessage(message) .GetMessageText(); Assert.AreEqual(expectingMessage, errorMessage); }
public void Import_Contacts_With_Invalid_Birthdate_Values() { ContactCreator.ImportTemplateContactWithInvalidBirthdate(); AssertThat.IsTrue(ContactCreator.IsContactFileImportedSuccessfully, "Contact were not imported but they should."); ContactsPage.FindContact().WithFirstName(ContactCreator.FirstContact.FirstName).AndLastName(ContactCreator.FirstContact.LastName).Open(); VerifyThat.AreEqual(ContactViewPage.Birthdate, "", $"Contact birthdate should be empty because imported contact's birthdate value is {ContactCreator.FirstContact.Birthdate} which is invalid."); ContactsPage.FindContact().WithFirstName(ContactCreator.SecondContact.FirstName).AndLastName(ContactCreator.SecondContact.LastName).Open(); VerifyThat.AreEqual(ContactViewPage.Birthdate, "", $"Contact birthdate should be empty because imported contact's birthdate value is {ContactCreator.SecondContact.Birthdate} which is invalid."); ContactsPage.FindContact().WithFirstName(ContactCreator.ThirdContact.FirstName).AndLastName(ContactCreator.ThirdContact.LastName).Open(); VerifyThat.AreEqual(ContactViewPage.Birthdate, "", $"Contact birthdate should be empty because imported contact's birthdate value is {ContactCreator.ThirdContact.Birthdate} which is invalid."); }