Beispiel #1
0
        /// <summary>
        /// Create an organization with normal organization name and phone values. During creation, billing street and profession extra fields are added but are left empty upon saving.
        /// </summary>
        public static void CreateOrganizationWithNullValuesInExtraFields()
        {
            SetCurrentOrganization();

            var organizationName = DummyData.SimpleWord;
            var phone            = DummyData.PhoneValue;
            var billingStreet    = string.Empty;
            var profession       = string.Empty;

            NewOrganizationPage.CreateOrganization()
            .WithOrganizationName(organizationName)
            .WithPhone(phone)
            .WithBillingStreet(billingStreet)
            .WithProfession(profession)
            .Create();

            CurrentOrganization.IsOrganizationCreatedSuccessfully = IsOrganizationCreatedSuccessfully;

            if (!CurrentOrganization.IsOrganizationCreatedSuccessfully)
            {
                return;
            }
            CurrentOrganization.SetFieldValue(OrganizationFields.OrganizationName, organizationName);
            CurrentOrganization.SetFieldValue(OrganizationFields.Phone, phone);
            CurrentOrganization.SetFieldValue(OrganizationFields.BillingStreet, billingStreet);
            CurrentOrganization.SetFieldValue(OrganizationFields.Profession, profession);
        }
Beispiel #2
0
        /// <summary>
        /// First creates an organization and then imports an organization template that contains 2 organizations of which 1 has the same organization name with the previously created organization.
        /// Check for duplicate organziation names is made during import
        /// </summary>
        public static void ImportTemplateWithAnExistingOrganization()
        {
            var organizationName = "SiEBEN";

            NewOrganizationPage.CreateOrganization().WithOrganizationName(organizationName).Create();

            if (!NewOrganizationPage.IsOrganizationSavedSuccessfully)
            {
                return;
            }
            FirstOrganization.SetFieldValue(OrganizationFields.OrganizationName, organizationName);


            ImportPage.ImportFile()
            .Containing(ImportFileType.Organizations)
            .FromPath(ImportFilePath)
            .WithFileName("Organizations16.xls")
            .CheckingForDuplicate(ImportField.OrganizationName).Submit();

            if (!ImportPage.IsImportWithDuplicatesMessageShown)
            {
                return;
            }
            SecondOrganization.SetFieldValue(OrganizationFields.OrganizationName, "SiEBEN");
            ThirdOrganization.SetFieldValue(OrganizationFields.OrganizationName, "InEdu");
        }
 public void Assert_That_Combo_List_Fields_Are_Sorted_Alphabetically()
 {
     LeftSideMenu.GoToOrganizations();
     NewOrganizationPage.GoTo();
     AssertThat.IsTrue(NewOrganizationPage.AreCountryComboListsSorted, "Country combo list is not sorted alphabetically");
     AssertThat.IsTrue(NewOrganizationPage.IsIndustryComboListSorted, "Country combo list is not sorted alphabetically");
     AssertThat.IsTrue(NewOrganizationPage.IsOrganizationTypeComboListSorted, "Country combo list is not sorted alphabetically");
 }
        public void Assert_Organization_Comment_Field_Character_Limit_Indicator_Works_Correctly()
        {
            LeftSideMenu.GoToOrganizations();
            NewOrganizationPage.GoTo();
            NewOrganizationPage.SetComments(" " + DummyData.SimpleText);
            VerifyThat.AreEqual(500 - NewOrganizationPage.CommentsTextLength, NewOrganizationPage.CommentsLimitIndicator,
                                $"Comments text length is {500 - NewContactPage.CommentsTextLength} the value indicator is displaying is {NewOrganizationPage.CommentsLimitIndicator}");

            NewOrganizationPage.SetComments(DummyData.SimpleText);
            VerifyThat.AreEqual(500 - NewOrganizationPage.CommentsTextLength, NewOrganizationPage.CommentsLimitIndicator,
                                $"Comments text length is {500 - NewOrganizationPage.CommentsTextLength} the value indicator is displaying is {NewOrganizationPage.CommentsLimitIndicator}");
        }
