Esempio n. 1
0
 public void GivenIAddAnOrganizationRelationship(Table table)
 {
     #region data setup
     //setup date field.  StepHelper for date must come before dynamic objects
     StepHelper.SetTodayDateInTableRow("Start date", table);
     dynamic objectData           = table.CreateDynamicInstance();
     var     organizationDialogId = "RelationshipIndividualtoOrganizationAddForm2";
     objectData.RelatedOrganization += uniqueStamp;
     //setup fields for Add organizational relationship
     IDictionary <string, CrmField> OrganizationSupportedFields = new Dictionary <string, CrmField>
     {
         { "Related organization", new CrmField("_RECIPROCALCONSTITUENTID_value", FieldType.Searchlist, "OrganizationSearch", "_KEYNAME_value") },
         { string.Format(objectData.Constituent + uniqueStamp + " is the"), new CrmField("_RELATIONSHIPTYPECODEID_value", FieldType.Dropdown) },
         { string.Format(objectData.RelatedOrganization + uniqueStamp + " is the"), new CrmField("_RECIPROCALTYPECODEID_value", FieldType.Dropdown) },
         { "Start date", new CrmField("_RELATIONSHIPSTARTDATE_value", FieldType.TextInput) }
     };
     DateTime startDate = objectData.StartDate;
     #endregion
     //Search for constituent
     StepHelper.SearchAndSelectConstituent(objectData.Constituent, true);
     //click Relationship tab and Add individual relationship
     Panel.SelectTab("Relationships");
     Panel.ClickButton("Add organization");
     //check if visible
     BaseComponent.GetEnabledElement("//span[contains(@class,'x-window-header-text') and ./text()='Add a relationship']");
     //set fields
     Dialog.SetField(organizationDialogId, "Related organization", objectData.RelatedOrganization, OrganizationSupportedFields);
     Dialog.SetField(organizationDialogId, objectData.Constituent + uniqueStamp + " is the", objectData.ConstituentRelationshipType, OrganizationSupportedFields);
     Dialog.SetField(organizationDialogId, "Start date", startDate.ToShortDateString(), OrganizationSupportedFields);
     Dialog.SetCheckbox("//input[contains(@id,'_ISMATCHINGGIFTRELATIONSHIP_value')]", objectData.TheOrganizationWillMatchContributionsForThisRelationship);
     Dialog.Save();
 }
Esempio n. 2
0
 public void WhenIStartToAddAMajorGivingPlanTo(string constituent)
 {
     StepHelper.SearchAndSelectConstituent(constituent);
     ConstituentPanel.StartToAddAPlan("Add major giving plan");
 }
 public void ThenConstituentOfTypeIsCreatedNamed(string ConstituentType, string ConstituentName)
 {
     StepHelper.SearchAndSelectConstituent(ConstituentName);
     Panel.GetEnabledElement(string.Format("//span[contains(@id,'_CONSTITUENTTYPETEXT_value') and ./text()='{0}']", ConstituentType), 15);
     Panel.GetEnabledElement(string.Format(VisiblePanel + "//h2[contains(@class,'bbui-pages-header')]/span[contains(./text(),'{0}')]", ConstituentName), 15);
 }