Ejemplo n.º 1
0
        public void Recognition_RealTimeValidation_WS_1161()
        {
            if (!DataParser.ReturnExecution("WS_1161"))
            {
                Assert.Ignore();
            }
            else
            {
                _file = "Resources\\" + client + "\\TestsData\\WS_1161.xml";
                string user  = AwardData.GetAwardUserName(_file),
                       user1 = AwardData.GetAwardUserName1(_file)
                ,
                       user2      = AwardData.GetAwardUserName2(_file),
                       user3      = AwardData.GetAwardUserName3(_file),
                       user4      = AwardData.GetAwardUserName4(_file),
                       user5      = AwardData.GetAwardUserName5(_file),
                       proxy_name = ProxyData.GetProxyUserName(_file);

                //Scenario 1
                NominationHomePage recognitionPage =
                    InitialPage.Go().EnterId(client).EnterId(client).Logon().ClickLogin().NavigateToNominationSpan();
                recognitionPage.ClickMultipleRecipients()
                .SearchEmployeeFoundMultiple(user)
                .SearchEmployeeFoundMultiple(user1)
                .SearchEmployeeFoundMultiple(user2).SearchEmployeeFoundMultiple(user3).ClickNextGeneric();
                Assert.IsTrue(recognitionPage.IsStep2Block(), "Step2 is not blocked");

                //Scenario 2
                MainHomePage mainPage =
                    recognitionPage.NavigateToAdminHomePage()
                    .LoginProxyAsuser()
                    .EnterUserName(proxy_name)
                    .ProxyToMainHomePage();
                Step2 ste2 = mainPage.NavigateToNominationSpan().SearchEmployeeFound(user4);
                Assert.AreEqual("Rave", ste2.GetAwardName("Rave"), "Rave Award is not present");
                Assert.AreEqual("Pioneer Award", ste2.GetAwardName("Pioneer Award"), "Pioneer Award is not present");
                Assert.AreEqual("Pathfinder Award", ste2.GetAwardName("Pathfinder Award"),
                                "Pathfinder Award is not present");
                Assert.AreEqual("Trailblazer Award", ste2.GetAwardName("Trailblazer Award"),
                                "Trailblazer Award is not present");

                //Scenario 3
                ste2.Refresh();
                ste2 = recognitionPage.SearchEmployeeFound(user5);
                Assert.AreEqual("Rave", ste2.GetAwardName("Rave"), "Rave Award is not present");
                Assert.IsFalse(ste2.IsAwardPresent("Pioneer Award"), "Pioneer Award is  present");
                Assert.IsFalse(ste2.IsAwardPresent("Pathfinder Award"), "Pathfinder Award not present");
                Assert.IsFalse(ste2.IsAwardPresent("Trailblazer Award"), "Trailblazer Award not present");
            }
        }
Ejemplo n.º 2
0
 public void Recognition_AkronNonMonetary_WS_956()
 {
     if (!DataParser.ReturnExecution("WS_956"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_956.xml";
         AwardData.GetAwardImpact(_file);
         string user = AwardData.GetAwardUserName(_file),
                award = AwardData.GetAwardName(_file),
                value = AwardData.GetAwardValue(_file),
                amount = AwardData.GetAwardAmountValue(_file), printype = AwardData.GetAwardDeliverType(_file),
                msg        = AwardData.GetAwardMessage(_file),
                reason     = AwardData.GetAwardReason(_file),
                proxy_name = ProxyData.GetProxyUserName(_file);
         NominationHomePage recognitionPage = InitialPage.Go().Logon().ClickLogin().NavigateToNomination();
         recognitionPage
         .SearchEmployeeFound(user)
         .SelectAward(award)
         .SelectValueOfAward(amount)
         .SelectValues(value)
         .FillMsg(msg)
         .FillReason(reason).ClickNext();
         Assert.AreEqual("I want to email this award.", recognitionPage.GetDeliverLabel("email"),
                         "Label is not correct");
         Assert.AreEqual("I want to print this award.", recognitionPage.GetDeliverLabel("print"),
                         "Label is not correct");
         recognitionPage.DeliverType(printype);
         Assert.AreEqual(2, recognitionPage.GetCountEditLnk(), "Edit links are not two");
         Assert.AreEqual("Ready to send?", recognitionPage.GetReadyToSendMsg(),
                         "The message is not ready to send");
         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", recognitionPage.GetBtnRecognizOtherLabel(),
                         "Button finish its not correct write");
         ProxyHomePage proxyPage = recognitionPage.NavigateToAdminHomePage().LoginProxyAsuser();
         proxyPage.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");
         Assert.IsTrue(home.IsPopUpRecognitionShow(), "Pop up recognition is not showing up");
         MyAwards awards = home.ClosePopUp().NavigateToMyAwards();
         Assert.AreEqual(award, awards.GetAwardName(1, 5), "The last award that someone gave you is not present");
         awards.OpenDetailsAward(1, 8);
     }
 }