public void WhenIAddFriendConstituencyTo(string lastName, Table friends)
 {
     try
     {
         lastName += uniqueStamp;                                                                    //The unique stamp is a series of numbers to keep constituents different from each other
         BBCRMHomePage.OpenConstituentsFA();                                                         //Open constituent functional area
         ConstituentsFunctionalArea.ConstituentSearch(lastName);                                     // search by last name for a constituent
         string formName = "ConstituencyAddForm";
         if (friends == null || friends.Rows.Count == 0)                                             // if there is only one row
         {
             ConstituentPanel.AddConstituency("User-defined");                                       //click the user-defined link
             Dialog.OK();
             Dialog.SetTextField(Dialog.getXInput(formName, "_CONSTITUENCYCODEID_value"), "Friend"); // ad a friend constituency
         }
         else
         {
             foreach (var friend in friends.Rows)  //add the friend constituency to several
             {
                 ConstituentPanel.AddConstituency("Friend", friend);
             }
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not add the friend constituency. " + ex.Message);
     }
 }
        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);
            }
        }
Beispiel #3
0
        public void WhenIGoToTheUNCChangeManagementPageForEditing(Table changeRows)
        {
            try
            {
                BBCRMHomePage.OpenConstituentsFA();  // open constituent functional area
                string xPathLink = "//button[contains(@class,'bui-linkbutton')]/div[text()='UNC Change Management']";

                //click on the  UNC Change Management Button
                ConstituentPanel.WaitClick(xPathLink);

                if (changeRows.RowCount != 1)
                {
                    throw new ArgumentException("Only provide one row to select.");
                }
                var changeRow = changeRows.Rows[0];                  // select only the first row

                changeRow["Name"] = changeRow["Name"] + uniqueStamp; //Use the unique stamp at the end of the name

                //select the row for the particular constituent
                Panel.SelectSectionDatalistRow(changeRow, "Constituent Change Requests");
            }
            catch (Exception ex)
            {
                throw new Exception("Error: could not go to the Change Management page for an edit address change request. " + ex.Message);
            }
        }
 public void ThenConstituentIsCreated(string lastName)
 {
     lastName += uniqueStamp;
     if (!ConstituentPanel.IsLastName(lastName))
     {
         throw new ArgumentException("Current constituent page does not have the last name " + lastName);
     }
 }
Beispiel #5
0
 private void GetConstituentPanel(string lastName)
 {
     if (!ConstituentPanel.IsLastName(lastName))
     {
         BBCRMHomePage.OpenConstituentsFA();
         ConstituentsFunctionalArea.ConstituentSearch(lastName);
     }
 }
 public void ThenTheNotificationBarDisplaysTheNote(string noteTitle)
 {
     if (!ConstituentPanel.NotificationExists(noteTitle))
     {
         throw new ArgumentException(
                   String.Format("Current constituent does not have a notification displayed for note '{0}'", noteTitle));
     }
 }
 public void WhenIGoToThePlanForProspect(string plan, string prospect)
 {
     prospect += uniqueStamp;
     BBCRMHomePage.OpenConstituentsFA();
     ConstituentsFunctionalArea.ConstituentSearch(prospect);
     plan += uniqueStamp;
     ConstituentPanel.GoToPlan(plan);
 }
 public void GivenProspectTeamRoleExistsFor(string teamRole, string lastName)
 {
     lastName += uniqueStamp;
     GetConstituentPanel(lastName);
     if (!ConstituentPanel.TeamRoleExists(teamRole))
     {
         ConstituentPanel.AddTeamRole(teamRole);
     }
 }
        public void WhenIDeceaseASpouse()
        {
            ConstituentPanel.SelectInfoTab();  // Go to the personal info tab
            string xPathdeceased = "//td[contains(@class,'x-toolbar-cell') and not (contains(@class,'x-hide-display'))]//table[contains(@id,'bbui-gen-tbaraction-')and not(contains(@class,'hide'))]/tbody/tr[2]/td[2]/em/button[./text() = 'Mark deceased']";

            ConstituentPanel.WaitClick(xPathdeceased);
            Dialog.SetTextField("//div[contains(@id, 'IndividualMarkDeceasedEditForm2')]//input[contains(@id, '_DECEASEDDATE_value')]", "10/15/2016");
            Dialog.Save();
        }
        private void GetConstituentPanel(string lastName)
        {
            if (!ConstituentPanel.IsLastName(lastName))
            {
                BBCRMHomePage.OpenConstituentsFA();                     //Open the Constituent Functional area

                ConstituentsFunctionalArea.ConstituentSearch(lastName); // search for the constituent using the last name
            }
        }
 public void GivenFundraiserExists(string lastName)
 {
     lastName += uniqueStamp;
     BBCRMHomePage.OpenConstituentsFA();
     ConstituentsFunctionalArea.AddAnIndividual();
     IndividualDialog.SetLastName(lastName);
     IndividualDialog.Save();
     ConstituentPanel.AddConstituency("Fundraiser");
 }
 public void WhenIAddTeamMemberTo(string lastName, Table teamMembers)
 {
     lastName += uniqueStamp;
     GetConstituentPanel(lastName);
     foreach (var teamMember in teamMembers.Rows)
     {
         teamMember["Team member"] = teamMember["Team member"] + uniqueStamp;
         ConstituentPanel.AddTeamMember(teamMember);
     }
 }
