示例#1
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);
            }
        }
示例#2
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();
        }
示例#3
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);
        }
示例#4
0
        public void TC_VerifyConnectFitbitDevice()
        {
            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.VerifyDeviceConnect();

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