public void WhenIAddAPlanToAAProspectWithFundraiser(string prospectName, string fundraiserName, string planName)
        {
            try
            {
                prospectName   += uniqueStamp;      //The unique stamp is a series of numbers added to the end to keep names distinctive
                fundraiserName += uniqueStamp;      //The unique stamp is a series of numbers added to the end to keep names distinctive
                planName       += uniqueStamp;      //The unique stamp is a series of numbers added to the end to keep names distinctive

                BBCRMHomePage.OpenConstituentsFA(); //Open constituent functional area
                SearchProspect(prospectName);       //find the prospect

                ConstituentPanel.SelectTab("Prospect");
                ConstituentPanel.SelectInnerTab("Plans");    // go to the plans tab for the prospect
                Panel.ClickSectionAddButton("Plans", "Add"); // click to add a plan
                string xLinkPath = "//a[contains(@id,'bbui-gen-tbaraction-')]/span[./text() = 'Add Prospect Plan']";
                Panel.WaitClick(xLinkPath, 15);
                Dialog.OpenTab("Details");  //open the details tab
                // add plan name, plan type, start date and fundraiser data to the new plan
                Dialog.SetTextField("//input[contains(@id,'_PROSPECTPLAN_NAME_value')]", planName);
                Dialog.SetDropDown("//input[contains(@id,'_PROSPECTPLANTYPECODEID_value')]", "Annual Giving");
                Dialog.SetTextField("//input[contains(@id,'_STARTDATE_value')]", DateTime.Today.ToShortDateString());
                Dialog.SetSearchList(Dialog.getXInput("dataformdialog_", "_PRIMARYMANAGERFUNDRAISERID_value"), Dialog.getXInput("searchdialog", "_KEYNAME_value"), fundraiserName);
            }
            catch (Exception ex)
            {
                throw new Exception("Error: could not add a plan to a prospect. " + ex.Message);
            }
        }
 public void WhenDisplayTheRecognitionHistoryTab()
 {
     try
     {
         //display the recognition subtab under the Revenue tab for a constituent
         ConstituentPanel.SelectTab("Revenue");
         ConstituentPanel.SelectInnerTab("Recognition History");
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not display the recognition history tab. " + ex.Message);
     }
 }
Ejemplo n.º 3
0
        public void ThenPersonalInformationIsDisplayedOnPersonalInfoTab(Table table)
        {
            IList <dynamic> individuals = table.CreateDynamicSet().ToList();

            foreach (dynamic individual in individuals)
            {
                ConstituentPanel.SelectTab("Personal Info");
                individual.LastName += uniqueStamp;
                BaseComponent.GetEnabledElement(XpathHelper.xPath.VisiblePanel + string.Format("//span[contains(@id,'_FIRSTNAME_value') and ./text()='{0}']", individual.FirstName));
                BaseComponent.GetEnabledElement(XpathHelper.xPath.VisiblePanel + string.Format("//span[contains(@id,'_KEYNAME_value') and ./text()='{0}']", individual.LastName));
                BaseComponent.GetEnabledElement(XpathHelper.xPath.VisiblePanel + string.Format("//span[contains(@id,'_TITLECODE_value') and ./text()='{0}']", individual.Title));
                BaseComponent.GetEnabledElement(XpathHelper.xPath.VisiblePanel + string.Format("//span[contains(@id,'_NICKNAME_value') and ./text()='{0}']", individual.Nickname));
            }
        }
        public void WhenIAddASpecialcode(string SpecialCode)
        {
            try {
                //add a special code by selecting the special code tab and pressing the add button
                string formName = "UNCConstituentSpecialCodeDataFormAddDataForm";
                ConstituentPanel.SelectTab("UNC Special Codes");
                ConstituentPanel.ClickButton("Add");

                //enter a special code and a start date
                Dialog.SetTextField(Dialog.getXInput(formName, "_SPECIALCODEID_value"), SpecialCode);
                Dialog.SetTextField(Dialog.getXInput(formName, "_DATE_value"), "12/11/2015");
            }
            catch (Exception ex)  {
                throw new Exception("Error: could not add special code. " + ex.Message);
            }
        }
 //[Then(@"the '(.*)' team member exists")]
 //public void ThenTheTeamMemberExists(string groupCaption, Table teamMembers)
 //{
 //    try
 //    {
 //        foreach (var teamMember in teamMembers.Rows)  // search for a team member
 //        {
 //            if (teamMember["Name"] != string.Empty) teamMember["Name"] = teamMember["Name"] + uniqueStamp;  //The unique stamp is a series of numbers added to the end to keep names distinctive
 //            if (!TeamMemberExists(teamMember))
 //                throw new ArgumentException(
 //                    String.Format("Current constituent page does not have the team member '{0}'", teamMember));
 //        }
 //    }
 //    catch (Exception ex)
 //    {
 //        throw new Exception("Error: could not find that a team member exists. " + ex.Message);
 //    }
 //}
 public static void AddTeamRole(string teamRole)
 {
     try
     {
         ConstituentPanel.SelectTab("Prospect");                                         // open the prospect tab
         ConstituentPanel.SelectInnerTab("UNC Prospect Team");                           // prospect team subtab
         ConstituentPanel.ClickSectionAddButton("UNC Prospect Team", "Add team member"); // add a team member
         // set the role for the team member
         ConstituentPanel.SetTextField(Dialog.getXInput("ProspectTeamAddDataForm", "PROSPECTTEAMROLECODEID"), teamRole);
         //Dialog.Yes();
         Dialog.Save();
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not add a team role. " + ex.Message);
     }
 }
Ejemplo n.º 6
0
 public void GivenAddAMatchingCompanyAsEmployer(string companyName)
 {
     try
     {
         //open the relationships tab and the relationships inner tab
         ConstituentPanel.SelectTab("Relationships");
         ConstituentPanel.SelectInnerTab("Relationships");
         //add an organization relationsip for this constituent as an employee
         ConstituentPanel.ClickButton("Add organization");
         Dialog.SetSearchList(Dialog.getXInput("_RelationshipIndividualtoOrganizationAddForm2", "_RECIPROCALCONSTITUENTID_value"), Dialog.getXInput("searchdialog", "_KEYNAME_value"), companyName);
         Dialog.SetDropDown("//input[contains(@id,'_RELATIONSHIPTYPECODEID_value')]", "Employee");
         Dialog.SetCheckbox("//input[contains(@id,'_ISPRIMARYBUSINESS_value')]", true);
         Dialog.SetCheckbox("//input[contains(@id,'_ISMATCHINGGIFTRELATIONSHIP_value')]", true);
         Dialog.Save();
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not add a matching company. " + ex.Message);
     }
 }