public void ExecuteBalanceOnEmployeesCrosstab() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openBalanceReportMenu(driver); PortalUtils.selectBalanceOnEmployeesCrosstab(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Balance on employees crosstab automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Traci Reynolds"); WizardUtils.setAccountFilter(driver, "Holiday held"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "126, Traci Reynolds", 120); PortalUtils.saveReport(driver); PortalUtils.closeBalanceReportMenu(driver); PortalUtils.Logout(driver); }
/// <summary> /// Determines whether all wizard specific information is on the user session. /// </summary> /// <param name="engineContext">The engine context.</param> /// <param name="controller">The controller.</param> /// <param name="controllerContext">The controller context.</param> /// <returns> /// <c>true</c> if has session data; otherwise, <c>false</c>. /// </returns> protected bool HasRequiredSessionData(IEngineContext engineContext, IController controller, IControllerContext controllerContext) { var wizardName = WizardUtils.ConstructWizardNamespace(controllerContext); return(engineContext.Session.Contains(wizardName + "currentstepindex") && engineContext.Session.Contains(wizardName + "currentstep")); }
/// <summary> /// Starts the wizard by adding the required information to the /// session and invoking <see cref="IWizardController.OnWizardStart"/> /// and detecting the first step. /// </summary> /// <param name="engineContext">The engine context.</param> /// <param name="controller">The controller.</param> /// <param name="controllerContext">The controller context.</param> /// <param name="redirect">if set to <c>true</c>, a redirect /// will be issued to the first step.</param> protected void StartWizard(IEngineContext engineContext, IController controller, IControllerContext controllerContext, bool redirect) { ResetSteps(engineContext, controller); var wizardController = (IWizardController)controller; var stepList = (IList)engineContext.Items["wizard.step.list"]; var firstStep = (String)stepList[0]; var wizardName = WizardUtils.ConstructWizardNamespace(controllerContext); engineContext.Session[wizardName + "currentstepindex"] = 0; engineContext.Session[wizardName + "currentstep"] = firstStep; wizardController.OnWizardStart(); if (redirect) { if (wizardController.UseCurrentRouteForRedirects) { engineContext.Response.RedirectUsingRoute(controllerContext.Name, firstStep, true); } else { engineContext.Response.Redirect(controllerContext.AreaName, controllerContext.Name, firstStep); } } }
private void InternalRedirectToStep(IEngineContext engineContext, int stepIndex, String step, IDictionary queryStringParameters) { WizardUtils.RegisterCurrentStepInfo(engineContext, wizardParentController, wizardcontrollerContext, stepIndex, step); // Does this support areas? var urlBuilder = engineContext.Services.GetService <IUrlBuilder>(); if (queryStringParameters != null && queryStringParameters.Count != 0) { if (WizardController.UseCurrentRouteForRedirects) { var dictionary = new Dictionary <string, string>(wizardcontrollerContext.RouteMatch.Parameters); dictionary["action"] = step; var parameters = UrlBuilderParameters.From(queryStringParameters, dictionary); RedirectToUrl(urlBuilder.BuildUrl(engineContext.UrlInfo, parameters)); } else { Redirect(WizardControllerContext.AreaName, wizardcontrollerContext.Name, step, queryStringParameters); } } else if (Context.Request.QueryString.HasKeys()) { // We need to preserve any attribute from the QueryString // for example in case the url has an Id if (WizardController.UseCurrentRouteForRedirects) { var queryParameters = new Dictionary <string, string>(); foreach (var key in Query.AllKeys) { queryParameters.Add(key, Query[key]); } var parameters = UrlBuilderParameters.From(queryParameters, wizardcontrollerContext.RouteMatch.Parameters); RedirectToUrl(urlBuilder.BuildUrl(engineContext.UrlInfo, parameters)); } else { Redirect(WizardControllerContext.AreaName, wizardcontrollerContext.Name, step, Query); } } else { if (WizardController.UseCurrentRouteForRedirects) { RedirectUsingRoute(step, true); } else { Redirect(WizardControllerContext.AreaName, wizardcontrollerContext.Name, step); } } }
/// <summary> /// Invoked when a step is accessed on the url, /// i.e. http://host/mywizard/firststep.rails and /// when an inner action is invoked like http://host/mywizard/firststep-save.rails /// </summary> /// <param name="engineContext">The engine context.</param> /// <param name="controller">The controller.</param> /// <param name="controllerContext">The controller context.</param> private object OnStepActionRequested(IEngineContext engineContext, IController controller, IControllerContext controllerContext) { if (currentStepInstance != null && !HasRequiredSessionData(engineContext, controller, controllerContext)) { StartWizard(engineContext, controller, controllerContext, false); } controllerContext.SelectedViewName = null; var wizController = (IWizardController)controller; var wizardName = WizardUtils.ConstructWizardNamespace(controllerContext); var currentStep = (String)engineContext.Session[wizardName + "currentstep"]; // If OnBeforeStep returns false we stop if (!wizController.OnBeforeStep(wizardName, currentStep, currentStepInstance)) { return(null); } var stepMetaDescriptor = engineContext.Services.ControllerDescriptorProvider.BuildDescriptor(currentStepInstance); // Record the step we're working with WizardUtils.RegisterCurrentStepInfo(engineContext, controller, controllerContext, currentStepInstance.ActionName); try { var stepContext = engineContext.Services.ControllerContextFactory.Create( controllerContext.AreaName, controllerContext.Name, innerAction, stepMetaDescriptor, controllerContext.RouteMatch); stepContext.PropertyBag = controllerContext.PropertyBag; SetUpWizardHelper(engineContext, wizController, currentStepInstance, stepContext); // IsPreConditionSatisfied might need the controller's context if (currentStepInstance is Controller) { ((Controller)currentStepInstance).Contextualize(engineContext, stepContext); } // The step cannot be accessed in the current state of matters if (!currentStepInstance.IsPreConditionSatisfied(engineContext)) { return(null); } currentStepInstance.Process(engineContext, stepContext); return(null); } finally { wizController.OnAfterStep(wizardName, currentStep, currentStepInstance); } }
protected bool HasRequiredSessionData(Controller controller) { String wizardName = WizardUtils.ConstructWizardNamespace(controller); IRailsEngineContext context = controller.Context; return(context.Session.Contains(wizardName + "currentstepindex") && context.Session.Contains(wizardName + "currentstep")); }
public void ExecuteJobEfficiencyPerOrder() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openJobReportMenu(driver); PortalUtils.selectEfficiencyPerOrder(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Job report - Efficiency per order automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "01/01/2008 12:00 AM"); WizardUtils.setPeriodEnd(driver, "10/6/2016 11:59 PM"); //WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.clickNextPeriod(driver); //WizardUtils.setOrderFilter(driver, "Propc Order"); //WizardUtils.setWorkcenterFilter(driver, "Workcenter propc"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "89456, SelfSerive", 120); PortalUtils.saveReport(driver); PortalUtils.closeJobReportMenu(driver); PortalUtils.Logout(driver); }
private void InternalRedirectToStep(int stepIndex, String step) { WizardUtils.RegisterCurrentStepInfo(_wizardcontroller, stepIndex, step); // We need to preserve any attribute from the QueryString // for example in case the url has an Id if (Context.Request.QueryString.HasKeys()) { String url = UrlInfo.CreateAbsoluteRailsUrl(Context.ApplicationPath, _wizardcontroller.Name, step, Context.UrlInfo.Extension) + Context.Request.Uri.Query; Context.Response.Redirect(url); } else { Context.Response.Redirect(_wizardcontroller.Name, step); } }
public void ExecuteCrosstabByEmployeeByDates() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openPeriodReportMenu(driver); PortalUtils.selectCrosstabByEmployeeByDates(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Period report - Crosstab by employee dates automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "01/08/2016 00:00"); WizardUtils.setPeriodEnd(driver, "31/08/2016 23:59"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Traci Reynolds"); WizardUtils.setAccountFilter(driver, "Holiday held"); //WizardUtils.setAccountFilter(driver, "Holiday account"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "126, Traci, Reynolds", 120); PortalUtils.saveReport(driver); //PortalUtils.clickOKConfirmation(driver); PortalUtils.closePeriodReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteWorkingTimeDirective8HoursPerDay() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openPeriodReportMenu(driver); PortalUtils.selectWorkingTimeDirective8HoursPerDay(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Period report - Working Time Directive 8 hours per day - automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "01/08/2016 00:00"); WizardUtils.setPeriodEnd(driver, "31/08/2016 23:59"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Traci Reynolds"); WizardUtils.clickNextPeriod(driver); //WizardUtils.setAccountFilter(driver, "Holiday account"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "126, Traci Reynolds", 120); PortalUtils.saveReport(driver); //PortalUtils.clickOKConfirmation(driver); PortalUtils.closePeriodReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteTotalAccountsGroupedOnWeekDays() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openPeriodReportMenu(driver); PortalUtils.selectTotalAccountsGroupedOnWeekdays(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Period report - Account accounts grouped on weekdays automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "01/08/2016 00:00"); WizardUtils.setPeriodEnd(driver, "31/08/2016 23:59"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Traci Reynolds"); //WizardUtils.setAccountFilter(driver, "Holiday account"); WizardUtils.setTerminalFilter(driver, "Terminal filter"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "0040, Holiday held", 120); PortalUtils.saveReport(driver); //PortalUtils.clickOKConfirmation(driver); PortalUtils.closePeriodReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteAML() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openPeriodReportMenu(driver); PortalUtils.selectAML(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Period report - AML Automated execution"); //izardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "01/08/2016 00:00"); WizardUtils.setPeriodEnd(driver, "31/08/2016 23:59"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Traci Reynolds"); WizardUtils.clickNextPeriod(driver); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "126, Traci Reynolds", 120); PortalUtils.saveReport(driver); //PortalUtils.clickOKConfirmation(driver); PortalUtils.closePeriodReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteJobEfficiencyPerEmployee() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openJobReportMenu(driver); PortalUtils.selectEfficiencyPerEmployee(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Job report - Efficiency per employee automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "01/01/2016 00:00"); WizardUtils.setPeriodEnd(driver, "31/12/2016 23:59"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "William Hazel"); WizardUtils.clickNextPeriod(driver); //WizardUtils.setAccountFilter(driver, "Holiday held"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "114, William Hazel", 120); PortalUtils.saveReport(driver); PortalUtils.closeJobReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteExpenseMileageRegistrations() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openExpenseReportMenu(driver); PortalUtils.selectMileageRegistrations(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Expense report - Mileage registration automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "1/1/2016 12:00 AM"); WizardUtils.setPeriodEnd(driver, "8/5/2016 11:59 PM"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Diedra Frazier"); WizardUtils.clickNextPeriod(driver); WizardUtils.clickRunFilter(driver); //WizardUtils.setAccountFilter(driver, "Albertslund"); PortalUtils.waitForTextInReport(driver, "39869713", 180); PortalUtils.saveReport(driver); PortalUtils.closeExpenseReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteAccountTotalsPerDepartment() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openPeriodReportMenu(driver); PortalUtils.selectAccountTotalsPerDepartment(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Period report - Account totals per department automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "8/1/2016 12:00 AM"); WizardUtils.setPeriodEnd(driver, "8/5/2016 11:59 PM"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Traci Reynolds"); WizardUtils.setAccountFilter(driver, "Holiday held"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "Holiday held", 120); PortalUtils.saveReport(driver); // PortalUtils.clickOKConfirmation(driver); PortalUtils.closePeriodReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteReasonRegistrations() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openPeriodReportMenu(driver); PortalUtils.selectReasonRegistrations(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Period report - Reason registration automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "8/1/2016 12:00 AM"); WizardUtils.setPeriodEnd(driver, "8/5/2016 11:59 PM"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Traci Reynolds"); WizardUtils.setAbsenceReasonFilter(driver, "Work from home"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "126, Traci Reynolds", 120); PortalUtils.saveReport(driver); //PortalUtils.clickOKConfirmation(driver); PortalUtils.closePeriodReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteAccountRegistrationGroupedByAccounts() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openPeriodReportMenu(driver); PortalUtils.selectAccountRegistrationGroupedByAccounts(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Period report - Account Registration grouped by accounts automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "1/8/2016 12:00 AM"); WizardUtils.setPeriodEnd(driver, "28/09/2016 11:59 PM"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Traci Reynolds"); WizardUtils.setAccountFilter(driver, "Holiday held"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "126, Traci Reynolds", 120); PortalUtils.saveReport(driver); //PortalUtils.clickOKConfirmation(driver); PortalUtils.closePeriodReportMenu(driver); PortalUtils.Logout(driver); }
/// <summary> /// Sends a redirect to the previous wizard step /// </summary> /// <exception cref="RailsException"> /// if no previous step exists (ie. already in the first one)</exception> protected void RedirectToPreviousStep() { String wizardName = WizardUtils.ConstructWizardNamespace(_wizardcontroller); int currentIndex = (int)Context.Session[wizardName + "currentstepindex"]; IList stepList = (IList)Context.UnderlyingContext.Items["wizard.step.list"]; if ((currentIndex - 1) >= 0) { int prevStepIndex = currentIndex - 1; String prevStep = (String)stepList[prevStepIndex]; InternalRedirectToStep(prevStepIndex, prevStep); } else { throw new RailsException("No previous step available"); } }
/// <summary> /// Sends a redirect to the previous wizard step /// </summary> /// <exception cref="MonoRailException"> /// if no previous step exists (ie. already in the first one)</exception> protected virtual void RedirectToPreviousStep(IDictionary queryStringParameters) { var wizardName = WizardUtils.ConstructWizardNamespace(wizardcontrollerContext); var currentIndex = (int)Context.Session[wizardName + "currentstepindex"]; var stepList = (IList)Context.Items["wizard.step.list"]; if ((currentIndex - 1) >= 0) { var prevStepIndex = currentIndex - 1; var prevStep = (String)stepList[prevStepIndex]; InternalRedirectToStep(Context, prevStepIndex, prevStep, queryStringParameters); } else { throw new MonoRailException("There is no previous step available"); } }
public void ExecuteBalanceOnPeriod() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openBalanceReportMenu(driver); PortalUtils.selectBalancesOnPeriod(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Balance on period automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "1/9/2016 12:00 AM"); WizardUtils.setPeriodEnd(driver, "28/9/2016 11:59 PM"); //WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Traci Reynolds"); WizardUtils.setAccountFilter(driver, "Holiday held"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "126, Traci Reynolds", 120); PortalUtils.saveReport(driver); PortalUtils.closeBalanceReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteJobRegistrations() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openJobReportMenu(driver); PortalUtils.selectJobRegistration(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Job report - Job Registration automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "1/1/2000 12:00 AM"); WizardUtils.setPeriodEnd(driver, "10/6/2016 11:59 PM"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setOrderFilter(driver, "Order 89456"); WizardUtils.setWorkcenterFilter(driver, "Workcenter dev"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "89456, SelfSerive", 120); PortalUtils.saveReport(driver); PortalUtils.closeJobReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteJobAccountWorkcenterOrder() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openJobReportMenu(driver); PortalUtils.selectAccountWorkcenterOrder(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Job report - Account Workcenter Order automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "10/6/2008 12:00 AM"); WizardUtils.setPeriodEnd(driver, "10/6/2016 11:59 PM"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setWorkcenterFilter(driver, "Workcenter dev"); //WizardUtils.setAccountFilter(driver, "Filter multi account"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "JJ, Jobkonto", 120); PortalUtils.saveReport(driver); PortalUtils.closeJobReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteTerminalRegistrations() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openPeriodReportMenu(driver); PortalUtils.selectTerminalRegistrations(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Period report - Terminal filters automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "8/1/2016 12:00 AM"); WizardUtils.setPeriodEnd(driver, "8/5/2016 11:59 PM"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setTerminalFilter(driver, "Terminal Filter"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "4040, Romania", 120); PortalUtils.saveReport(driver); //PortalUtils.clickOKConfirmation(driver); PortalUtils.closePeriodReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteJobDepartmentEmployeeEfficiency() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openJobReportMenu(driver); PortalUtils.selectDepartmentEmployeeEfficiency(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Job report - Department employee efficiency automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "8/1/2015 12:00 AM"); WizardUtils.setPeriodEnd(driver, "8/1/2016 11:59 PM"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Theodore Hooks"); WizardUtils.clickNextPeriod(driver); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "9, Theodore Hooks", 120); PortalUtils.saveReport(driver); PortalUtils.closeJobReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteProjectActivityRegistrations() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openProjectReportMenu(driver); PortalUtils.selectProjectActivityRegistrations(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Project report - Project Activity registrations automated execution"); // WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "01/08/2015 00:00"); WizardUtils.setPeriodEnd(driver, "30/08/2016 23:59"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "Theodore Hooks"); WizardUtils.setProjectFilter(driver, "Project 00"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "9, Theodore Hooks", 120); PortalUtils.saveReport(driver); PortalUtils.closeProjectReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteProjectActivityExtraInformation() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openProjectReportMenu(driver); PortalUtils.selectProjectActivityExtraInformation(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Project report - Project Activity extra information automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "1/8/2016 12:00 AM"); WizardUtils.setPeriodEnd(driver, "31/8/2016 11:59 PM"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); WizardUtils.setEmployeeFilter(driver, "William Hazel"); WizardUtils.setProjectFilter(driver, "ProReport Project"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "46012, TEST: ProReport", 120); PortalUtils.saveReport(driver); PortalUtils.closeProjectReportMenu(driver); PortalUtils.Logout(driver); }
public void ExecuteRateOfStaffTurnOver() { PortalUtils.Login(driver, "autom", "1234"); PortalUtils.setUserRole(driver); PortalUtils.openPeriodReportMenu(driver); PortalUtils.selectRateOfStaffTurnOver(driver); PortalUtils.runReportButton(driver); WizardUtils.setDescription(driver, "Period report - RateOfStaffTurnOver automated execution"); //WizardUtils.setExpiryDate(driver, "31/12/2017"); WizardUtils.clickNextExpiry(driver); WizardUtils.setPeriodStart(driver, "01/08/2015 00:00"); WizardUtils.setPeriodEnd(driver, "30/08/2016 23:59"); WizardUtils.setPeriodValuesSwitch(driver); WizardUtils.clickNextPeriod(driver); //WizardUtils.setEmployeeFilter(driver, "Theodore Hooks"); WizardUtils.clickRunFilter(driver); PortalUtils.waitForTextInReport(driver, "106, Kevin Rowe", 120); PortalUtils.saveReport(driver); PortalUtils.closePeriodReportMenu(driver); PortalUtils.Logout(driver); }
/// <summary> /// Invoked when a step is accessed on the url, /// i.e. http://host/mywizard/firststep.rails and /// when an inner action is invoked like http://host/mywizard/firststep-save.rails /// </summary> /// <param name="controller"></param> private void OnStepActionRequested(Controller controller) { controller.CancelView(); IRailsEngineContext context = controller.Context; IWizardController wizController = (IWizardController)controller; String wizardName = WizardUtils.ConstructWizardNamespace(controller); String currentStep = (String)context.Session[wizardName + "currentstep"]; // The step will inherit the controller property bag, // this way filters can pass values to the step property without having to know it currentStepInstance.PropertyBag = controller.PropertyBag; if (!wizController.OnBeforeStep(wizardName, currentStep, currentStepInstance)) { return; } WizardUtils.RegisterCurrentStepInfo(controller, currentStepInstance.ActionName); if (innerAction == null || innerAction == String.Empty) { currentStepInstance.Process( controller.Context, controller.ServiceProvider, urlInfo.Area, urlInfo.Controller, "RenderWizardView"); } else { currentStepInstance.Process( controller.Context, controller.ServiceProvider, urlInfo.Area, urlInfo.Controller, innerAction); } wizController.OnAfterStep(wizardName, currentStep, currentStepInstance); }
/// <summary> /// Sends a redirect to the next wizard step (if it exists) /// </summary> /// <exception cref="RailsException">if no further step exists</exception> protected void RedirectToNextStep() { String wizardName = WizardUtils.ConstructWizardNamespace(_wizardcontroller); int currentIndex = (int)Context.Session[wizardName + "currentstepindex"]; IList stepList = (IList)Context.UnderlyingContext.Items["wizard.step.list"]; if ((currentIndex + 1) < stepList.Count) { int nextStepIndex = currentIndex + 1; String nextStep = (String)stepList[nextStepIndex]; WizardUtils.RegisterCurrentStepInfo(_wizardcontroller, nextStepIndex, nextStep); InternalRedirectToStep(nextStepIndex, nextStep); } else { throw new RailsException("No next step available"); } }
/// <summary> /// Sends a redirect to the next wizard step (if it exists) /// </summary> /// <exception cref="MonoRailException">if no further step exists</exception> protected virtual void RedirectToNextStep(IDictionary queryStringParameters) { var wizardName = WizardUtils.ConstructWizardNamespace(ControllerContext); var currentIndex = (int)Context.Session[wizardName + "currentstepindex"]; var stepList = (IList)Context.Items["wizard.step.list"]; if ((currentIndex + 1) < stepList.Count) { var nextStepIndex = currentIndex + 1; var nextStep = (String)stepList[nextStepIndex]; WizardUtils.RegisterCurrentStepInfo(Context, wizardParentController, ControllerContext, nextStepIndex, nextStep); InternalRedirectToStep(Context, nextStepIndex, nextStep, queryStringParameters); } else { throw new MonoRailException("There is no next step available"); } }