示例#1
0
 public void Edit_Organization_And_Assign_Nonsense_Values()
 {
     OrganizationCreator.CreateSimpleOrganization();
     OrganizationCreator.EditOrganizationAssigningNonsenseValues(OrganizationCreator.FirstOrganization);
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.IsOrganizationSavedAfterEdit, "Organization was not saved successfully after edit though, it should");
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.AreOrganizationFieldValuesSavedCorrectly, "Organization field values were not saved correctly after edit");
 }
示例#2
0
 public void Edit_Every_Organization_Field_From_Existing_Organization()
 {
     OrganizationCreator.CreateOrganizationWithAllValues();
     OrganizationCreator.EditOrganizationAlteringAllValues(OrganizationCreator.FirstOrganization);
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.IsOrganizationSavedAfterEdit, "Organization was not saved successfully after edit though, it should");
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.AreOrganizationFieldValuesSavedCorrectly, "Organization field values were not saved correctly after edit");
 }
 public void Organization_Address_Links_Navigate_To_Google_Maps()
 {
     OrganizationCreator.CreateOrganizationWithAllValues();
     VerifyThat.IsTrue(OrganizationViewPage.IsBillingAddressLinkActive, "Billing address link does not navigate to google maps");
     VerifyThat.IsTrue(OrganizationViewPage.IsOtherAddressLinkActive, "Shipping address link does not navigate to google maps");
     VerifyThat.IsTrue(OrganizationViewPage.IsShippingAddressLinkActive, "Other address link does not navigate to google maps");
 }
        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 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."
                );
        }
示例#6
0
 public void Can_Edit_Organization()
 {
     OrganizationCreator.CreateSimpleOrganization();
     OrganizationCreator.EditSimpleOrganization(OrganizationCreator.FirstOrganization);
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.IsOrganizationSavedAfterEdit, "Organization was not saved successfully after edit");
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.AreOrganizationFieldValuesSavedCorrectly, "Organization field values were not saved correctly after edit");
 }
        public void Import_Organization_That_Already_Exist_Within_Contacts()
        {
            OrganizationCreator.ImportTemplateWithAnExistingOrganization();
            AssertThat.IsTrue(OrganizationCreator.IsOrganizationFileImportedWithDuplicates, "At least one of the 2 duplicate organizations should have been imported but neither did.");

            OrganizationsPage.FindOrganization()
            .WithOrganizationName(OrganizationCreator.FirstOrganization.OrganizationName)
            .Find();
            AssertThat.AreEqual(OrganizationsPage.TotalOrganizationsCountByLabel, 1, $"There should be only one organization with name '{OrganizationCreator.FirstOrganization.OrganizationName}' being displayed. It seems that the second twin organization was imported successfully");
        }
        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");
        }
        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 Import_Template_With_Columns_In_Random_Order()
 {
     OrganizationCreator.ImportTemplateWithColumnsInRandomOrder();
     AssertThat.IsTrue(OrganizationCreator.IsOrganizationFileImportedSuccessfully, "Organization was not imported successfully thought it should");
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.AreOrganizationFieldValuesSavedCorrectly, "Organization field values were not saved correctly");
 }
 public void Organization_Emails_Are_Emailable()
 {
     OrganizationCreator.CreateOrganizationWithAllValues();
     AssertThat.IsTrue(OrganizationViewPage.IsEmailEmailable, "Email link is not active but it should");
 }
 public void Call_An_Organization_Telephone_Number()
 {
     OrganizationCreator.CreateSimpleOrganization();
     AssertThat.IsTrue(OrganizationViewPage.IsPhoneNumberCallable, "Organization telephone number is not callable");
 }
 public void Cannot_Save_Organization_With_Overflown_Values()
 {
     OrganizationCreator.CreateOrganizationWithOverflowValues();
     AssertThat.IsFalse(OrganizationCreator.FirstOrganization.IsOrganizationCreatedSuccessfully, "Organization was created successfully though it should not.");
 }
 public void Import_Template_Without_Mandatory_Column()
 {
     OrganizationCreator.ImportTemplateWithoutOrganizationNameColumn();
     AssertThat.IsFalse(OrganizationCreator.IsOrganizationFileImportedSuccessfully, "Organization was imported successfully though it should not because it does not contain organization name column");
 }
 public void Import_Organization_With_Overflow_Values()
 {
     OrganizationCreator.ImportOrganizationWithOverflowValues();
     AssertThat.IsFalse(OrganizationCreator.IsOrganizationFileImportedSuccessfully, "Organization was imported successfully but its field values exceed the 50 character limit");
 }
 public void Import_Organization_With_Nonsense_Values()
 {
     OrganizationCreator.ImportOrganizationWithNonsenseValues();
     AssertThat.IsTrue(OrganizationCreator.IsOrganizationFileImportedSuccessfully, "Organization was not imported successfully thought it should");
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.AreOrganizationFieldValuesSavedCorrectly, "Organization field values were not saved correctly");
 }
 public void Import_Organization_Without_Mandatory_Field_Value()
 {
     OrganizationCreator.ImportOrganizationWithoutOrganizationName();
     AssertThat.IsFalse(OrganizationCreator.IsOrganizationFileImportedSuccessfully, "Organization was imported successfully but does not contain value for organization name field");
 }
 public void Import_Organizations_With_Invalid_Combo_Box_Values()
 {
     OrganizationCreator.ImportTemplateOrganizationWithInvalidComboValues();
     AssertThat.IsTrue(OrganizationCreator.IsOrganizationFileFailedToImport, "Organization with invalid combo box values was imported but it should not");
 }
 public void Import_Organizations_With_Void_Lines_Between_Organizations()
 {
     OrganizationCreator.ImportTemplateWithVoidLinesBetweenOrganizations();
     AssertThat.IsTrue(OrganizationCreator.IsOrganizationFileImportedSuccessfully, "Contacts were not imported but they should.");
 }
 public void SetUp() => OrganizationCreator.Initialize();
