Exemplo n.º 1
0
        public void TC_VerifyThirdPartyChallengePage()
        {
            thirdPartyChallenge = cmn.GetConfig("ThirdPartyChallenges").ElementAt(0)[1].ToLower();
            challengeEnabled    = cmn.GetConfig("ChallengesEnabled").ElementAt(0)[1].ToLower();
            if (challengeEnabled.Equals("false") && thirdPartyChallenge.Equals("false"))
            {
                Assert.Ignore("Challenges not available for the client");
            }
            else if (challengeEnabled.Equals("false") && thirdPartyChallenge.Equals("true"))
            {
                //To call the Page Login Method
                Page_Login plogin = new Page_Login();
                plogin.Login();
                Page_HAPrompt haprompt = new Page_HAPrompt();
                haprompt.GoToDashboard();

                Common com = new Common();
                com.ClickChallengesMenu();
                Page_Challenges pch = new Page_Challenges(softassertions);
                is_soft_assert = true;
                if (GlobalVariables.clientname.ToLower().Equals("nucor"))
                {
                    pch.VerifyThirdPartypopup();
                }
                else
                {
                    pch.verifyHealthTrait();
                }
                cmn.CloseHamMenu();
                cmn.LogOut();
            }
        }
        public void TC_VerifySleepTracker()
        {
            if (GlobalVariables.clientname == "NUCOR")
            {
                Assert.Ignore("The current testcase is not available for the client" + GlobalVariables.clientname);
            }
            else
            {
                //To call the Page Login Method
                Page_Login plogin = new Page_Login();
                plogin.Login();
                Page_HAPrompt haprompt = new Page_HAPrompt();
                haprompt.GoToDashboard();

                Common trackermenu = new Common();
                trackermenu.ClickTrackerMenu();
                Page_SleepTracker sl = new Page_SleepTracker(softassertions);
                sl.VerifySleepTracker();

                is_soft_assert = true;
                softassertions.AssertAll();
                //Common logout = new Common();
                //logout.LogOut();
            }
        }
        public void TC_ValidateIncentiveHistory()
        {
            Common cmn = new Common();
            string incentiveEnabled = cmn.GetConfig("IncentiveEnabled").ElementAt(0)[1].ToLower();

            if (incentiveEnabled.Equals("false"))
            {
                Assert.Ignore("Incentives not enabled for client");
            }
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();

            System.Threading.Thread.Sleep(20000);
            Page_Incentive pincentive = new Page_Incentive(softassertions);

            is_soft_assert = true;
            pincentive.ValidateHistoryData();
            softassertions.AssertAll();

            Common logout = new Common();

            logout.LogOut();
        }
Exemplo n.º 4
0
        //[Category("ProdSanity")]
        //[Category("Regression")]
        public void TC_VerifyMyNuteritionPages()
        {
            nutritionEnabled = cmn.GetConfig("NutritionApp").ElementAt(0)[1].ToLower();
            if (nutritionEnabled.Equals("false"))
            {
                Assert.Ignore("Nutrition Apps not available for Client");
            }
            //To call the Page Login Method
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();
            //points = cmn.GetPoints();
            Common devices = new Common();

            devices.ClickDevicesAndApps();

            Page_DevicesAndApps pdevices = new Page_DevicesAndApps();

            if ((GlobalVariables.clientname == "NUCOR") || (GlobalVariables.clientname == "Dollar General"))
            {
                string expected = "Start Tracking Your Nutrition Today";
                string actual   = pdevices.NavigateToMyNuterition();
                Assert.AreEqual(expected, actual);
            }
            else
            {
                string expected = "Start Tracking Your Activity Today";
                string actual   = pdevices.NavigateToManageDevices();
                Assert.AreEqual(expected, actual);
            }
        }