Beispiel #13
0
 public void WhenIAddTeamMemberTo(string constituentName, Table teamMembers)
 {
     GetConstituentPanel(constituentName += uniqueStamp);
     foreach (var teamMember in teamMembers.Rows)
     {
         StepHelper.SetTodayDateInTableRow("Start date", teamMember);
         teamMember["Team member"] = teamMember["Team member"] + uniqueStamp;
         teamMember["Role"]        = teamMember["Role"] + uniqueStamp;
         ConstituentPanel.AddTeamMember(teamMember);
     }
 }
 public void WhenAddANotificationToNote(string noteTitle, Table notifications)
 {
     foreach (var notification in notifications.Rows)
     {
         if (notification.Keys.Contains("Selection"))
         {
             notification["Selection"] = notification["Selection"] + uniqueStamp;
         }
         ConstituentPanel.AddNotification(noteTitle, notification);
     }
 }
 public void ThenConstituentIsCreated(string lastName)
 {
     //verify that the constituent is created with the specified last name
     if (lastName != "Testing")
     {
         lastName += uniqueStamp;  //The unique stamp is a series of numbers to keep constituents different from each other
     }
     if (!ConstituentPanel.IsLastName(lastName))
     {
         throw new ArgumentException("Current constituent page does not have the last name " + lastName);
     }
 }
Beispiel #16
0
 public void GivenIStartAnAddChangeRequestForConstituent()
 {
     try
     {
         BBCRMHomePage.OpenConstituentsFA();  // open the constituent functional area
         //click on the link to open form to add a new individual by request
         ConstituentPanel.WaitClick("//button[contains(@class,'linkbutton')]/div[text()='UNC Request Add a New Individual']", 10);
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not start a change request. " + 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);
     }
 }
 private void GetConstituentPanel(string lastName)
 {
     if (!ConstituentPanel.IsLastName(lastName))
     {
         BBCRMHomePage.OpenConstituentsFA();
         ConstituentsFunctionalArea.ConstituentSearch(lastName);
     }
     //if (!Panel.IsPanelType("individual") || !ConstituentPanel.IsConstituentPanelHeader(lastName))
     //{
     //    BBCRMHomePage.OpenConstituentsFA();
     //    ConstituentsFunctionalArea.ConstituentSearch(lastName);
     //}
 }
 public void WhenIAddANoteTo(string lastName, Table notes)
 {
     lastName += uniqueStamp;
     GetConstituentPanel(lastName);
     foreach (var note in notes.Rows)
     {
         if (note.Keys.Contains("Author"))
         {
             note["Author"] = note["Author"] + uniqueStamp;
         }
         ConstituentPanel.AddNote(note);
     }
 }
        public void ThenAProspectConstituencyIsAddedTo(string lastName, Table prospects)
        {
            lastName += uniqueStamp;
            GetConstituentPanel(lastName);

            foreach (var prospect in prospects.Rows)
            {
                if (!ConstituentPanel.ConstituencyExists(prospect))
                {
                    throw new ArgumentException(String.Format("Constituent page '{0}' does have prospect '{1}'",
                                                              lastName, prospect));
                }
            }
        }
