public void WhenAddPlanParticipants(Table participants) { foreach (TableRow participant in participants.Rows) { if (participant.ContainsKey("Plan participant") && !string.IsNullOrEmpty(participant["Plan participant"])) { participant["Plan participant"] += uniqueStamp; } } MajorGivingPlanDialog.SetParticipants(participants); }
/// <summary> /// Add a major giving plan to a prospect constituent. /// </summary> /// <param name="detailFields">Mapping of the 'Details' tab field captions to their desired values.</param> /// <param name="outline">The outline to use.</param> public static void AddMajorGivingPlan(TableRow detailFields, string outline) { SelectTab("Prospect"); SelectInnerTab("Plans"); ClickSectionAddButton("Plans"); WaitClick(getXMenuItem("Add major giving plan")); MajorGivingPlanDialog.SetDetails(detailFields); MajorGivingPlanDialog.SetOutline(outline); Dialog.Save(); GetDisplayedElement(getXPanelHeader("individual")); }
public void GivenAMajorGivingPlanIsStartedOn(string constituent, Table table) { WhenIStartToAddAMajorGivingPlanTo(constituent); foreach (var planValues in table.Rows) { StepHelper.SetTodayDateInTableRow("Start date", planValues); if (planValues.ContainsKey("Outlines")) { MajorGivingPlanDialog.SetOutline(planValues["Outlines"]); planValues["Outlines"] = null; } MajorGivingPlanDialog.SetDetails(planValues); } }
private void AddMajorGivingPlan(TableRow detailFields, string outline) { Panel.SelectTab("Prospect"); Panel.SelectInnerTab("Plans"); Panel.ClickSectionAddButton("Plans"); BaseComponent.WaitClick(String.Format("//div[contains(@class,'x-menu') and contains(@style,'visibility: visible')]//span[./text()='{0}' and @class='x-menu-item-text']", "Add major giving plan")); Dialog.SetTextField("//input[contains(@id,'_PROSPECTPLAN_NAME_value')]", detailFields["Plan name"]); Dialog.SetTextField("//input[contains(@id,'_PROSPECTPLANTYPECODEID_value')]", detailFields["Plan type"]); BaseComponent.GetEnabledElement("//input[contains(@id,'_STARTDATE_value')]").SendKeys(detailFields["Start date"]); MajorGivingPlanDialog.SetOutline(outline); Dialog.Save(); }
public void WhenInsertAStepOnRow(int index, Table steps) { if (steps.RowCount != 1) { throw new ArgumentException("Only provide one step row."); } foreach (var step in steps.Rows) { StepHelper.SetTodayDateInTableRow("Expected date", step); StepHelper.SetTodayDateInTableRow("Actual date", step); if (step.ContainsKey("Owner") && !string.IsNullOrEmpty(step["Owner"])) { step["Owner"] += uniqueStamp; } MajorGivingPlanDialog.InsertStep(step, index); } }
public void WhenSetTheDetails(Table table) { if (table.RowCount != 1) { throw new ArgumentException("Only provide one row for the details."); } foreach (var details in table.Rows) { string startDate = details["Start date"].ToString(); StepHelper.SetTodayDateInTableRow("Start date", details); if (details.ContainsKey("Primary manager") && !string.IsNullOrEmpty(details["Primary manager"])) { details["Primary manager"] += uniqueStamp; } if (details.ContainsKey("Secondary manager") && !string.IsNullOrEmpty(details["Secondary manager"])) { details["Secondary manager"] += uniqueStamp; } if (details.ContainsKey("Plan name") && !string.IsNullOrEmpty(details["Plan name"])) { details["Plan name"] += uniqueStamp; } MajorGivingPlanDialog.SetDetails(details); DateTime actualStartDate = DateTime.MinValue; if (startDate.ToLower().Equals("today")) { actualStartDate = DateTime.Now; } MajorGivingPlanDialog.SetPrimaryManagerStartDate(actualStartDate.ToShortDateString()); if (details.ContainsKey("Secondary manager") && !string.IsNullOrEmpty(details["Secondary manager"])) { MajorGivingPlanDialog.SetSecondaryManagerStartDate(actualStartDate.ToShortDateString()); } } }
public void WhenSaveThePlan() { MajorGivingPlanDialog.Save(); }
public void WhenSetTheStepsWithOutline(string outline) { MajorGivingPlanDialog.SetOutline(outline + uniqueStamp); }