Exemplo n.º 5
0
        public void TC_VerifyAtChallengePage()
        {
            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");
            }
            //To call the Page Login Method
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();

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

            com.ClickChallengesMenu();
            Page_Challenges pchal = new Page_Challenges();

            Assert.IsTrue(pchal.VerifyChallengesPage());
        }
        public void TC_VerifyCustomLoginNucor()
        {
            //To call the Page Login Method
            if (GlobalVariables.clientname.ToLower().Equals("nucor"))
            {
                if ((GlobalVariables.environment.ToLower().Equals("prod")) || (GlobalVariables.environment.ToLower().Equals("Production")))
                {
                    SeleniumKeywords.NavigateToUrl("https://nucornuyou.com");
                }
                else if ((GlobalVariables.environment.ToLower().Equals("staging")) || (GlobalVariables.environment.ToLower().Equals("sa")))
                {
                    SeleniumKeywords.NavigateToUrl("https://sa.nucornuyou.com");
                }
                Page_Login plogin = new Page_Login();
                System.Threading.Thread.Sleep(2000);
                plogin.CustomURLLogin();
                Page_HAPrompt haprompt = new Page_HAPrompt();
                Assert.IsTrue(haprompt.AtHaPrompt(), "Not at HA Prompt Page");
                haprompt.GoToDashboard();

                //To call the Page Login Method
                Page_Dashboard Dashboard = new Page_Dashboard();
                Assert.IsTrue(Dashboard.AtDashboard());
                Common logout = new Common();
                logout.LogOut();
            }
            else
            {
                Assert.Ignore("Feature is not avaibale for the client");
            }
        }
        public void TC_VerifyMaintainWeightGoal()
        {
            Page_Login plogin = new Page_Login();

            plogin.Login();
            ExtentTestManager.GetTest().Info("Successfully Logged In");
            Page_HAPrompt haprompt = new Page_HAPrompt();

            haprompt.GoToDashboard();
            Common cmn = new Common();

            cmn.ClickGoalMenu();
            Page_MaintainWeightGoal mwgoal = new Page_MaintainWeightGoal();
            List <string[]>         result = mwgoal.ValidateElements();

            Assert.Multiple(() =>
            {
                for (int i = 0; i < result.Count; i++)
                {
                    bool textmatchresult = Convert.ToBoolean(result.ElementAt(i)[1]);
                    string msg           = result.ElementAt(i)[0];
                    Assert.IsTrue(textmatchresult, msg);
                }
            }
                            );
        }
        public void TC_VerifyFinancialWellBeing()
        {
            Common          cm         = new Common();
            List <string[]> fwbenabled = cm.GetConfig("FinancialWellBeing");

            if (fwbenabled.ElementAt(0)[1].ToLower().Equals("false"))
            {
                Assert.Ignore("Feature is not available for client");
            }
            else
            {
                Page_Login plogin = new Page_Login();
                plogin.Login();
                Page_HAPrompt haprompt = new Page_HAPrompt();
                haprompt.GoToDashboard();
                Common cmn = new Common();
                cmn.ClickFinancialWellBeingMenu();
                Page_FinancialWellBeing fwb = new Page_FinancialWellBeing(softassertions);
                fwb.VerifyFinancialWellBeingData(GlobalVariables.clientname);
                is_soft_assert = true;
                softassertions.AssertAll();
                Common logout = new Common();
                logout.LogOut();
            }
        }
Exemplo n.º 9
0
        public void TC_FillHighRiskHA()
        {
            Page_Login plogin = new Page_Login();

            plogin.Login();

            Page_HAPrompt haprompt = new Page_HAPrompt();

            Assert.IsTrue(haprompt.AtHaPrompt(), "Not at HA Prompt Page");
            haprompt.GoToDashboard();
            ha = new Page_FillHA(softassertions);
            Common cm    = new Common();
            int    hraid = cm.GetHRAID(GlobalVariables.clientname.ToLower());

            Console.WriteLine("HRAID : " + hraid);
            if (hraid == 89 || hraid == 66 || hraid == 81)
            {
                ha.setInputFileName("HRAID(89,66)HighRiskHAData");
            }
            //else if (hraid == 84)
            //    ha.setInputFileName("HRAID(Nucor)HighRiskHAData");
            else if (hraid == 87)
            {
                ha.setInputFileName("HRAID(DG)HighRiskHAData");
            }


            is_soft_assert = true;
            ha.FillHA();
            softassertions.AssertAll();
        }
        public void LoginUser(string url, string user, string password)
        {
            NavigateToLoginPage(url);
            Page_Login pl = new Page_Login();

            pl.Login(user, password);
        }
Exemplo n.º 11
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();
        }
        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();
        }
