Example #1
0
 public void WS_1064()
 {
     if (!DataParser.ReturnExecution("WS_1064"))
     {
         Assert.Ignore();
     }
     else
     {
         _file    = "Resources\\" + client + "\\TestsData\\WS_1064.xml";
         username = ProxyData.GetProxyUserName(_file);
         string        username2 = ProxyData.GetProxySecondUserName(_file), preferedName = RegisterData.GetRegisterPreferedName(_file);
         MainHomePage  home      = InitialPage.Go().Logon().ClickLogin();
         ProxyHomePage proxyPage = home.NavigateToAdminHomePage().LoginProxyAsuser();
         proxyPage.EnterUserName(username);
         home = proxyPage.ProxyToMainHomePage();
         Assert.AreEqual("You are proxied in under: " + username, home.GetProxyLoginMsg(),
                         "The message of proxy login is not correct");
         Assert.AreEqual("Exit Proxy", home.GetExitMsg(), "The exit proxy link is not present");
         Assert.IsTrue(home.IsAdmLnkPresent(), "Admin link is present");
         ProxyHomePage adminPage = home.NavigateToAdminHomePage().LoginProxyAsuser();
         proxyPage.EnterUserName(username2);
         home = proxyPage.ProxyToMainHomePage();
         Assert.AreEqual("You are proxied in under: " + username2, home.GetProxyLoginMsg(),
                         "The message of proxy login is not correct");
         Assert.AreEqual("Exit Proxy", home.GetExitMsg(), "The exit proxy link is not present");
         Assert.IsFalse(home.IsAdmLnkPresent(), "Admin link is present");
         adminPage = home.ExitProxy();
         Assert.IsTrue(adminPage.IsAdminLoginUsernameLevel(preferedName), "You are not in the login leveled like support,admin or proxy");
     }
 }
Example #2
0
 public void Proxy_TestSearch_WS_1210()
 {
     if (!DataParser.ReturnExecution("WS_1210"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_1210.xml";
         string username1        = ProxyData.GetProxySecondUserName(_file),
                username         = ProxyData.GetProxyUserName(_file),
                username2        = ProxyData.GetProxyThirdUserName(_file);
         MainHomePage  home      = InitialPage.Go().Logon().ClickLogin();
         ProxyHomePage proxyPage = home.NavigateToAdminHomePage().LoginProxyAsuser();
         proxyPage.EnterUserName(username);
         home = proxyPage.ProxyToMainHomePage();
         Assert.AreEqual("You are proxied in under: " + username + " Ahsing", home.GetProxyLoginMsg(),
                         "The message of proxy login is not correct");
         Assert.AreEqual("Exit Proxy", home.GetExitMsg(), "The exit proxy link is not present");
         home = home.ExitProxy().EnterUserName(username1).ProxyToMainHomePage();
         Assert.AreEqual("You are proxied in under: " + "Aaron " + username1, home.GetProxyLoginMsg(),
                         "The message of proxy login is not correct");
         Assert.AreEqual("Exit Proxy", home.GetExitMsg(), "The exit proxy link is not present");
         home = home.ClosePopUp().ExitProxy().EnterUserName(username2).ProxyToMainHomePage();
         Assert.AreEqual("You are proxied in under: " + username2, home.GetProxyLoginMsg(),
                         "The message of proxy login is not correct");
         Assert.AreEqual("Exit Proxy", home.GetExitMsg(), "The exit proxy link is not present");
     }
 }
Example #3
0
 public void Awards_PointsDepositSuccessfull_WS_1096()
 {
     if (!DataParser.ReturnExecution("WS_1096"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_1096.xml";
         string user             = AwardData.GetAwardUserName(_file),
                award            = AwardData.GetAwardName(_file),
                printype         = AwardData.GetAwardDeliverType(_file),
                msg              = AwardData.GetAwardMessage(_file),
                reason           = AwardData.GetAwardReason(_file),
                proxy_name       = ProxyData.GetProxyUserName(_file),
                approval_name    = AwardData.GetApprovalUserName(_file);
         ProxyHomePage proxyPage = InitialPage.Go().Logon().ClickLogin().NavigateToAdminHomePagePinnacola()
                                   .EnterUserName(user);
         MainHomePage home = proxyPage.ProxyToMainHomePage();
         Assert.AreEqual("You are proxied in as:" + user, home.GetProxyLoginMsgPinnacol(),
                         "The message of proxy login is not correct");
         NominationHomePage recognitionPage = home.NavigateToNominationSpan()
                                              .SearchEmployeeFound(proxy_name)
                                              .SelectAward(award)
                                              .FillReason(reason)
                                              .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");
         home = recognitionPage.ExitProxy().ClosePopUp().NavigateToAdminHomePagePinnacola()
                .EnterUserName(proxy_name).ProxyToMainHomePage();
         Assert.AreEqual("You are proxied in as:" + proxy_name, home.GetProxyLoginMsgPinnacol(),
                         "The message of proxy login is not correct");
         int point = home.ClosePopUp().GetAwardPoint();
         home.ExitProxy();
         home.Refresh();
         home = home.NavigateToAdminHomePagePinnacola().EnterUserName(approval_name).ProxyToMainHomePage();
         Assert.IsTrue(home.IsPopUpRecognitionShow(), "Pop up recognition is not showing up");
         Assert.AreEqual("You are proxied in as:" + approval_name, home.GetProxyLoginMsgPinnacol(),
                         "The message of proxy login is not correct");
         PendingApprovals pending = home.ClickHereAwardPopUp();
         Assert.AreEqual("Pending Approvals", pending.GetTitleMenu(), "Title is not pending approval");
         pending.ApproveAward().ClickApprove();
         home.ExitProxy();
         home.Refresh();
         home = home.NavigateToAdminHomePagePinnacola().EnterUserName(proxy_name).ProxyToMainHomePage();
         Assert.AreEqual("You are proxied in as:" + proxy_name, home.GetProxyLoginMsgPinnacol(),
                         "The message of proxy login is not correct");
         Assert.IsTrue(home.IsPopUpRecognitionShow(), "Pop up recognition is not showing up");
         int totalpoints = home.GetAwardPoint();
         home.ClickHereAwardPopUp();
         if (point + 100 != totalpoints)
         {
             Assert.Fail(totalpoints + "is not equal to " + point);
         }
         else
         {
             Assert.True(1 == 1, totalpoints + "is equal to " + point);
         }
     }
 }