Beispiel #21
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 WhenAddProspectManager(string prospectManager)
 {
     try
     {
         prospectManager += uniqueStamp;                        //The unique stamp is a series of numbers added to the end to keep names distinctive
         ConstituentPanel.ClickButton("Edit prospect manager"); // edit the prospect manager
         Dialog.SetSearchList(Dialog.getXInput("ProspectManagerEditForm2", "_PROSPECTMANAGERFUNDRAISERID_value"), Dialog.getXInput("FundraiserSearch", "_KEYNAME_value"), prospectManager);
         //set the search to the fundraiser name as the prospect manager
         Dialog.Save();
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could notadd a prospect manager. " + ex.Message);
     }
 }
 private void GetConstituentPanel(string lastName)
 {
     try
     {
         if (!ConstituentPanel.IsLastName(lastName))
         {
             BBCRMHomePage.OpenConstituentsFA();                     //Open constituent functional area
             ConstituentsFunctionalArea.ConstituentSearch(lastName); // search by last name for a constituent
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not open the constituent panel. " + ex.Message);
     }
 }
 public void ThenTheTeamMemberExists(string groupCaption, Table teamMembers)
 {
     foreach (var teamMember in teamMembers.Rows)
     {
         if (teamMember["Name"] != string.Empty)
         {
             teamMember["Name"] = teamMember["Name"] + uniqueStamp;
         }
         if (!ConstituentPanel.TeamMemberExists(teamMember))
         {
             throw new ArgumentException(
                       String.Format("Current constituent page does not have the team member '{0}'", teamMember));
         }
     }
 }
        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);
            }
        }
 public void GivenStaffConstituentExists(string lastName)
 {
     try
     {
         lastName += uniqueStamp;                      // the unique stamp is a series of numbers to keep names different from each other
         BBCRMHomePage.OpenConstituentsFA();           // open the constituents functional area
         ConstituentsFunctionalArea.AddAnIndividual(); // add a new constituent
         IndividualDialog.SetLastName(lastName);
         IndividualDialog.Save();
         ConstituentPanel.AddConstituency("Staff"); // add the staff constituency
     }
     catch (Exception ex)
     {
         throw new Exception("Error: Could not add a staff constituency. " + ex.Message);
     }
 }
 public void GivenFundraiserExists(string lastName)
 {
     try
     {
         lastName += uniqueStamp;                        //The unique stamp is a series of numbers added to the end to keep names distinctive
         BBCRMHomePage.OpenConstituentsFA();             //Open the Constituent Functional area
         ConstituentsFunctionalArea.AddAnIndividual();   // add a constituent
         IndividualDialog.SetLastName(lastName);         // enter the last name
         IndividualDialog.Save();
         ConstituentPanel.AddConstituency("Fundraiser"); // add the fundrasiser constituency
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not add a fundraiser. " + ex.Message);
     }
 }
        public void WhenIAddProspectConstituencyTo(string lastName, Table prospects)
        {
            lastName += uniqueStamp;
            GetConstituentPanel(lastName);

            if (prospects == null || prospects.Rows.Count == 0)
            {
                ConstituentPanel.AddConstituency("Major giving prospect");
            }
            else
            {
                foreach (var prospect in prospects.Rows)
                {
                    ConstituentPanel.AddConstituency("Major giving prospect", prospect);
                }
            }
        }
 //[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);
     }
 }
Beispiel #30
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());
     }
 }