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);
     }
 }
Esempio n. 3
0
 private void AddMatchingGiftConditions()
 {
     try
     {
         ConstituentPanel.SelectInfoTab();
         ConstituentPanel.SelectInnerTab("Organization");
         string xButtonPath = "//div[contains(@class,'bbui-pages-contentcontainer') and not(contains(@class,'hide'))]//div[not(contains(@class,'x-hide-display')) and contains(@class,'bbui-pages-pagesection') and not(contains(@class,'row'))]//div[contains(@id,'pageSection')]/div/table/tbody/tr//td/table/tbody/tr//td/div[./text() = 'Matching gift conditions']/../../../../../../../../../../../div[contains(@class,'bbui-pages-section-tbar')]//tr//button[text()='Add']";
         ConstituentPanel.WaitClick(xButtonPath, 20);
         Dialog.SetDropDown("//div[contains(@id, '_MatchingGiftConditionAddForm2')]//input[contains(@id,'_MATCHINGGIFTCONDITIONTYPECODEID_value')]", "Employee");
         Dialog.SetTextField("//div[contains(@id, '_MatchingGiftConditionAddForm2')]//input[contains(@id,'_MATCHINGFACTOR_value')]", "0.50");
         Dialog.Save();
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not enter fields for a test organization. " + ex.ToString());
     }
 }
 //[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);
     }
 }
Esempio n. 5
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);
     }
 }
Esempio n. 6
0
        public void GivenIAddConstituenciesToTheFollowingConstituents(Table table)
        {
            StepHelper.SetTodayDateInTableRow("Date from", table);
            StepHelper.SetTodayDateInTableRow("Date to", table);
            IList <dynamic> tableData = table.CreateDynamicSet().ToList();

            foreach (dynamic row in tableData)
            {
                //variables
                DateTime startDate = row.DateFrom;
                DateTime endDate   = row.DateTo;
                //navigation
                GetConstituentPanel(row.Surname + uniqueStamp);
                ConstituentPanel.SelectInfoTab();
                ConstituentPanel.SelectInnerTab("Constituencies");
                //set values
                Panel.ClickSectionAddButton("Constituencies");
                Panel.WaitClick(string.Format("//div[contains(@style,'visibility: visible')]//span[./text()='{0}']", row.Constituency));
                Dialog.SetTextField("//input[contains(@id,'_DATEFROM_value')]", startDate.ToShortDateString());
                Dialog.SetTextField("//input[contains(@id,'_DATETO_value')]", endDate.ToShortDateString());
                //save
                Dialog.Save();
            }
        }