示例#21
0
 public void CleanUp()
 {
     ContactCreator.CleanUp();
     OrganizationCreator.CleanUp();
 }
 public void CleanUp() => OrganizationCreator.CleanUp();
 public void Create_Organization_With_Extra_Null_Fields()
 {
     OrganizationCreator.CreateOrganizationWithNullValuesInExtraFields();
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.IsOrganizationCreatedSuccessfully, "Organization was not saved successfully though it should have.");
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.AreOrganizationFieldValuesSavedCorrectly, "Organization field values were not saved correctly");
 }
示例#24
0
 public void SetUp()
 {
     ContactCreator.Initialize();
     OrganizationCreator.Initialize();
 }
示例#25
0
 public void Cannot_Save_Organization_After_Leaving_Mandatory_Fields_Empty()
 {
     OrganizationCreator.CreateSimpleOrganization();
     OrganizationCreator.EditOrganizationRemovingOrganizationName(OrganizationCreator.FirstOrganization);
     AssertThat.IsFalse(OrganizationCreator.FirstOrganization.IsOrganizationSavedAfterEdit, "Organization was saved successfully after edit though it should not because its name was left empty");
 }
示例#26
0
 public void Can_Create_A_Simple_Organization()
 {
     OrganizationCreator.CreateSimpleOrganization();
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.IsOrganizationCreatedSuccessfully, "Organization was not created successfully but it should");
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.AreOrganizationFieldValuesSavedCorrectly, "Organization field values where not saved correctly");
 }
示例#27
0
 public void Cannot_Save_Organization_After_Assigning_Overflown_Values()
 {
     OrganizationCreator.CreateSimpleOrganization();
     OrganizationCreator.EditOrganizationAssigningOverflowValues(OrganizationCreator.FirstOrganization);
     AssertThat.IsFalse(OrganizationCreator.FirstOrganization.IsOrganizationSavedAfterEdit, "Organization was saved successfully after edit though it should not because its field values exceed the character limit");
 }
示例#28
0
 public void Can_Import_Organization_Template()
 {
     OrganizationCreator.ImportSimpleOrganization();
     AssertThat.IsTrue(OrganizationCreator.IsOrganizationFileImportedSuccessfully, "Organization was not imported successfully");
     AssertThat.IsTrue(OrganizationCreator.FirstOrganization.AreOrganizationFieldValuesSavedCorrectly, "Organization field values where not saved correctly");
 }
 public void Cannot_Leave_Organization_Mandatory_Fields_Empty()
 {
     OrganizationCreator.CreateOrganizationWithoutOrganizationName();
     AssertThat.IsFalse(OrganizationCreator.FirstOrganization.IsOrganizationCreatedSuccessfully, "Organization was created successfully though it should not.");
 }