Esempio n. 1
0
        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 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");
        }
Esempio n. 3
0
 public void Organization_Value_At_Create_New_Contact_From_Within_Organization_Is_Locked()
 {
     LeftSideMenu.GoToOrganizations();
     OrganizationsPage.OpenFirstOrganization();
     OrganizationViewPage.CreateContact();
     AssertThat.IsFalse(NewContactPage.IsOrganizationNameEditable, "Organization name field is editable but the contact is being created from within an organization");
 }
 public void Check_Share_Organization_Email_Input_Filter()
 {
     OrganizationsPage.OpenFirstOrganization();
     VerifyThat.IsFalse(OrganizationViewPage.IsOrganizationShareableTo(DummyData.NonsenseValue), "Email field input does not follows email syntaxt but, it was accepted by the filter.");
     VerifyThat.IsFalse(OrganizationViewPage.IsOrganizationShareableTo("[email protected]"), "Email field input does not follows email syntaxt but, it was accepted by the filter.");
     VerifyThat.IsFalse(OrganizationViewPage.IsOrganizationShareableTo(DummyData.SimpleWord), "Email field input does not follows email syntaxt but, it was accepted by the filter.");
 }
        public void Add_Existing_No_Orphan_Contact_To_An_Organization()
        {
            ContactCreator.CreateSimpleContact();
            OrganizationCreator.CreateSimpleOrganization();

            OrganizationViewPage.AddContactsToContactList()
            .UncheckingOrphanCheckbox()
            .WithFirstName(ContactCreator.FirstContact.FirstName)
            .AndLastName(ContactCreator.FirstContact.LastName)
            .Add();

            AssertThat.IsTrue(
                OrganizationViewPage.FindContactFromOrganizationContactList()
                .WithFirstName(ContactCreator.FirstContact.FirstName)
                .AndLastName(ContactCreator.FirstContact.LastName)
                .Find(),
                $"Contact with name {ContactCreator.FirstContact.FullName} should be linked to organization {OrganizationViewPage.OrganizationName} but it is not."
                );

            OrganizationsPage.FindOrganization().WithOrganizationName(ContactCreator.FirstContact.OrganizationName).Open();
            AssertThat.IsFalse(
                OrganizationViewPage.FindContactFromOrganizationContactList()
                .WithFirstName(ContactCreator.FirstContact.FirstName)
                .AndLastName(ContactCreator.FirstContact.LastName)
                .Find(),
                $"Contact with name {ContactCreator.FirstContact.FullName} should not belong to organization {OrganizationViewPage.OrganizationName} but it is still linked with it."
                );
        }
Esempio n. 6
0
        public void Edit_Contact_From_Within_Organization_Contact_List()
        {
            ContactCreator.CreateSimpleContact();
            OrganizationsPage.FindOrganization().WithOrganizationName(ContactCreator.FirstContact.OrganizationName).Open();
            OrganizationViewPage.FindContactFromOrganizationContactList().WithFirstName(ContactCreator.FirstContact.FirstName).AndLastName(ContactCreator.FirstContact.LastName).Open();

            ContactCreator.EditSimpleContactWithOrganization(ContactCreator.FirstContact);
            AssertThat.IsTrue(ContactCreator.FirstContact.IsContactSavedAfterEdit, "Contact was not saved after edit but, it should.");
            AssertThat.IsTrue(ContactCreator.FirstContact.AreContactFieldValuesSavedCorrectly, "Contact fields have not the expected values after the edit.");
        }
        public void Make_A_Contact_Primary_From_Within_Organization()
        {
            OrganizationCreator.CreateSimpleOrganization();
            OrganizationViewPage.AddContactsToContactList().Randomly(2).Add();

            AssertThat.AreEqual(OrganizationViewPage.ContactListCount, 2, "Previously added contacts did not show up in organization contact list");
            OrganizationViewPage.FindContactFromOrganizationContactList().BySequence(1).MakePrimaryContact();
            AssertThat.AreEqual(OrganizationViewPage.PrimaryContact, OrganizationViewPage.GetContactFullNameBySequence(1), $"Contact '{OrganizationViewPage.GetContactFullNameBySequence(1)}' was not made primary though it should");

            OrganizationViewPage.FindContactFromOrganizationContactList().BySequence(2).MakePrimaryContact();
            AssertThat.AreEqual(OrganizationViewPage.PrimaryContact, OrganizationViewPage.GetContactFullNameBySequence(2), $"Contact '{OrganizationViewPage.GetContactFullNameBySequence(2)}' was not made primary though it should");
        }
