Ejemplo n.º 1
0
        public void TC_MessageToCoach()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            coachingEnabled  = cmn.GetConfig("CoachingEnabled").ElementAt(0)[1].ToLower();
            incentiveEnabled = cmn.GetConfig("IncentiveEnabled").ElementAt(0)[1].ToLower();
            if (coachingEnabled.Equals("false"))
            {
                Assert.Ignore("Coaching not enabled for clients");
            }
            if (incentiveEnabled.Equals("true"))
            {
                points = cmn.GetPoints(clientname);
            }
            //Click on Message to coach icon on Dashboard
            Common pcommon = new Common();

            pcommon.GoToMessageToCoachPage();
            //Call Verify Message Page UI Elements
            Page_MessageToCoach pmsgcoach = new Page_MessageToCoach(softassertions);

            pmsgcoach.VerifyMessagetoCoachPage();
            is_soft_assert = true;
            softassertions.AssertAll();
            MessageToCoach mtc = new MessageToCoach();

            mtc.TC_VerifySentMsgToCoach();
            if (incentiveEnabled.Equals("true"))
            {
                mtc.TC_ValidatePoints();
            }
            mtc.TC_ValidateMessageToCoachIncentiveHistory();
            mtc.TC_VerifyMessageFilters();
        }
        public void TC_VerifyMessageToCoachUI()
        {
            List <string[]> isEnabled = cmn.GetConfig("CoachingEnabled", "IncentiveEnabled");

            incentiveEnabled = isEnabled.ElementAt(0)[2].ToLower();
            coachingEnabled  = isEnabled.ElementAt(0)[1].ToLower();
            clientname       = GlobalVariables.clientname;
            if (coachingEnabled.Equals("false") && !GlobalVariables.clientname.ToLower().Equals("arc"))
            {
                Assert.Ignore("Message to coach not available for client");
            }

            Page_Login plogin = new Page_Login();

            plogin.Login();
            Page_HAPrompt haprompt = new Page_HAPrompt();

            haprompt.GoToDashboard();
            if (incentiveEnabled.Equals("true"))
            {
                points = cmn.GetPoints(clientname);
            }
            //Click on Message to coach icon on Dashboard
            Common pcommon = new Common();

            pcommon.GoToMessageToCoachPage();
            //Call Verify Message Page UI Elements
            Page_MessageToCoach pmsgcoach = new Page_MessageToCoach(softassertions);

            pmsgcoach.VerifyMessagetoCoachPage();
            is_soft_assert = true;
            softassertions.AssertAll();
            //Common logout = new Common();
            //logout.LogOut();
        }