Example #1
0
        //[Category("ProdSanity")]
        //[Category("Regression")]
        public void TC_VerifyListOfNutritionMyNutritrion()
        {
            if (nutritionEnabled.Equals("false"))
            {
                Assert.Ignore("Nutrition Apps not available for Client");
            }
            //To call the Page Login Method
            //Login lgn = new Login();
            //lgn.TC_VerifyLogin();
            //Page_HAPrompt haprompt = new Page_HAPrompt();
            Common devices = new Common();

            devices.ClickDevicesAndApps();
            Page_DevicesAndApps pdevices = new Page_DevicesAndApps(Base.softassertions);

            pdevices.NavigateToMyNuterition();
            List <String[]> devicename = CSVReaderDataTable.GetCSVData("DeviceAppContent", "DevicesAndApps", "nutritiondevicename");

            //pdevices.ClickOnNutritionCheckBox();
            for (int i = 0; i < devicename.Count; i++)
            {
                pdevices.VerifyNutritionDevicesFromFilter(devicename.ElementAt(i)[4]);
            }
            is_soft_assert = true;
            softassertions.AssertAll();
        }/*
Example #2
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);
            }
        }
Example #3
0
        public void TC_VerifyLoginPageOfDevices()
        {
            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");
            }
            else if (fitnessEnabled.Equals("false"))
            {
                Assert.Ignore("Fitness devices not available for Client");
            }

            Common devices = new Common();

            devices.ClickDevicesAndApps();
            Page_DevicesAndApps pdevices = new Page_DevicesAndApps(softassertions);
            //pdevices.NavigateToManageDevices();
            List <String[]> devicename = CSVReaderDataTable.GetCSVData("DeviceAppContent", pageName, "devicename");

            // pdevices.ClickOnFitnessCheckBox();
            Console.WriteLine("Device Name   *******" + devicename);
            pdevices.VerifyLoginPageAllDevices(devicename);
            is_soft_assert = true;
            softassertions.AssertAll();
        }
Example #4
0
        public void TC_VerifySearchFilter()
        {
            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");
            }
            //To call the Page Login Method
            //Login lgn = new Login();
            //lgn.TC_VerifyLogin();
            //Page_HAPrompt haprompt = new Page_HAPrompt();

            Common devices = new Common();
            //devices.ClickDevicesAndApps();
            Page_DevicesAndApps pdevices = new Page_DevicesAndApps();
            //pdevices.NavigateToManageDevices();
            Boolean result = pdevices.VerifyDeviceFileter("devicesfilter", "Fitbit");

            is_soft_assert = false;
            Assert.IsTrue(result);
        }
Example #5
0
        public void TC_VerifyListOfFitnessDevicesAndApps()
        {
            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");
            }
            else if (fitnessEnabled.Equals("false"))
            {
                Assert.Ignore("Fitness Devices not available for Client");
            }

            Common devices = new Common();

            devices.ClickDevicesAndApps();
            Page_DevicesAndApps pdevices = new Page_DevicesAndApps(softassertions);
            //pdevices.NavigateToManageDevices();
            List <String[]> devicename = CSVReaderDataTable.GetCSVData("DeviceAppContent", pageName, "fitnessdevicename");

            pdevices.ClickOnFitnessCheckBox();
            for (int i = 0; i < devicename.Count; i++)
            {
                pdevices.VerifyFitnessDevicesFromFilter(devicename.ElementAt(i)[4]);
                if (i == 8)
                {
                    pdevices.ClickOnNextPage();
                }
            }
            is_soft_assert = true;
            softassertions.AssertAll();
        }
Example #6
0
        public void TC_VerifyListOfWeightDevicesAndApps()
        {
            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 (GlobalVariables.clientname.ToLower().Equals("onlife health") || GlobalVariables.clientname.ToLower().Equals("health trust"))
            {
                //To call the Page Login Method
                //Login lgn = new Login();
                //lgn.TC_VerifyLogin();
                Page_HAPrompt haprompt = new Page_HAPrompt();
                Common        devices  = new Common();
                devices.ClickDevicesAndApps();
                Page_DevicesAndApps pdevices = new Page_DevicesAndApps(Base.softassertions);
                //pdevices.NavigateToManageDevices();
                List <String[]> devicename = CSVReaderDataTable.GetCSVData("DeviceAppContent", pageName, "weightdevicename");
                pdevices.ClickOnWeightCheckBox();
                for (int i = 0; i < devicename.Count; i++)
                {
                    pdevices.VerifyWeightDevicesFromFilter(devicename.ElementAt(i)[4]);
                }
                is_soft_assert = true;
                softassertions.AssertAll();
            }
            else
            {
                Assert.Ignore("Test Case skipped as Weight Devices not available for client");
            }
        }
Example #7
0
        public void TC_VerifyDeviceCountBeforeConnect()
        {
            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 (GlobalVariables.clientname.ToLower().Equals("medicare advantage"))
            {
                Assert.Ignore("Device count not displayed on Dashboard for Client");
            }
            //To call the Page Login Method
            //Login lgn = new Login();
            //lgn.TC_VerifyLogin();
            //Page_HAPrompt haprompt = new Page_HAPrompt();

            Page_DevicesAndApps pdevices = new Page_DevicesAndApps();
            Boolean             result   = pdevices.verifyDeviceCount("0");

            is_soft_assert = false;
            Assert.IsTrue(result);
        }
Example #8
0
        public void TC_Devices()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            string          incentiveEnabled;
            string          fitnessEnabled;
            string          nutritionEnabled;
            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("true"))
            {
                points = cmn.GetPoints(clientname);
            }
            Page_DevicesAndApps pdevices = new Page_DevicesAndApps();
            //pdevices.AcceptTOS();
            Common devices = new Common();
            //devices.ClickDevicesAndApps();
            string expected = "Start Tracking Your Activity Today";

            if (nutritionEnabled.Equals("true") && fitnessEnabled.Equals("false"))
            {
                expected = "Start Tracking Your Nutrition Today";
            }
            devices.ClickAddRemoveDevicesLabel();
            string actual = pdevices.NavigateToManageDevices();

            Assert.AreEqual(expected, actual);

            DevicesAndApps da = new DevicesAndApps();

            da.TC_VerifySearchFilter();
            da.TC_VerifyDeviceCountBeforeConnect();
            da.TC_VerifyListOfNutritionDevicesAndApps();
            da.TC_VerifyListOfWeightDevicesAndApps();
            da.TC_VerifyListOfFitnessDevicesAndApps();
            da.TC_VerifyLoginPageOfDevices();
            da.TC_VerifyConnectFitbitDevice();
            da.TC_VerifyDeviceCountAfterDeviceConnected();
            da.TC_VerifyRefreshConnection();
            da.TC_VerifyDisConnectDevice();
            //da.TC_VerifyDeviceFAQs();
            da.TC_ValidateDeviceAppsIncentiveHistory();
            da.TC_ValidatePoints();
        }
Example #9
0
        //[Category("ProdSanity")]
        //[Category("Regression")]
        public void TC_VerifyDeviceCountBeforeConnect()
        {
            if (nutritionEnabled.Equals("false"))
            {
                Assert.Ignore("Nutrition Apps not available for Client");
            }
            //To call the Page Login Method
            //Login lgn = new Login();
            //lgn.TC_VerifyLogin();
            //Page_HAPrompt haprompt = new Page_HAPrompt();

            Page_DevicesAndApps pdevices = new Page_DevicesAndApps();
            Boolean             result   = pdevices.verifyDeviceCount("0");

            is_soft_assert = false;
            Assert.IsTrue(result);
        }
Example #10
0
 //[Category("ProdSanity")]
 //[Category("Regression")]
 public void TC_VerifySearchFilter()
 {
     //To call the Page Login Method
     //Login lgn = new Login();
     //lgn.TC_VerifyLogin();
     //Page_HAPrompt haprompt = new Page_HAPrompt();
     if ((GlobalVariables.clientname == "NUCOR") || (GlobalVariables.clientname == "Dollar General"))
     {
         Common devices = new Common();
         devices.ClickDevicesAndApps();
         Page_DevicesAndApps pdevices = new Page_DevicesAndApps();
         pdevices.NavigateToMyNuterition();
         Boolean result = pdevices.VerifyDeviceFileter("devicesfilter", "Fitbit");
         is_soft_assert = false;
         Assert.IsTrue(result);
     }
 }
Example #11
0
        public void TC_VerifyDevicesSubMenu()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            List <string[]> isEnabled = cmn.GetConfig("FitnessDevice", "NutritionApp");

            deviceEnabled    = isEnabled.ElementAt(0)[1].ToLower();
            nutritionEnabled = isEnabled.ElementAt(0)[2].ToLower();
            if (deviceEnabled.Equals("false") && nutritionEnabled.Equals("false"))
            {
                Assert.Ignore("Device and Apps not available for client");
            }
            if (GlobalVariables.isregistered.ToLower().Equals("false"))
            {
                Page_DevicesAndApps pdevice = new Page_DevicesAndApps();
                pdevice.AcceptTOS();
            }
            if (clientname.Equals("dollar general"))
            {
                Assert.Ignore("Feature no availabe for the client");
            }
            else
            {
                cmn.ClickDevicesAndApps();

                int             optionno = 47;
                Page_Dashboard  dashbrd  = new Page_Dashboard(softassertions);
                List <String[]> popupmsg = null;

                if (clientname.Equals("health trust"))
                {
                    popupmsg = CSVReaderDataTable.GetCSVData("LeftmenuContent", "Dashboard", "devicesandapppssubmenu", clientname);
                }
                else
                {
                    popupmsg = CSVReaderDataTable.GetCSVData("LeftmenuContent", "Dashboard", "devicesandapppssubmenu", "Common");
                }

                dashbrd.Verify_LeftSubMenuOptions(popupmsg, optionno);
            }
        }
Example #12
0
        public void TC_VerifyDevices()
        {
            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();
            clientname       = GlobalVariables.clientname.ToLower();

            if (fitnessEnabled.Equals("false") && nutritionEnabled.Equals("false"))
            {
                Assert.Ignore("Device and 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();

            if (incentiveEnabled.Equals("true"))
            {
                points = cmn.GetPoints(clientname);
            }
            Page_DevicesAndApps pdevices = new Page_DevicesAndApps();
            //pdevices.AcceptTOS();
            Common devices = new Common();
            //devices.ClickDevicesAndApps();
            string expected = "Start Tracking Your Activity Today";

            if (nutritionEnabled.Equals("true") && fitnessEnabled.Equals("false"))
            {
                expected = "Start Tracking Your Nutrition Today";
            }
            devices.ClickDevicesAndApps();
            string actual = pdevices.NavigateToManageDevices();

            Assert.AreEqual(expected, actual);
        }
Example #13
0
        public void TC_VerifyLeftMenuOptions()
        {
            //Page_Login plogin = new Page_Login();
            //plogin.Login();

            //Page_HAPrompt haprompt = new Page_HAPrompt();
            //haprompt.GoToDashboard();

            if (GlobalVariables.isregistered.ToLower().Equals("false"))
            {
                Page_DevicesAndApps pdevice = new Page_DevicesAndApps();
                pdevice.AcceptTOS();
            }
            Common cmn = new Common();

            cmn.OpenHamMenu();

            Page_Dashboard dashbrd = new Page_Dashboard(softassertions);

            //menuitems = CSVReaderDataTable.GetCSVData("LeftmenuContent", pageName, "menuitems", GlobalVariables.clientname);
            // if ((GlobalVariables.clientname.ToLower().Equals("health trust")) || (GlobalVariables.clientname.ToLower().Equals("meabt")))
            //if ((GlobalVariables.clientname.ToLower().Equals("health trust")))
            //     {
            //    dashbrd.Verify_LeftMenuOptionsOrder(menuitems);
            //    }
            //else
            //{

            menuitems = CSVReaderDataTable.GetCSVData("LeftmenuContent", pageName, "menuitems", "Common");
            //Console.WriteLine("in else section");
            dashbrd.Verify_LeftMenuCommonOptions(menuitems);
            menuitems = CSVReaderDataTable.GetCSVData("LeftmenuContent", pageName, "menuitems", GlobalVariables.clientname.ToLower());
            dashbrd.Verify_LeftMenuCommonOptions(menuitems);

            //}
            cmn.CloseHamMenu();

            is_soft_assert = true;
            softassertions.AssertAll();
        }
Example #14
0
        public void TC_VerifyDisConnectDevice()
        {
            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");
            }
            ;
            //Common devices = new Common();
            //devices.ClickDevicesAndApps();

            Page_DevicesAndApps pdevices = new Page_DevicesAndApps(softassertions);

            //pdevices.NavigateToManageDevices();
            is_soft_assert = true;
            pdevices.VerifyDisConnectionDevice();
            softassertions.AssertAll();
        }
Example #15
0
        public void TC_VerifyRefreshConnection()
        {
            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");
            }

            //Common devices = new Common();
            //devices.ClickDevicesAndApps();
            Page_DevicesAndApps pdevices = new Page_DevicesAndApps();
            //pdevices.NavigateToManageDevices();

            Boolean result = pdevices.VerifyRefreshConnection();

            is_soft_assert = false;
            Assert.IsTrue(result);
        }