public void TC_VerifyChallenge() { string challengeEnabled = cmn.GetConfig("ChallengesEnabled").ElementAt(0)[1].ToLower(); string incentiveEnabled = cmn.GetConfig("IncentiveEnabled").ElementAt(0)[1].ToLower(); if (challengeEnabled.Equals("false")) { Assert.Ignore("Challenges not available for the client"); } if (incentiveEnabled.Equals("true")) { points = cmn.GetPoints(clientname); } Common com = new Common(); com.ClickChallengesMenu(); Page_Challenges pchal = new Page_Challenges(); Assert.IsTrue(pchal.VerifyChallengesPage()); Challenges ch = new Challenges(); ch.TC_VerifyChallengeJoined(); ch.TC_VerifyTrackChallenge(); ch.TC_VerifyLeaveChallenge(); ch.TC_ValidatJoinChallengeIncentiveHistory(); ch.TC_ValidatePoints(); }
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_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_VerifyChallengeJoined() { challengeEnabled = cmn.GetConfig("ChallengesEnabled").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(); //Common com = new Common(); //com.ClickChallengesMenu(); Page_Challenges pchal = new Page_Challenges(); Assert.IsTrue(pchal.VerifyChallengeJoined()); }
public void TC_VerifyLeaveChallenge() { challengeEnabled = cmn.GetConfig("ChallengesEnabled").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(); List <String[]> popupmsg = CSVReaderDataTable.GetCSVData("ChallengesContent", pageName, "popuptxt"); Page_Challenges pchal = new Page_Challenges(softassertions); is_soft_assert = true; Assert.IsTrue(pchal.VerifyLeaveChallenge()); pchal.VerifyandConfirmLeaveChanllengePopup(popupmsg.ElementAt(0)[4]); softassertions.AssertAll(); }
public void TC_VerifyTrackChallenge() { challengeEnabled = cmn.GetConfig("ChallengesEnabled").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(); //Common com = new Common(); //com.ClickChallengesMenu(); Page_Challenges pchal = new Page_Challenges(softassertions); //Assert.IsTrue(pchal.VerifyChallengeJoined()); List <string[]> historyheader = CSVReaderDataTable.GetCSVData("ChallengesContent", pageName, "trackerhistoryheader"); List <string[]> historydata = CSVReaderDataTable.GetCSVData("ChallengesContent", pageName, "trackerhistoryvalue"); pchal.trackChallenge(historyheader, historydata); softassertions.AssertAll(); is_soft_assert = true; }