Esempio n. 8
0
 public void Create_Contact_From_Within_Organization()
 {
     LeftSideMenu.GoToOrganizations();
     OrganizationsPage.OpenFirstOrganization();
     ContactCreator.CreateSimpleContactFromWithinOrganization();
     AssertThat.IsTrue(ContactCreator.FirstContact.IsContactCreatedSuccessfully,
                       "Contact was not saved successfully but it should.");
     OrganizationViewPage.FindContactFromOrganizationContactList()
     .WithFirstName(ContactCreator.FirstContact.FirstName)
     .AndLastName(ContactCreator.FirstContact.LastName)
     .Open();
     AssertThat.IsTrue(ContactCreator.FirstContact.AreContactFieldValuesSavedCorrectly,
                       "Contact field values were not saved correctly");
 }
Esempio n. 9
0
        public void Remove_Contact_From_Organization_Contact_List()
        {
            ContactCreator.CreateSimpleContact();
            OrganizationsPage.FindOrganization().WithOrganizationName(ContactCreator.FirstContact.OrganizationName).Open();
            OrganizationViewPage.FindContactFromOrganizationContactList().WithFirstName(ContactCreator.FirstContact.FirstName).AndLastName(ContactCreator.FirstContact.LastName).Remove();

            OrganizationsPage.FindOrganization().WithOrganizationName(ContactCreator.FirstContact.OrganizationName).Open();
            AssertThat.IsFalse(
                OrganizationViewPage.
                FindContactFromOrganizationContactList()
                .WithFirstName(ContactCreator.FirstContact.FirstName)
                .AndLastName(ContactCreator.FirstContact.LastName)
                .Find(),
                $"Contact {ContactCreator.FirstContact.FullName} was supposed to be removed but is still a contact of organization {ContactCreator.FirstContact.OrganizationName}."
                );
        }
        public void Delete_Organization_Along_With_Its_Linked_Contacts()
        {
            ContactCreator.CreateSimpleOrphanContact();
            ContactCreator.CreateSimpleOrphanContact();
            ContactCreator.CreateSimpleOrphanContact();

            OrganizationCreator.CreateSimpleOrganization();

            OrganizationViewPage.AddContactsToContactList()
            .WithFirstName(ContactCreator.FirstContact.FirstName)
            .AndLastName(ContactCreator.FirstContact.LastName)
            .Add();
            OrganizationViewPage.AddContactsToContactList()
            .WithFirstName(ContactCreator.SecondContact.FirstName)
            .AndLastName(ContactCreator.SecondContact.LastName)
            .Add();
            OrganizationViewPage.AddContactsToContactList()
            .WithFirstName(ContactCreator.ThirdContact.FirstName)
            .AndLastName(ContactCreator.ThirdContact.LastName)
            .Add();

            OrganizationViewPage.DeleteOrganization().WithContacts();

            VerifyThat.IsFalse(
                OrganizationsPage.FindOrganization().WithOrganizationName(OrganizationCreator.FirstOrganization.OrganizationName).Find(),
                $"Organization with name {OrganizationCreator.FirstOrganization.OrganizationName} should be deleted but, it still exists"
                );

            VerifyThat.IsFalse(
                ContactsPage.FindContact().ContainingKeyword(ContactCreator.FirstContact.FullName).Find(),
                $"Contact with name {ContactCreator.FirstContact.FullName} should be deleted along with its organization but, it still exists"
                );
            VerifyThat.IsFalse(
                ContactsPage.FindContact().ContainingKeyword(ContactCreator.SecondContact.FullName).Find(),
                $"Contact with name {ContactCreator.FirstContact.FullName} should be deleted along with its organization but, it still exists"
                );
            VerifyThat.IsFalse(
                ContactsPage.FindContact().ContainingKeyword(ContactCreator.ThirdContact.FullName).Find(),
                $"Contact with name {ContactCreator.FirstContact.FullName} should be deleted along with its organization but, it still exists"
                );
        }
 public void Check_Organization_Is_Shareable_With_Valid_Email()
 {
     OrganizationsPage.OpenFirstOrganization();
     AssertThat.IsTrue(OrganizationViewPage.IsOrganizationShareableTo(DummyData.EmailValue), "Though email inserted is of valid syntax, Share button is not enabled.");
 }