Ejemplo n.º 1
0
        public void TC_MaintainWeightGoal()
        {
            coachingEnabled = cmn.GetConfig("CoachingEnabled").ElementAt(0)[1].ToLower();
            if (coachingEnabled.Equals("false"))
            {
                Assert.Ignore("Coaching not available for client");
            }
            CommonGoals             cmngoal = new CommonGoals(softassertions);
            Page_MaintainWeightGoal mt      = new Page_MaintainWeightGoal(softassertions);

            //cmn.ClickGoalMenu();
            mt.InputWeight();
            cmngoal.ClickStep1NextBtn();
            is_soft_assert = true;
            mt.VerifyPlanScreen();
            mt.VerifyActionsAdded();
            System.Threading.Thread.Sleep(3000);
            cmngoal.ClickStep2NextBtn();
            mt.VerifySetUpScreen();
            cmngoal.ClickConfirmBtn();
            mt.VerifyGoalComplete();
            cmngoal.ClickRemoveBtn();
            cmngoal.VerifyRemovePopUp();
            cmngoal.ClickRemoveScreenYesBtn();
            Page_HAPrompt haprompt = new Page_HAPrompt();

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

            Assert.IsTrue(dashbrd.AtDashboard(), "Not Navigated to Dashboard");
        }
        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_RemoveGoal()
        {
            Page_MaintainWeightGoal screen = new Page_MaintainWeightGoal();

            screen.RemoveGoal();
            Page_HAPrompt haprompt = new Page_HAPrompt();

            haprompt.GoToDashboard();
            cmn.LogOut();
        }
        public void TC_VerifyGoalSetupCompletionScreen()
        {
            Page_MaintainWeightGoal set    = new Page_MaintainWeightGoal();
            List <string[]>         result = set.VerifySetupScreen();

            Assert.Multiple(() =>
            {
                for (int i = 0; i < result.Count; i++)
                {
                    bool textmatch = Convert.ToBoolean(result.ElementAt(i)[1]);
                    string msg     = result.ElementAt(i)[0];
                    Assert.IsTrue(textmatch, msg);
                }
            }
                            );
        }
        public void TC_AddAndVerifyActions()
        {
            Page_MaintainWeightGoal goal   = new Page_MaintainWeightGoal();
            List <string[]>         result = goal.ActionsAdded();

            Assert.Multiple(() =>
            {
                for (int i = 0; i < result.Count; i++)
                {
                    bool textmatch = Convert.ToBoolean(result.ElementAt(i)[1]);
                    string msg     = result.ElementAt(i)[0];
                    Assert.IsTrue(textmatch, msg);
                }
            }
                            );
        }
        public void TC_VerifyRemovePopUp()
        {
            Page_MaintainWeightGoal remove = new Page_MaintainWeightGoal();
            List <string[]>         result = remove.VerifyRemoveGoalPopUp();

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