Exemplo n.º 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");
     }
 }
Exemplo n.º 2
0
 public void Bugdet_FundFromReciepts_WS_1196()
 {
     if (!DataParser.ReturnExecution("WS_1196"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_1196.xml";
         string user = AwardData.GetAwardUserName(_file), msg = AwardData.GetAwardMessage(_file),
                award = AwardData.GetAwardName(_file), value = AwardData.GetAwardValue(_file), amountvalue = AwardData.GetAwardAmountValue(_file),
                proxy_name = ProxyData.GetProxyUserName(_file), proxy_name2 = ProxyData.GetProxySecondUserName(_file);
         MainHomePage       proxyPage       = InitialPage.Go().Logon().ClickLogin().NavigateToAdminHomePage().LoginProxyAsuser().EnterUserNameHealthAlliance(proxy_name).ProxyToMainHomePage();
         NominationHomePage recognitionPage = proxyPage.NavigateToHomePage().NavigateToNomination();
         Thread.Sleep(1500);
         recognitionPage
         .SearchEmployeeFound(user)
         .SelectAward(award)
         .SelectValueOfAward(amountvalue)
         .SelectValues(value)
         .FillMsg(msg)
         .ClickNext()
         .EmailReward();
         recognitionPage.ClickSendRecognition();
         var proxypage = recognitionPage.ExitProxy().NavigateToAdminHomePage().LoginProxyAsuser().EnterUserNameHealthAlliance(proxy_name2)
                         .ProxyToMainHomePage().ClosePopUp();
         Thread.Sleep(300);
         var amount = proxypage.GetBudget();
         //Fail cannot appear link to switch to see the budget
         PendingApprovals pending = proxypage.NavigateToPendingApprovals();
         Thread.Sleep(300);
     }
 }
Exemplo n.º 3
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");
     }
 }
Exemplo n.º 4
0
 public void EventCalendar_Anniversaries_WS_1084()
 {
     if (!DataParser.ReturnExecution("WS_1084"))
     {
         Assert.Ignore();
     }
     else
     {
         _file    = "Resources\\" + client + "\\TestsData\\WS_1084.xml";
         username = ProxyData.GetProxyUserName(_file);
         string username2        = ProxyData.GetProxySecondUserName(_file),
                award            = AwardData.GetAwardName(_file),
                msg              = AwardData.GetAwardMessage(_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");
         EventCalendar eventPage = home.NavigateToEventCalendar();
         eventPage.ClickRecent();
         Assert.AreEqual(username2 + "\r\n12 year Anniversary", eventPage.GetNameList(6),
                         username2 + " is not present");
         NominationHomePage nomination =
             eventPage.clickSendAniversaryCard().SelectAward(award).FillMsg(msg).SelectImgs();
         nomination.EmailReward().ClickSendRecognition();
         Assert.AreEqual("Success!", nomination.GetSuccesMsg(), "Message its not success");
         Assert.AreEqual("FINISH", nomination.GetBtnFinishLabel(), "Button finish its not correct write");
         Assert.AreEqual("RECOGNIZE", nomination.GetBtnRecognizOtherLabel(),
                         "Button finish its not correct write");
     }
 }