Exemplo n.º 13
0
        /// <summary>
        /// This testcase will Complete and Validate Weight Management Progress Check In
        /// This will first login to application and then start, complete and validate Progress Check In
        /// </summary>
        //[Test,Order(1)]
        //[Category("Regression")]

        public void TC_VerifyMandatoryQuestionsMessage()
        {
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();
            cmn.ClickProgressCheckinMenu();
            Page_WeightProgressCheckIn pprogress = new Page_WeightProgressCheckIn();

            List <string[]> result = pprogress.VerifyMandatoryQuestionsErrorMessage();

            Assert.Multiple(() =>
            {
                for (int i = 0; i < result.Count; i++)
                {
                    bool textmatchresult = Convert.ToBoolean(result.ElementAt(i)[1]);
                    string msg           = result.ElementAt(i)[0];
                    Assert.IsTrue(textmatchresult, msg);
                }
            }
                            );
            cmn.CloseHamMenu();

            //cmn.LogOut();
        }
        public void TC_InvalidLogin()
        {
            //To call the Invalid Username Password Message Method
            Page_Login plogin = new Page_Login();
            string     errmsg = plogin.InvaidLogin();

            Console.WriteLine("error messsage : " + errmsg);
            Assert.AreEqual(errmsg, "Invalid username or password!");
        }
        public void TC_ForgotPasswordName()
        {
            //To call the Page Login Method
            Page_Login plogin = new Page_Login(softassertions);

            plogin.forgotPassword();
            is_soft_assert = true;
            softassertions.AssertAll();
        }
        public void GivenILoginToTheApplicationWithInput(string valid)
        {
            BaseClass init = new BaseClass();

            init.Initialize();
            Page_Login login = new Page_Login();

            login.Login("valid");
        }
        //[Test,Order(1)]
        //[Category("Regression")]
        public void GoToDashboard()
        {
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();
        }
        public void TC_GoToNotificationPage()
        {
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();
            System.Threading.Thread.Sleep(8000);
            Page_Notifications pn = new Page_Notifications();

            pn.ClickViewAllLink();
        }
        public void  TC_VerifyConnectionName()
        {
            string     expected = ConfigurationManager.AppSettings["firstname"] + " " + ConfigurationManager.AppSettings["lastname"] + "!";
            Page_Login plogin   = new Page_Login();

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

            haprompt.GoToDashboard();
            Page_MyProfile mp     = new Page_MyProfile();
            String         actual = mp.VerifyMemberName();

            Console.WriteLine("Expected user name is " + expected + " Actual is " + actual);
            Assert.AreEqual(expected, actual.Trim());
        }
Exemplo n.º 20
0
        public void TC_VerifyLogout()
        {
            //To call the Page Login Method
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();
            Page_Dashboard Dashboard = new Page_Dashboard();

            Assert.IsTrue(Dashboard.AtDashboard());
            Common logout = new Common();

            logout.LogOut();
        }
Exemplo n.º 21
0
        public void TC_VerifyAtDashboard()
        {
            coachingEnabled = cmn.GetConfig("CoachingEnabled").ElementAt(0)[1].ToLower();
            journeyEnabled  = cmn.GetConfig("JourneyEnabled").ElementAt(0)[1].ToLower();
            //To call the Page Login Method
            Page_Login plogin = new Page_Login();

            plogin.Login();

            Page_HAPrompt haprompt = new Page_HAPrompt();

            haprompt.GoToDashboard();

            //Page_Dashboard Dashboard = new Page_Dashboard();
            // Assert.IsTrue(Dashboard.AtDashboard());
        }
Exemplo n.º 22
0
        public void TC_VerifyQuitTobaccoProgressCheckIn()
        {
            //To call the Page Login Method
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();
            cmn.ClickProgressCheckinMenu();
            Page_QuitTobaccoProgressCheckIn pqt = new Page_QuitTobaccoProgressCheckIn(softassertions);

            is_soft_assert = true;
            pqt.CompleteProgressCheckIn();
            softassertions.AssertAll();
        }
