public void Recognition_ApprovalMon_WS_924() { if (!DataParser.ReturnExecution("WS_924")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_924.xml"; string user = AwardData.GetAwardUserName(_file), award = AwardData.GetAwardName(_file), secondAward = AwardData.GetSecondAwardName(_file), populationImpact = AwardData.GetAwardPopulationImpact(_file), financialImpact = AwardData.GetAwardFinancialImpact(_file), bussinesImpact = AwardData.GetAwardBussinesImpact(_file); int amount = AwardData.GetAwardAmountValueNumbers(_file); string printype = AwardData.GetAwardDeliverType(_file), msg = AwardData.GetAwardMessage(_file), reason = AwardData.GetAwardReason(_file), companyValue = AwardData.GetAwardCompanyValue(_file), proxy_name = ProxyData.GetProxyUserName(_file), approval_name = AwardData.GetApprovalUserName(_file); ProxyHomePage proxyPage = InitialPage.Go().Logon().ClickLogin().NavigateToAdminHomePage() .LoginProxyAsuser().EnterUserName(proxy_name); MainHomePage home = proxyPage.ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + proxy_name, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); NominationHomePage recognitionPage = home.NavigateToNomination() .SearchEmployeeFound(user) .SelectAward(award) .EnterValueAmount(amount) .FillReason(reason) .ChkCompanyValues(companyValue) .SelectValues(populationImpact) .SelectValues(bussinesImpact) .SelectValues(financialImpact) .FillMsg(msg) .ClickNext(); recognitionPage.DeliverType(printype); Assert.AreEqual(2, recognitionPage.GetCountEditLnk(), "Edit links are not two"); recognitionPage.ClickSendRecognition(); Assert.AreEqual("Success!", recognitionPage.GetSuccesMsg(), "Message its not success"); AdminHomePage proxy = recognitionPage.ExitProxy(); home = proxy.LoginProxyAsuser().EnterUserName(approval_name).ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + approval_name, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); Assert.IsTrue(home.IsPopUpRecognitionShow(), "Pop up recognition is not showing up"); PendingApprovals pending = home.ClickHereAwardPopUp(); Assert.AreEqual("Pending Approvals", pending.GetTitleMenu(), "Title is not pending approval"); pending.ApproveAward().ClickApprove(); proxy = pending.ExitProxy(); home = proxy.LoginProxyAsuser().EnterUserName(user).ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + user, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); MyAwards awards = home.ClosePopUp().NavigateToMyAwards(); Assert.AreEqual(secondAward, awards.GetAwardName(1, 4), "The last award that someone gave you is not present"); awards.OpenDetailsAward(1, 7); } }
public void Approval_StandardMonAppvTextron_WS_927() { if (!DataParser.ReturnExecution("WS_927")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_927.xml"; string user = AwardData.GetAwardUserName(_file), award = AwardData.GetAwardName(_file), secondAward = AwardData.GetSecondAwardName(_file), populationImpact = AwardData.GetAwardPopulationImpact(_file), financialImpact = AwardData.GetAwardFinancialImpact(_file), bussinesImpact = AwardData.GetAwardBussinesImpact(_file), amount = AwardData.GetAwardAmountValue(_file), objetives = AwardData.GetAwardObjetives(_file), printype = AwardData.GetAwardDeliverType(_file), msg = AwardData.GetAwardMessage(_file), projectTask = AwardData.GetAwardProjectTask(_file), reason = AwardData.GetAwardReason(_file), proxy_name = ProxyData.GetProxyUserName(_file), approval_name = AwardData.GetApprovalUserName(_file); ProxyHomePage proxyPage = InitialPage.Go().Logon().ClickLogin().NavigateToAdminHomePage() .LoginProxyAsuser().EnterUserName(user); MainHomePage home = proxyPage.ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + user, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); Step2 step2 = home.NavigateToNomination() .SearchEmployeeFound(proxy_name) .SelectAward(award) .SelectValues(populationImpact) .SelectValues(financialImpact) .SelectValues(bussinesImpact) .ClickNextSameStep(); Assert.AreEqual("Appreciation Award", step2.GetAwardName("Appreciation Award"), "Award is not the same as expected"); Assert.AreEqual("Honors Award", step2.GetAwardName("Honors Award"), "Award is not the same as expected"); Assert.AreEqual("Excellence Award", step2.GetAwardName("Excellence Award"), "Award is not the same as expected"); Assert.AreEqual("Distinction Award", step2.GetAwardName("Distinction Award"), "Award is not the same as expected"); NominationHomePage recognitionPage = step2.SelectSecondAward(secondAward).SelectValueOfAward(amount) .SelectProjectTask(projectTask) .CheckProjectApproval() .SelectValues(objetives) .FillMsg(msg) .FillReason(reason) .ClickNext(); recognitionPage.DeliverType(printype); Assert.AreEqual(2, recognitionPage.GetCountEditLnk(), "Edit links are not two"); recognitionPage.ClickSendRecognition(); Assert.AreEqual("Success!", recognitionPage.GetSuccesMsg(), "Message its not success"); AdminHomePage proxy = recognitionPage.ExitProxy(); home = proxy.LoginProxyAsuser().EnterUserName(approval_name).ProxyToMainHomePage(); Assert.IsTrue(home.IsPopUpRecognitionShow(), "Pop up recognition is not showing up"); PendingApprovals pending = home.ClickHereAwardPopUp(); Assert.AreEqual("Pending Approvals", pending.GetTitleMenu(), "Title is not pending approval"); pending.ApproveAward().ClickApprove(); proxy = pending.ExitProxy(); home = proxy.LoginProxyAsuser().EnterUserName(proxy_name).ProxyToMainHomePage(); MyAwards awards = home.ClosePopUp().NavigateToMyAwards(); Assert.AreEqual(secondAward, awards.GetAwardName(1, 6), "The last award that someone gave you is not present"); awards.OpenDetailsAward(1, 7); } }
public void Award_Wizard_WS_1345_Sample1() { if (!DataParser.ReturnExecution("WS_1345_Sample1")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1345_Sample1.xml"; string user = AwardData.GetAwardUserName(_file), award = AwardData.GetAwardName(_file), financialImpact = AwardData.GetAwardFinancialImpact(_file), bussinesImpact = AwardData.GetAwardBussinesImpact(_file); NominationHomePage recognitionPage = InitialPage.GoSpecial(_file).Logon().ClickLogin() .NavigateToNominationSpan(); recognitionPage .SearchEmployeeFoundAngular(user) .SelectAward(award).SelectValues(bussinesImpact).SelectValues(financialImpact); Assert.AreEqual("I want to Email this award.", recognitionPage.GetDeliverLabel("email"), "Label is not correct"); } }
public void Awards_RemoveFromOtherAppQueue_WS_1111() { if (!DataParser.ReturnExecution("WS_1111")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1111.xml"; string user = AwardData.GetAwardUserName(_file), award = AwardData.GetAwardName(_file), customerImpact = AwardData.GetAwardCustomerImpact(_file), bussinesImpact = AwardData.GetAwardBussinesImpact(_file), printype = AwardData.GetAwardDeliverType(_file), msg = AwardData.GetAwardMessage(_file), reason = AwardData.GetAwardReason(_file), proxy_name = ProxyData.GetProxyUserName(_file), approval_name = AwardData.GetApprovalUserName(_file); Step2 step2 = InitialPage.Go().Logon().ClickLogin().NavigateToNominationSpan() .SearchEmployeeFound(user) .SelectAward(award); Assert.AreEqual("This award is worth $250.00", step2.GetValueAward(), "the message is not right"); NominationHomePage recognitionPage = step2.SelectSameValues(customerImpact, 1) .FillMsg(msg) .FillReason(reason) .ClickNext(); step2.SelectSameValues(bussinesImpact, 0).ClickNext(); recognitionPage.DeliverType(printype); Assert.AreEqual(2, recognitionPage.GetCountEditLnk(), "Edit links are not two"); recognitionPage.ClickSendRecognition(); Assert.AreEqual("Success!", recognitionPage.GetSuccesMsg(), "Message its not success"); MainHomePage home = recognitionPage.NavigateToAdminHomePageSpan().EnterUserName(proxy_name).ProxyToMainHomePage(); Assert.IsTrue(home.IsPopUpRecognitionShow(), "Pop up recognition is not showing up"); PendingApprovals change = home.ClickHereAwardPopUp(); Assert.AreEqual("Pending Approvals", change.GetTitleMenu(), "Title is not pending approval"); change.ApproveAward().ClickApprove(); Assert.AreEqual("Pending Approvals", change.GetTitleMenu(), "Title is not pending approval"); home = change.ExitProxyToMainPage().NavigateToAdminHomePageSpan().NavigateToAdminHomePageSpan().EnterUserName(approval_name).ProxyToMainHomePage(); Assert.IsFalse(home.IsPopUpRecognitionShow(), "Pop up recognition is showing up"); } }