Exemple #1
0
        public void TC_VerifyWeightTracker()
        {
            Common config = new Common();

            isenabled = config.GetConfig("IncentiveEnabled").ElementAt(0)[1].ToLower();

            clientname = GlobalVariables.clientname;
            //To call the Page Login Method
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();

            if (isenabled.Equals("true"))
            {
                points = cmn.GetPoints(clientname);
            }

            Common trackermenu = new Common();

            trackermenu.ClickTrackerMenu();


            Page_WeightTracker pWeightTracker = new Page_WeightTracker(softassertions);

            pWeightTracker.GoToWeightTracker();
            pWeightTracker.VerifyWeightTracker(GlobalVariables.clientname);

            is_soft_assert = true;
            softassertions.AssertAll();
            //Common logout = new Common();
            //logout.LogOut();
        }
Exemple #2
0
        public void FillWeightTracker()
        {
            Common config    = new Common();
            string isenabled = config.GetConfig("CoachingEnabled").ElementAt(0)[1].ToLower();

            if (isenabled.Equals("false"))
            {
                Assert.Ignore("Coaching not enabled for client");
            }
            Page_WeightTracker pWeightTracker = new Page_WeightTracker(softassertions);

            pWeightTracker.VerifyWeightTracker(GlobalVariables.clientname);
            is_soft_assert = true;
            softassertions.AssertAll();
        }
Exemple #3
0
        public void TC_WeightTracker()
        {
            incentiveEnabled = cmn.GetConfig("IncentiveEnabled").ElementAt(0)[1].ToLower();

            if (incentiveEnabled.Equals("true"))
            {
                points = cmn.GetPoints(clientname);
            }

            Page_WeightTracker pWeightTracker = new Page_WeightTracker(softassertions);

            pWeightTracker.GoToWeightTracker();
            pWeightTracker.VerifyWeightTracker(clientname);
            CommonTracker ct = new CommonTracker(softassertions);

            ct.VerifyTrackerChart();


            if (!incentiveEnabled.Equals("false"))
            {
                //Assert.Ignore("Incentives not enabled for client");


                WeightTracker wt = new WeightTracker();
                wt.TC_ValidateTrackerIncentiveHistory();

                int awardedpoints = cmn.GetPoints(clientname);

                int points_tracker      = Convert.ToInt32(cmn.GetInstancePointsValue(clientname, "Tracker"));
                int expectedtotalpoints = points + points_tracker;

                Console.WriteLine("Expected : " + expectedtotalpoints);
                Console.WriteLine("Awarded : " + awardedpoints);
                Assert.AreEqual(expectedtotalpoints, awardedpoints);
            }

            is_soft_assert = true;
            softassertions.AssertAll();
        }
Exemple #4
0
        public void TC_ShareTrackers()
        {
            Common cmn = new Common();

            cmn.ClickConnectionsMenu();

            // Update user A's circle
            cn.ChangeConnectionCircle("inner");

            // Shares 2 trackers: 1 with outer circle and 1 with inner circle
            cn.ShareTrackers();

            //// Fill Tracker entries
            is_soft_assert = true;
            //Stress Tracker
            Common trackermenu = new Common();

            trackermenu.ClickTrackerMenu();

            Page_StressTracker stress = new Page_StressTracker(softassertions);

            stress.GoToStressTracker();
            stress.VerifyStressTracker();
            // Weight Tracker
            trackermenu.ClickTrackerMenu();

            Page_WeightTracker pWeightTracker = new Page_WeightTracker(softassertions);

            pWeightTracker.GoToWeightTracker();
            pWeightTracker.VerifyWeightTracker(GlobalVariables.clientname);

            softassertions.AssertAll();

            // Logout
            Common logout = new Common();

            logout.LogOut();
        }