Exemplo n.º 23
0
        public void TC_VerifyWeightManagementProgressCheckIn()
        {
            //To call the Page Login Method
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();
            cmn.ClickProgressCheckinMenu();
            Page_WeightProgressCheckIn pprogress = new Page_WeightProgressCheckIn(softassertions);

            is_soft_assert = true;
            pprogress.CompleteProgressCheckIn();
            softassertions.AssertAll();
        }
        public void TC_VerifyHealthContentPage()
        {
            //To call the Page Login Method
            Page_Login plogin = new Page_Login();

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

            //Assert.IsTrue(haprompt.AtHaPrompt(), "Not at HA Prompt Page");
            haprompt.GoToDashboard();

            // Health Content
            Common cmn = new Common();

            cmn.ClickOnResources();
            Page_HealthContent phc       = new Page_HealthContent();
            List <string[]>    actualtxt = CSVReaderDataTable.GetCSVData("ResourcesContent", "HealthContent", "pageheading");
            string             atrval    = phc.VerifyHealthContentPage();

            Console.WriteLine("actualtxt" + atrval + "expected" + actualtxt.ElementAt(0)[4]);
            Assert.AreEqual(actualtxt.ElementAt(0)[4], atrval);

            // Symptom Checker Tab
            Page_SymptomChecker psc = new Page_SymptomChecker();

            atrval    = psc.VerifySymptomCheckerPageFromTab();
            actualtxt = CSVReaderDataTable.GetCSVData("ResourcesContent", "SymptomChecker", "pageheading");
            Console.WriteLine("actualtxt" + atrval + "expected" + actualtxt.ElementAt(0)[4]);
            Assert.AreEqual(actualtxt.ElementAt(0)[4], atrval);

            // Well Being Content Tab
            Page_WellBeingContent wbc = new Page_WellBeingContent();

            atrval    = wbc.VerifyWellBeingFromTab();
            actualtxt = CSVReaderDataTable.GetCSVData("ResourcesContent", "Common", "pageheading");
            Console.WriteLine("actualtxt" + atrval + "expected" + actualtxt.ElementAt(0)[4]);
            Assert.AreEqual(actualtxt.ElementAt(0)[4], atrval);

            //Family Content
            Page_FamilyContent fc = new Page_FamilyContent();

            atrval    = fc.VerifyFamilyContentFromTab();
            actualtxt = CSVReaderDataTable.GetCSVData("ResourcesContent", "Common", "pageheading");
            TestContext.WriteLine("expected" + actualtxt.ElementAt(0)[4]);
            TestContext.WriteLine("actualtxt" + atrval + "expected" + actualtxt.ElementAt(0)[4]);
            Assert.AreEqual(actualtxt.ElementAt(0)[4], atrval);
        }
        public void TC_ForgotUserName()
        {
            //To call the Page Login Method
            Page_Login plogin   = new Page_Login();
            string     username = plogin.forgotUserName();

            Assert.AreEqual(GlobalVariables.username, username);
            Page_HAPrompt haprompt = new Page_HAPrompt();

            //Assert.IsTrue(haprompt.AtHaPrompt(), "Not at HA Prompt Page");
            haprompt.GoToDashboard();

            //To call the Page Login Method
            Page_Dashboard Dashboard = new Page_Dashboard();

            Assert.IsTrue(Dashboard.AtDashboard());
        }
Exemplo n.º 26
0
        public void TC_TakeQuitTobaccoCourse()
        {
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();
            Common coursemenu = new Common();

            coursemenu.ClickCourseMenu();
            Page_QuitTobaccoCourse pcourse = new Page_QuitTobaccoCourse(softassertions);

            is_soft_assert = true;
            pcourse.CompleteQuitTobaccoCourse();
            softassertions.AssertAll();
        }
        public void TC_VerifyBloodPressureProgressCheckIn()
        {
            //To call the Page Login Method
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();
            cmn.ClickProgressCheckinMenu();
            Page_BloodPressureProgressCheckIn pbp = new Page_BloodPressureProgressCheckIn(softassertions);

            is_soft_assert = true;
            pbp.CompleteProgressCheckIn();
            //pbp.VerifyProgressCheckinReportBottomLinks(GlobalVariables.clientname);
            softassertions.AssertAll();
        }
        public void TC_VerifyImprovingNutritionCourse()
        {
            Page_Login plogin = new Page_Login();

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

            haprompt.GoToDashboard();
            Common coursemenu = new Common();

            coursemenu.ClickCourseMenu();
            Page_ImprovingNutritionCourse incourse = new Page_ImprovingNutritionCourse(softassertions);

            is_soft_assert = true;
            incourse.CompleteImprovingNutritionCourse();
            softassertions.AssertAll();
        }
Exemplo n.º 29
0
        public void TC_VerifyAtDashboard()
        {
            clientname = GlobalVariables.clientname.ToLower();
            Console.WriteLine("ClientName : " + clientname);
            //To call the Page Login Method
            Page_Login plogin = new Page_Login();

            plogin.Login();

            Page_HAPrompt haprompt = new Page_HAPrompt();

            haprompt.GoToDashboard();

            Page_Dashboard Dashboard = new Page_Dashboard();

            Assert.IsTrue(Dashboard.AtDashboard());
        }
Exemplo n.º 30
0
        //[Category("Regression")]
        public void TC_FillNormalHA()
        {
            Page_Login plogin = new Page_Login();

            plogin.Login();

            Page_HAPrompt haprompt = new Page_HAPrompt();

            Assert.IsTrue(haprompt.AtHaPrompt(), "Not at HA Prompt Page");
            haprompt.GoToDashboard();

            ha = new Page_FillHA(softassertions);
            ha.setInputFileName("NormalHAData");

            is_soft_assert = true;
            ha.FillHA();
            softassertions.AssertAll();
        }