Exemple #1
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");
        }
Exemple #2
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);
        }
Exemple #3
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);
        }
Exemple #4
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);
        }