예제 #1
0
파일: Awards.cs 프로젝트: Pablito-mdq/Test
 public void Awards_ViewDetailsModal_WS_1274()
 {
     if (!DataParser.ReturnExecution("WS_1274"))
     {
         Assert.Ignore();
     }
     else
     {
         ReportsPage reportpage        = InitialPage.Go().Logon().ClickLogin().NavigateToReports();
         string      issuer            = reportpage.GetAwardTable(1, 8),
                     award             = reportpage.GetAwardTable(1, 4),
                     recipient         = reportpage.GetAwardTable(1, 2),
                     awardTie          = reportpage.GetAwardTable(1, 4),
                     teamName          = reportpage.GetAwardTable(1, 6),
                     date              = reportpage.GetAwardTable(1, 1),
                     amount            = reportpage.GetAwardTable(1, 3);
         ReportDetailsPage detailsPage = reportpage.ClickViewDetails(1);
         Assert.AreEqual(issuer, detailsPage.GetIssuer(), "Issuer Value is not the same");
         Assert.AreEqual(award, detailsPage.GetAward(), "Issuer Value is not the same");
         Assert.AreEqual(recipient, detailsPage.GetRecipient(), "Issuer Value is not the same");
         Assert.AreEqual(awardTie, detailsPage.GetAwardTie(), "Issuer Value is not the same");
         Assert.AreEqual(teamName, detailsPage.GetteamName(), "Issuer Value is not the same");
         Assert.AreEqual(date, detailsPage.Getdate(), "Issuer Value is not the same");
         Assert.AreEqual(amount, detailsPage.GetAmount(), "Issuer Value is not the same");
     }
 }
예제 #2
0
 //WS_1057
 public void WS_1057()
 {
     if (!DataParser.ReturnExecution("WS_1057"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_1057.xml";
         string user = AwardData.GetAwardUserName(_file), msg = AwardData.GetAwardMessage(_file),
                award = AwardData.GetAwardName(_file), value = AwardData.GetAwardValue(_file);
         NominationHomePage recognitionPage = InitialPage.Go().Logon().ClickLogin().NavigateToNominationSpan();
         Thread.Sleep(1500);
         recognitionPage
         .SearchEmployeeFound(user)
         .SelectAward(award)
         .SelectValues(value)
         .FillMsg(msg)
         .ClickNext()
         .EmailReward();
         Assert.AreEqual("Ready to send?", recognitionPage.GetReadyToSendMsg(),
                         "The message is not ready to send");
         Assert.AreEqual("SEND RECOGNITION", recognitionPage.GetBtnSendRecognitionAward(), "Submit button is not well written");
         recognitionPage.ClickSendRecognition();
         Assert.AreEqual("Success!", recognitionPage.GetSuccesMsg(), "Message its not success");
         Assert.AreEqual("FINISH", recognitionPage.GetBtnFinishLabel(), "Button finish its not correct write");
         Assert.AreEqual("RECOGNIZE SOMEONE ELSE", recognitionPage.GetBtnRecognizOtherLabelXpath(),
                         "Button finish its not correct write");
         ReportsPage details = recognitionPage.NavigateToReportsSpan().NavigateToReports();
         Assert.AreEqual(award, details.GetAwardTable(1, 6), award + "award was not given");
         Assert.AreEqual(user, details.GetAwardTable(1, 3), user + "user was not given or present");
         var proxypage =
             details.NavigateToAdminHomePageSpan()
             .ClickOptionProxy("Proxy")
             .EnterUserName(user)
             .ProxyToMainHomePage().ClosePopUp();
         Thread.Sleep(300);
         var myawards = proxypage.NavigateToMyAwards();
         Assert.AreEqual(award, myawards.GetAwardName(1, 5), award + "award was not given");
     }
 }