public void WhenSaveTheBatchAndCommitIt(Table batch) { EnhancedRevenueBatchDialog.UpdateProjectedTotals(); BatchDialog.Validate(); BatchDialog.SaveAndClose(); WhenICommitTheBatch(batch); }
public void WhenIAddABatchWithCheckTemplateAndDescriptionAndProjectedNumberAndProjectedAmount(string template, string description, string ProjectedNumber, string ProjectedAmount, Table batchRows) { try { description += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other BBCRMHomePage.OpenRevenueFA(); //Open revenue functional area RevenueFunctionalArea.BatchEntry(); //Open the batch entry page BatchEntryPanel.OpenTab("Uncommitted Batches"); // Open the Uncommitted Batches tab BatchEntryPanel.ClickSectionAddButton("Uncommitted batches", "Add"); // add an uncommitted batch Dialog.SetDropDown(Dialog.getXInput("Batch2AddForm", "BATCHTEMPLATEID"), template); // enter the template name Dialog.SetTextField(Dialog.getXTextArea("Batch2AddForm", "DESCRIPTION"), description); // enter the batch desx. Dialog.SetTextField("//input[contains(@id, '_PROJECTEDNUMBEROFRECORDS_value')]", ProjectedNumber); // add projected number of records Dialog.SetTextField("//input[contains(@id, '_PROJECTEDTOTALAMOUNT_value')]", ProjectedAmount); // add propected dollar amount Dialog.Save(); foreach (var batchRow in batchRows.Rows) { if (batchRow.Keys.Contains("Constituent") && batchRow["Constituent"] != null && batchRow["Constituent"] != string.Empty) { batchRow["Constituent"] += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other } } EnhancedRevenueBatchDialog.SetGridRows(batchRows); EnhancedRevenueBatchDialog.UpdateProjectedTotals(); //click on the update projected totals button and receive updated totals BatchDialog.Validate(); //click the validate button BatchDialog.SaveAndClose(); } catch (Exception ex) { throw new Exception("Error: could not add a batch with template and description. " + ex.Message); } }
public void WhenIStartToAddABatchWithTemplateAndDescription(string template, string description, Table batchRows) { try { description += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other BBCRMHomePage.OpenRevenueFA(); //Open revenue functional area RevenueFunctionalArea.BatchEntry(); BatchEntryPanel.AddBatch(template, description); //add a new batch according to the template name and description foreach (var batchRow in batchRows.Rows) { if (batchRow.Keys.Contains("Constituent") && batchRow["Constituent"] != null && batchRow["Constituent"] != string.Empty) { batchRow["Constituent"] += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other } } EnhancedRevenueBatchDialog.SetGridRows(batchRows); // ThenIAddBatchAmounts(100); EnhancedRevenueBatchDialog.UpdateProjectedTotals(); //click on the update projected totals button and receive updated totals } catch (Exception ex) { throw new Exception("Error: could not add a batch with specified template and description. " + ex.Message); } }
public void ThenTheCellValueIsForRow(string caption, string value, int rowNumber) { if (EnhancedRevenueBatchDialog.GetGridCellValue(caption, rowNumber) != value) { throw new Exception(String.Format("Row '{0}', column '{1}' does not have the value '{2}'", rowNumber, caption, value)); } }
public void ThenTheCellValueIsForRow(string caption, string value, int rowNumber) { if (EnhancedRevenueBatchDialog.GetGridCellValue(caption, rowNumber) != value) //check the value of the pledge for a certain designation in the grid { throw new Exception(String.Format("Row '{0}', column '{1}' does not have the value '{2}'", rowNumber, caption, value)); } }
public void WhenEditTheSelectedConstituent(Table fieldMappings) { if (fieldMappings.RowCount != 1) { throw new ArgumentException("Only provide 1 row of field values"); } EnhancedRevenueBatchDialog.EditConstituent(fieldMappings.Rows[0]); IndividualDialog.Save(); }
public void WhenApplyThePaymentToDesignations(Table designations) { try { EnhancedRevenueBatchDialog.Apply(designations); //apply payment to the selected designation } catch (Exception ex) { throw new Exception("Error: could not apply payment to designations. " + ex.Message); } }
public void WhenSetTheRevenueTypeForRowTo(int rowIndex, string paymentMethod) { try { EnhancedRevenueBatchDialog.SetGridCell("Revenue type", paymentMethod, rowIndex); //set the revenue type for the specific row } catch (Exception ex) { throw new Exception("Error: could not set the revenue type in a grid row. " + ex.Message); } }
public void WhenSplitTheDesignations(Table designations) { try { //split the money between designations EnhancedRevenueBatchDialog.SplitDesignations(designations, false); } catch (Exception ex) { throw new Exception("Error: could not split the designations. " + ex.Message); } }
public void WhenIStartToAddABatchWithTemplateAndDescriptionforAPledge(string template, string description, Table batchRows) { try { description += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other BBCRMHomePage.OpenRevenueFA(); //Open revenue functional area RevenueFunctionalArea.BatchEntry(); BatchEntryPanel.AddBatch(template, description); //add a new batch according to the template name and description foreach (var batchRow in batchRows.Rows) { if (batchRow.Keys.Contains("Constituent") && batchRow["Constituent"] != null && batchRow["Constituent"].ToString() != "Testmatchingcompany" && batchRow["Constituent"] != string.Empty) { batchRow["Constituent"] += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other } } EnhancedRevenueBatchDialog.SetGridRows(batchRows); if (template == "DEV-Check-MG Payments") { Dialog.Cancel(); // cancel the unneeded popup } EnhancedRevenueBatchDialog.UpdateProjectedTotals(); //click on the update projected totals button and receive updated totals EnhancedRevenueBatchDialog.Validate(); //validate batch EnhancedRevenueBatchDialog.ClickButton("Update status", 50); // update the batch status EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_NEXTBATCHWORKFLOWTASKID_value')]", "Validate Data Totals and Other Information"); EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_OWNERID_value')]", "ad\\bbtest1.gst"); Dialog.WaitClick("//div[contains(@id,'dataformdialog_')]//button[text()='Save']", 20); //save the batch EnhancedRevenueBatchDialog.UpdateProjectedTotals(); //click on the update projected totals button and receive updated totals EnhancedRevenueBatchDialog.Validate(); //validate the batch EnhancedRevenueBatchDialog.ClickButton("Update status", 20); //update the status EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_NEXTBATCHWORKFLOWTASKID_value')]", "Special Review"); EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_OWNERID_value')]", "ad\\bbtest1.gst"); Dialog.WaitClick("//div[contains(@id,'dataformdialog_')]//button[text()='Save']", 20); //save the batch EnhancedRevenueBatchDialog.UpdateProjectedTotals(); //click on the update projected totals button and receive updated totals EnhancedRevenueBatchDialog.Validate(); //validate the batch EnhancedRevenueBatchDialog.ClickButton("Update status", 20); //update the status EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_NEXTBATCHWORKFLOWTASKID_value')]", "Commit Batch"); EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_OWNERID_value')]", "ad\\bbtest1.gst"); Dialog.WaitClick("//div[contains(@id,'dataformdialog_')]//button[text()='Save']", 20); //save the batch EnhancedRevenueBatchDialog.SaveAndClose(); } catch (Exception ex) { throw new Exception("Error: could not add a batch with specified template and description for a pledge. " + ex.Message); } }
public void WhenSaveTheBatchAndCommitIt(Table batch) { try { Dialog.OpenTab("Main"); EnhancedRevenueBatchDialog.UpdateProjectedTotals(); //click on the update projected totals button and receive updated totals BatchDialog.Validate(); //click the validate button BatchDialog.SaveAndClose(); WhenICommitTheBatch(batch); //commit the batch } catch (Exception ex) { throw new Exception("Error: could not save the batch and commit it. " + ex.Message); } }
public void WhenEditTheSelectedConstituent(Table fieldMappings) { try { //find just one specific constituent to edit. Save. if (fieldMappings.RowCount != 1) { throw new ArgumentException("Only provide one row of field values"); } EnhancedRevenueBatchDialog.EditConstituent(fieldMappings.Rows[0]); IndividualDialog.Save(); } catch (Exception ex) { throw new Exception("Error: could not edit selected constituent. " + ex.Message); } }
public void WhenIStartToAddABatchWithTemplateAndDescription(string template, string description, Table batchRows) { description += uniqueStamp; BBCRMHomePage.OpenRevenueFA(); RevenueFunctionalArea.BatchEntry(); BatchEntryPanel.AddBatch(template, description); foreach (var batchRow in batchRows.Rows) { if (batchRow.Keys.Contains("Constituent") && batchRow["Constituent"] != null && batchRow["Constituent"] != string.Empty) { batchRow["Constituent"] += uniqueStamp; } } BatchDialog.SetGridRows(batchRows); EnhancedRevenueBatchDialog.UpdateProjectedTotals(); }
public void WhenIAddABatchWithTemplateAndDescription(string template, string description, Table batchRows) { description += uniqueStamp; BBCRMHomePage.OpenRevenueFA(); RevenueFunctionalArea.BatchEntry(); BatchEntryPanel.AddBatch(template, description); foreach (var batchRow in batchRows.Rows) { if (batchRow.Keys.Contains("Constituent") && batchRow["Constituent"] != null && batchRow["Constituent"] != string.Empty) { batchRow["Constituent"] += uniqueStamp; } } EnhancedRevenueBatchDialog.SetGridRows(batchRows); Dialog.WaitClick("//button[./text()='Update projected totals']"); Dialog.WaitClick("//button[./text()='OK']"); BatchDialog.Validate(); BatchDialog.SaveAndClose(); }
public static void SetGridRow(TableRow batchRow, int row) { foreach (var caption in batchRow.Keys) { var value = batchRow[caption]; if (value == null) { continue; } EnhancedRevenueBatchDialog.SetGridCell(caption, value, row); //Check Revenue type for pop up dialog if ("Revenue type" == caption) { try { Dialog.ClickButton("OK", 10); } catch { } } } }
public void WhenApplyThePaymentToDesignations(Table designations) { EnhancedRevenueBatchDialog.Apply(designations); }
public void WhenSetTheRevenueTypeForRowTo(int rowIndex, string paymentMethod) { EnhancedRevenueBatchDialog.SetGridCell("Revenue type", paymentMethod, rowIndex); }
public void WhenISelectRevenueType(string revenueType) { EnhancedRevenueBatchDialog.SetGridCell("Revenue type", revenueType, 1); }
public void WhenSplitTheDesignations(Table designations) { EnhancedRevenueBatchDialog.SplitDesignations(designations, false); }
public void WhenSplitTheDesignationsEvenly(Table designations) { EnhancedRevenueBatchDialog.SplitDesignations(designations, true); // split the designations evenly }