Example #1
0
        public void TC_ValidateTrackerIncentiveHistory()
        {
            Common config = new Common();

            isenabled = config.GetConfig("IncentiveEnabled").ElementAt(0)[1].ToLower();
            if (isenabled.Equals("false"))
            {
                Assert.Ignore("Incentives not enabled for client");
            }

            string          category             = "I Tracked My Maintain Weight";
            List <string[]> incentivehistorydata = CSVReaderDataTable.GetCSVData("IncentiveHistoryData", pageName, category, GlobalVariables.clientname.ToLower());

            if (incentivehistorydata.Count > 0)
            {
                Page_EligibleActivities peligible = new Page_EligibleActivities(softassertions);
                is_soft_assert = true;

                CommonApi cma   = new CommonApi();
                String    token = cma.GetToken();
                peligible.InitializeIncentiveHistoryRequest();

                peligible.SetHeader(token);
                peligible.SetMethod();
                peligible.SendRequest();

                peligible.VerifyHistoryData(incentivehistorydata, category);
                softassertions.AssertAll();
            }
            else
            {
                Assert.Ignore("Incentives for Tracker is not available for Client");
            }
        }
Example #2
0
        //[Category("Regression")]
        //[Category("ProdSanity")]
        //[Category("PointReg")]
        public void TC_ValidateIncentiveEligibleActivities()
        {
            Page_EligibleActivities peligible = new Page_EligibleActivities(softassertions);

            is_soft_assert = true;

            CommonApi cma   = new CommonApi();
            String    token = cma.GetToken();

            peligible.InitializeEligibleActivitiesRequest();

            peligible.SetHeader(token);
            peligible.SetMethod();
            peligible.SendRequest();
            peligible.VerifyEligibleActivities();
            softassertions.AssertAll();
        }
Example #3
0
        public void TC_ValidateDeviceAppsIncentiveHistory()
        {
            List <string[]> isEnabled = cmn.GetConfig("FitnessDevice", "IncentiveEnabled", "NutritionApp");

            fitnessEnabled   = isEnabled.ElementAt(0)[1].ToLower();
            incentiveEnabled = isEnabled.ElementAt(0)[2].ToLower();
            nutritionEnabled = isEnabled.ElementAt(0)[3].ToLower();

            if (fitnessEnabled.Equals("false") && nutritionEnabled.Equals("false"))
            {
                Assert.Ignore("Device and Apps not available for Client");
            }
            if (incentiveEnabled.Equals("false"))
            {
                Assert.Ignore("Incentives not enabled for client");
            }

            string          category             = "I Connected My Device/App";
            List <string[]> incentivehistorydata = CSVReaderDataTable.GetCSVData("IncentiveHistoryData", pageName, category, GlobalVariables.clientname.ToLower());

            if (incentivehistorydata.Count > 0)
            {
                Page_EligibleActivities peligible = new Page_EligibleActivities(softassertions);
                is_soft_assert = true;

                CommonApi cma   = new CommonApi();
                String    token = cma.GetToken();
                peligible.InitializeIncentiveHistoryRequest();

                peligible.SetHeader(token);
                peligible.SetMethod();
                peligible.SendRequest();

                peligible.VerifyHistoryData(incentivehistorydata, category);
                softassertions.AssertAll();
            }
            else
            {
                Assert.Ignore("Incentives for Device and Apps is not available for Client");
            }
        }
        public void TC_ValidateMessageToCoachIncentiveHistory()
        {
            List <string[]> isEnabled = cmn.GetConfig("CoachingEnabled", "IncentiveEnabled");

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

            string          category             = "I Contacted My Health Coach";
            List <string[]> incentivehistorydata = CSVReaderDataTable.GetCSVData("IncentiveHistoryData", pageName, category, GlobalVariables.clientname.ToLower());

            if (incentivehistorydata.Count > 0)
            {
                Page_EligibleActivities peligible = new Page_EligibleActivities(softassertions);
                is_soft_assert = true;

                CommonApi cma   = new CommonApi();
                String    token = cma.GetToken();
                peligible.InitializeIncentiveHistoryRequest();

                peligible.SetHeader(token);
                peligible.SetMethod();
                peligible.SendRequest();

                peligible.VerifyHistoryData(incentivehistorydata, category);
                softassertions.AssertAll();
            }
            else
            {
                Assert.Ignore("Incentives for Message To Coach is not available for Client");
            }
        }
Example #5
0
        public void TC_ValidatJoinChallengeIncentiveHistory()
        {
            challengeEnabled = cmn.GetConfig("ChallengesEnabled").ElementAt(0)[1].ToLower();
            incentiveEnabled = cmn.GetConfig("IncentiveEnabled").ElementAt(0)[1].ToLower();
            if (challengeEnabled.Equals("false"))
            {
                Assert.Ignore("Challenges not available for the client");
            }
            if (incentiveEnabled.Equals("false"))
            {
                Assert.Ignore("Incentives not enabled for client");
            }

            string          category             = "I Participated in a Personal Challenge";
            List <string[]> incentivehistorydata = CSVReaderDataTable.GetCSVData("IncentiveHistoryData", pageName, category, GlobalVariables.clientname.ToLower());

            if (incentivehistorydata.Count > 0)
            {
                Page_EligibleActivities peligible = new Page_EligibleActivities(softassertions);
                is_soft_assert = true;

                CommonApi cma   = new CommonApi();
                String    token = cma.GetToken();
                peligible.InitializeIncentiveHistoryRequest();

                peligible.SetHeader(token);
                peligible.SetMethod();
                peligible.SendRequest();

                peligible.VerifyHistoryData(incentivehistorydata, category);
                softassertions.AssertAll();
            }
            else
            {
                Assert.Ignore("Incentives for Participated in a Personal Challenge is not available for Client");
            }
        }