-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContingentApprovalSteps.cs
114 lines (96 loc) · 5.39 KB
/
ContingentApprovalSteps.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
using System;
using BHG.Test.MasterFramework.BHGBaseObjects;
using System.Data.SqlClient;
using System.IO;
using BHG.Test.MasterFramework.Utilities;
using BHGVision.Pages;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Server;
namespace BHGVision
{
public class ContingentApprovalSteps : BHGBaseSteps
{
//[Given(@"I have created an application for a practitioner")]
public void GivenIHaveCreatedAnApplicationForAPractitioner()
{
//ScenarioContext.Current.Pending();
Browser.Current.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(60));
Browser.Current.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(60));
//_CurrentPage = GetInstance<BHGLogin>();
//_CurrentPage.As<BHGLogin>().ClickAutoLogin();
Browser.Current.Navigate().GoToUrl("http://rgomez:[email protected]/app/AppV3BHG.vc?vcqs=TransientKey~%60119574%60~ApplicationNum~%60211432%60~c~%60-1097023819");
DriverWait.WaitForPageLoaded();
_CurrentPage = GetInstance<BHGLogin>();
// _CurrentPage = _CurrentPage.As<BHGLogin>().ClickAutoLogin();
}
//[Given(@"I have entered the second set of required questions")]
public void GivenIHaveEnteredTheSecondSetOfRequiredQuestions()
{
}
// [Given(@"I have entered the required data for a first scoring")]
public void GivenIHaveEnteredTheRequiredDataForAFirstScoring()
{
_CurrentPage.As<BHGApplicationPage>().ClearTextGuarantorFields();
_CurrentPage.As<BHGApplicationPage>().CompleteGuarantorName("Hoy","G","Barber");
_CurrentPage.As<BHGApplicationPage>().CompleteGuarantorAddress("3535 Michigan","Dallas","Texas","33315");
_CurrentPage.As<BHGApplicationPage>().CompleteGuarantorPersonalInformation("Owner","05/05/1982","894344475","[email protected]");
_CurrentPage.As<BHGApplicationPage>().CompleteGuarantorMedicalAndIncome("Salaried", "No Secondary Source of Income", "Physician/Surgeon (MD)", "Texas", "Yes");
_CurrentPage.As<BHGApplicationPage>().CompleteInterviewQuestionsFirst("Business Development", "25000", "No","No", "Yes","No","9545551212","05/05/2005");
_CurrentPage.As<BHGApplicationPage>().CompletePersonalIncome("250000","0.00","0.00");
_CurrentPage.As<BHGApplicationPage>().ClickAutoFillButton();
_CurrentPage.As<BHGApplicationPage>().WaitForPageUpdate();
}
// [Given(@"I have entered the second set of required questions for a passing Contingent Approval")]
public void GivenIHaveEnteredTheSecondSetOfRequiredQuestionsForAPassingContingentApproval()
{
_CurrentPage.As<BHGApplicationPage>().CompleteInterviewQuestionsSecondScore("No", "No","Yes","No", "Yes","No","Texas", "No", "No","No","Yes","Yes","No", "05/05/2005");
_CurrentPage.As<BHGApplicationPage>().CompletePFSAssets("25000","85000","200000","0.00","0.00");
_CurrentPage.As<BHGApplicationPage>().CompletePFSLiabilitiesAmounts("15000","0.00","0.00","0.00","100000","0.00","0.00");
_CurrentPage.As<BHGApplicationPage>().CompletePFSLiablitiesPayments("900","0.00","0.00","0.00","750","0.00","0.00");
}
// [Given(@"I have done a first scoring")]
public void GivenIHaveDoneAFirstScoring()
{
_CurrentPage.As<BHGApplicationPage>().ClickScoreButton();
_CurrentPage.As<BHGApplicationPage>().VerifyFirstScoreText();
}
//[When(@"I press Score")]
public void WhenIPressScore()
{
_CurrentPage.As<BHGApplicationPage>().ClickScoreButton();
}
// [Then(@"the message for appoved Contingent Approval should be on the screen")]
public void ThenTheMessageForAppovedContingentApprovalShouldBeOnTheScreen()
{
_CurrentPage.As<BHGApplicationPage>().VerifyContingentApprovalText();
}
//[Given(@"I have added a user in the database")]
public void GivenIHaveAddedAUserInTheDatabase()
{
string script = File.ReadAllText("creatingrecords.sql");
string connectionString = "Data Source=bhg-colo-sq05;Initial Catalog=Vision;Integrated Security=True";
SqlConnection ApplicationCon = new SqlConnection(connectionString);
ServerConnection svrConnection = new ServerConnection(ApplicationCon);
Server server = new Server(svrConnection);
server.ConnectionContext.ExecuteNonQuery(script);
}
//[Given(@"I click on the practitioner list")]
public void GivenIClickOnThePractitionerList()
{
_CurrentPage = GetInstance<BHGLogin>();
_CurrentPage = _CurrentPage.As<BHGLogin>().ClickPractitionerLink();
}
// [When(@"I click on the homepage link in the navbar")]
public void WhenIClickOnTheHomepageLinkInTheNavbar()
{
_CurrentPage.As<BHGPrac>().isAt();
_CurrentPage = _CurrentPage.As<BHGPrac>().ClickHomeLink();
}
// [Then(@"I am on the homepage")]
public void ThenIAmOnTheHomepage()
{
_CurrentPage.As<BHGLogin>().isAt();
}
}
}