public void VerifyESSDashboardQuickLaunchElements() { #region string[] expectedData = new string[] { "Apply Leave", "My Leave", "My Timesheet" }; string firstName = "Karen"; string middleName = "Ann"; string lastName = "Smith"; bool createLoginDetails = true; string userName = "******"; string password = "******"; string statusEnabled = "Enabled"; #endregion // Cretae an ESS user Home.GoTo(); Home.LoginAsAdmin(); Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(firstName, middleName, lastName, createLoginDetails, userName, password, statusEnabled); Home.Logout(); // Login as ESS user //Home.GoTo(); Home.Login(userName, password); Menu.Dashboard.GoTo(); Assert.IsTrue(Dashboard.ESSDashboard.HasCorrectQuickLaunchOptions(expectedData), "The ESS Dashboard is missing expected panels!"); Home.Logout(); }
public void VerifyESSDashboardQuickLaunchApplyLeave() { #region string firstName = "Olive"; string middleName = "Ann"; string lastName = "Smith"; bool createLoginDetails = true; string userName = "******"; string password = "******"; string statusEnabled = "Enabled"; string pageName = "Apply Leave"; #endregion // Cretae an ESS user Home.GoTo(); Home.LoginAsAdmin(); Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(firstName, middleName, lastName, createLoginDetails, userName, password, statusEnabled); Home.Logout(); // Login as ESS user //Home.GoTo(); Home.Login(userName, password); Menu.Dashboard.GoTo(); Dashboard.ESSDashboard.SelectApplyLeave(); Assert.IsTrue(Dashboard.IsCorrectPage(pageName), "The Apply Leave link did not go to the expected screen!"); Home.Logout(); }
public void ActivatePreviouslyTerminatedContractEmployee() { // New Employee data #region string userName = ""; string password = ""; string firstName = "Charlotte"; string middleName = "Elise"; string lastName = "Anderson"; bool createLoginDetails = false; string statusEnabled = ""; string eeName = firstName + " " + middleName + " " + lastName; #endregion // Job data #region string jobTitle = "Account Clerk"; string empStatus = "Full-Time Contract"; string jobCat = "Office and Clerical Workers"; string joinDate = "2018-01-01"; string subUnit = "Finance"; string location = "New York Sales Office"; string ecStartDate = "2018-01-01"; string ecEndDate = "2019-12-31"; #endregion // Termination data #region string reason = "Contract Not Renewed"; string date = "2019-12-31"; string note = "Eligible for re-hire at another time."; #endregion Home.GoTo(); Home.LoginAsAdmin(); // Create a new Employee Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(firstName, middleName, lastName, createLoginDetails, userName, password, statusEnabled); // Add a job to the employee Menu.PIM.EmployeeList.GoTo(); EmployeeList.SearchForEmployee(eeName); Employee.AddJob(EmployeeList.SelectEmployeeInTableById(), jobTitle, empStatus, jobCat, joinDate, subUnit, location, ecStartDate, ecEndDate); // Terminate the Employees employment Menu.PIM.EmployeeList.GoTo(); EmployeeList.SearchForEmployee(eeName); Employee.TerminateEmployee(EmployeeList.SelectEmployeeInTableById(), reason, date, note); // Reactivate the Employees employment Menu.PIM.EmployeeList.GoTo(); EmployeeList.SearchForPastEmployee(eeName); Employee.ActivateEmployee(EmployeeList.SelectEmployeeInTableById()); Assert.IsTrue(Job.IsActiveEmployee(eeName), "Contract Employee was not Activated successfully."); Home.Logout(); }
public void ActivatePreviouslyTerminatedEmployee() { // New Employee data #region string userName = "******"; string password = "******"; string firstName = "Richard"; string middleName = "E."; string lastName = "Allen"; bool createLoginDetails = true; string statusEnabled = "Enabled"; string eeName = firstName + " " + middleName + " " + lastName; #endregion // Job data #region string jobTitle = "Finance Manager"; string empStatus = "Full-Time Permanent"; string jobCat = "Officials and Managers"; string joinDate = "1995-06-01"; string subUnit = "Finance"; string location = "HQ - CA, USA"; string ecStartDate = ""; string ecEndDate = ""; #endregion // Termination data #region string reason = "Retired"; string date = "2018-11-30"; string note = ""; #endregion Home.GoTo(); Home.LoginAsAdmin(); // Create a new Employee Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(firstName, middleName, lastName, createLoginDetails, userName, password, statusEnabled); // Add a job to the employee Menu.PIM.EmployeeList.GoTo(); EmployeeList.SearchForEmployee(eeName); Employee.AddJob(EmployeeList.SelectEmployeeInTableById(), jobTitle, empStatus, jobCat, joinDate, subUnit, location, ecStartDate, ecEndDate); // Terminate the Employees employment Menu.PIM.EmployeeList.GoTo(); EmployeeList.SearchForEmployee(eeName); Employee.TerminateEmployee(EmployeeList.SelectEmployeeInTableById(), reason, date, note); // Reactivate the Employees employment Menu.PIM.EmployeeList.GoTo(); EmployeeList.SearchForPastEmployee(eeName); Employee.ActivateEmployee(EmployeeList.SelectEmployeeInTableById()); Assert.IsTrue(Job.IsActiveEmployee(eeName), "Employee was not Activated successfully."); Home.Logout(); }
public void CreateESSUser() { Home.LoginAsAdmin(); Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(_firstName, _middleName, _lastName, _createLoginDetails, _userName, _password, _statusEnabled); Home.Logout(); }
public void DeleteAnESSUser() { Home.LoginAsAdmin(); // Create a user Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(_firstName, _middleName, _lastName, _createLoginDetails); // Delete a user Menu.PIM.EmployeeList.GoTo(); EmployeeList.DeleteEmployee(_firstName, _middleName, _lastName); Home.Logout(); }
public void DeleteWorkShiftEmployeesAssigned() { // Work shift data #region string shiftName = "Work Shift 2"; string from = "08:00"; string to = "12:00"; #endregion Home.GoTo(); Home.LoginAsAdmin(); // Add employees Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(_firstName1, _middleName1, _lastName1, _createLoginDetails); Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(_firstName2, _middleName2, _lastName2, _createLoginDetails); // Create a work shift and assign employees to work it Menu.Admin.Job.WorkShifts.GoTo(); WorkShifts.AddWorkShift(shiftName, from, to); // Assign employees - the list takes first + middle + last string employee1 = _firstName1 + " " + _middleName1 + " " + _lastName1; string employee2 = _firstName2 + " " + _middleName2 + " " + _lastName2; // Assign some employees string[] employees = { employee1, employee2 }; WorkShifts.AssignEmployeeToWorkShift(shiftName, employees); // Remove employees from work shift WorkShifts.DeleteEmployeeFromWorkShift(shiftName, employees); Assert.IsTrue(WorkShifts.WorkShiftEmployeesCorrectlyRemoved(shiftName, employees), $"The employees were not correctly added."); // Cleanup Menu.PIM.EmployeeList.GoTo(); EmployeeList.DeleteEmployee(_firstName1, _middleName1, _lastName1); EmployeeList.DeleteEmployee(_firstName2, _middleName2, _lastName2); Menu.Admin.Job.WorkShifts.GoTo(); WorkShifts.DeleteWorkShift(shiftName); Home.Logout(); }
public void AddContractorSalary() { // Contractor data #region string userName = ""; string password = ""; string firstName = "Charlotte"; string middleName = "Elise"; string lastName = "Anderson"; bool createLoginDetails = false; string statusEnabled = ""; string eeName = firstName + " " + middleName + " " + lastName; #endregion // Salary components #region string payGrade = ""; string salaryComponent = "Base"; string payFrequency = "Monthly"; string currency = "United States Dollar"; string amount = "65000"; string comments = "Base salary."; bool directDeposit = true; string accountNumber = "123456789"; string accountType = "Savings"; string pleaseSpecify = ""; string routingNumber = "987654321"; decimal amountDeposit = 5000.00m; #endregion Home.GoTo(); Home.LoginAsAdmin(); //AdminLandingPage.NavigateToEmployeeList(); Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(firstName, middleName, lastName, createLoginDetails, userName, password, statusEnabled); Menu.PIM.EmployeeList.GoTo(); EmployeeList.SearchForEmployee(eeName); Employee.AddSalary(EmployeeList.SelectEmployeeInTableById(), payGrade, salaryComponent, currency, amount, directDeposit, accountNumber, accountType, pleaseSpecify, routingNumber, amountDeposit, payFrequency, comments); Assert.IsTrue(AssignedSalaryComponents.SalaryCorrectlyAdded(payGrade, salaryComponent, currency, amount, directDeposit, accountNumber, accountType, pleaseSpecify, routingNumber, amountDeposit, payFrequency, comments), "Salary was not added successfully."); Home.Logout(); }
public void AddContractorJob() { // Contractor data #region string userName = ""; string password = ""; string firstName = "Charlotte"; string middleName = "Elise"; string lastName = "Anderson"; bool createLoginDetails = false; string statusEnabled = ""; string eeName = firstName + " " + middleName + " " + lastName; #endregion // Job data #region string jobTitle = "Account Clerk"; string empStatus = "Full-Time Contract"; string jobCat = "Office and Clerical Workers"; string joinDate = "2018-01-01"; string subUnit = "Finance"; string location = "New York Sales Office"; string ecStartDate = "2018-01-01"; string ecEndDate = "2019-12-31"; #endregion Home.GoTo(); Home.LoginAsAdmin(); //AdminLandingPage.NavigateToEmployeeList(); Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(firstName, middleName, lastName, createLoginDetails, userName, password, statusEnabled); //AdminLandingPage.NavigateToEmployeeList(); Menu.PIM.EmployeeList.GoTo(); EmployeeList.SearchForEmployee(eeName); Employee.AddJob(EmployeeList.SelectEmployeeInTableById(), jobTitle, empStatus, jobCat, joinDate, subUnit, location, ecStartDate, ecEndDate); Assert.IsTrue(Job.JobCorrectlyAdded(jobTitle, empStatus, jobCat, joinDate, subUnit, location, ecStartDate, ecEndDate), "Job was not added successfully."); Home.Logout(); }
public void SetupTimesheetPeriod() { string firstDayOfWeek = "Monday"; #region // Project Data string projectAdmin = _firstName + " " + _middleName + " " + _lastName; #endregion Home.LoginAsAdmin(); Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(_firstName, _middleName, _lastName, _createLoginDetails, _userName, _password, _statusEnabled); Menu.Time.GoTo(); // Test to see if FirstDayOfWeek exists, if it does set it to Monday if (Time.DefineTimesheetPeriod.IsDefineTimesheetPeriodDisplayed() == true) { Time.SetFirstDayOfWeek(firstDayOfWeek); } // Setup Project // Add new Customer Menu.Time.ProjectInfo.Customers.GoTo(); Customers.AddNewCustomer(_customerName, _customerDescription); // Add Project and create new customer Menu.Time.ProjectInfo.Projects.GoTo(); Projects.AddNewProject(_customerName, _projectName, projectAdmin, _projectDescription); Projects.AddProjectActivity(_activityName1); Projects.AddProjectActivity(_activityName2); Home.Logout(); }
public void VerifyESSDashboardElements() { #region string[] expectedData = new string[] { "Quick Launch" }; string firstName = "Michael"; string middleName = "W"; string lastName = "Smith"; bool createLoginDetails = true; string userName = "******"; string password = "******"; string statusEnabled = "Enabled"; #endregion // Cretae an ESS user Home.GoTo(); Home.LoginAsAdmin(); Menu.PIM.EmployeeList.GoTo(); EmployeeList.AddEmployeeViaButton(firstName, middleName, lastName, createLoginDetails, userName, password, statusEnabled); Home.Logout(); // Login as ESS user //Home.GoTo(); Home.Login(userName, password); Menu.Dashboard.GoTo(); Assert.IsTrue(Dashboard.ESSDashboard.HasCorrectPanels(expectedData), "The ESS Dashboard is missing expected panels!"); Home.Logout(); // Delete ESS User //Home.GoTo(); //Home.LoginAsAdmin(); //Menu.PIM.EmployeeList.GoTo(); //EmployeeList.DeleteEmployee(); //Home.Logout(); }