Beispiel #5
0
        /// <summary>
        /// Create an organization that has values assigned in every single field.
        /// </summary>
        public static void CreateOrganizationWithAllValues()
        {
            SetCurrentOrganization();

            var tmp = new Organization();

            tmp.SetFieldValue(OrganizationFields.OrganizationName, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.Phone, DummyData.PhoneValue);
            tmp.SetFieldValue(OrganizationFields.Email, DummyData.EmailValue);
            tmp.SetFieldValue(OrganizationFields.Fax, DummyData.PhoneValue);
            tmp.SetFieldValue(OrganizationFields.Website, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.AllowSms, DummyData.BooleanValue);
            tmp.SetFieldValue(OrganizationFields.AllowPhones, DummyData.BooleanValue);
            tmp.SetFieldValue(OrganizationFields.AllowEmails, DummyData.BooleanValue);

            tmp.SetFieldValue(OrganizationFields.Industry, DummyData.IndustryValue);
            tmp.SetFieldValue(OrganizationFields.OrganizationType, DummyData.OrganizationTypeValue);
            tmp.SetFieldValue(OrganizationFields.Profession, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.Comments, DummyData.SimpleText);
            tmp.SetFieldValue(OrganizationFields.BillingStreet, DummyData.AddressValue);
            tmp.SetFieldValue(OrganizationFields.BillingCity, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.BillingState, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.BillingPostalCode, DummyData.NumericValue);
            tmp.SetFieldValue(OrganizationFields.BillingCountry, DummyData.CountryValue);
            tmp.SetFieldValue(OrganizationFields.ShippingStreet, DummyData.AddressValue);
            tmp.SetFieldValue(OrganizationFields.ShippingCity, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.ShippingState, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.ShippingPostalCode, DummyData.NumericValue);
            tmp.SetFieldValue(OrganizationFields.ShippingCountry, DummyData.CountryValue);
            tmp.SetFieldValue(OrganizationFields.OtherStreet, DummyData.AddressValue);
            tmp.SetFieldValue(OrganizationFields.OtherCity, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.OtherState, DummyData.SimpleWord);
            tmp.SetFieldValue(OrganizationFields.OtherPostalCode, DummyData.NumericValue);
            tmp.SetFieldValue(OrganizationFields.OtherCountry, DummyData.CountryValue);

            NewOrganizationPage.CreateOrganization()
            .WithMultipleValues(tmp.BasicOrganizationFields, tmp.ExtraOrganizationFields, tmp.BooleanOrganizationFields)
            .Create();

            CurrentOrganization.IsOrganizationCreatedSuccessfully = IsOrganizationCreatedSuccessfully;

            if (!CurrentOrganization.IsOrganizationCreatedSuccessfully)
            {
                return;
            }
            CurrentOrganization.Clone(tmp);
        }
Beispiel #6
0
        /// <summary>
        /// Create an organization with phone value but without value in organization name field
        /// </summary>
        public static void CreateOrganizationWithoutOrganizationName()
        {
            SetCurrentOrganization();

            var phone = DummyData.PhoneValue;

            NewOrganizationPage.CreateOrganization()
            .WithPhone(phone)
            .Create();

            CurrentOrganization.IsOrganizationCreatedSuccessfully = IsOrganizationCreatedSuccessfully;

            if (!CurrentOrganization.IsOrganizationCreatedSuccessfully)
            {
                return;
            }
            CurrentOrganization.SetFieldValue(OrganizationFields.Phone, phone);
        }
        public void Assert_That_Page_Paths_Are_Correct()
        {
            LeftSideMenu.GoToOrganizations();
            VerifyThat.IsTrue(OrganizationsPage.IsAt, "Organization page path is not the expected one");

            OrganizationsPage.OpenFirstOrganization();
            VerifyThat.IsTrue(OrganizationViewPage.IsAt, "Organization view page path is not the expected one");

            EditOrganizationPage.GoTo();
            VerifyThat.IsTrue(EditOrganizationPage.IsAt, "Edit organization page path is not the expected one");

            EditOrganizationPage.ClickSaveOrganizationButton();
            VerifyThat.IsTrue(OrganizationViewPage.IsAt, "Organization view page path is not the expected one");

            LeftSideMenu.GoToOrganizations();
            NewOrganizationPage.GoTo();
            VerifyThat.IsTrue(NewOrganizationPage.IsAt, "New organization page path is not the expected one");
        }