@trevordsouzabrite/test-package 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/playwright-test-generator.md +85 -0
- package/.claude/agents/playwright-test-healer.md +45 -0
- package/.claude/agents/playwright-test-planner.md +52 -0
- package/.claude/prompts/playwright-test-coverage.md +31 -0
- package/.claude/prompts/playwright-test-generate.md +12 -0
- package/.claude/prompts/playwright-test-heal.md +6 -0
- package/.claude/prompts/playwright-test-plan.md +12 -0
- package/.claude/settings.local.json +31 -0
- package/.github/agents/playwright-test-generator.agent.md +113 -0
- package/.github/agents/playwright-test-healer.agent.md +70 -0
- package/.github/agents/playwright-test-planner.agent.md +82 -0
- package/.github/prompts/playwright-test-coverage.prompt.md +31 -0
- package/.github/prompts/playwright-test-generate.prompt.md +12 -0
- package/.github/prompts/playwright-test-heal.prompt.md +6 -0
- package/.github/prompts/playwright-test-plan.prompt.md +9 -0
- package/.github/workflows/copilot-setup-steps.yml +34 -0
- package/.github/workflows/playwright-healer-agent.yml +140 -0
- package/.github/workflows/playwright.yml +40 -0
- package/.mcp.json +13 -0
- package/.vscode/extensions.json +6 -0
- package/.vscode/mcp.json +13 -0
- package/.vscode/settings.example.json +15 -0
- package/bitbucket-pipelines.yml +86 -0
- package/lib/WebActions.ts +107 -0
- package/package.json +33 -0
- package/pageRepository/ApplicantPage.ts +1171 -0
- package/pageRepository/CreateApplicationPage.ts +1736 -0
- package/playwright/.auth/user.json +0 -0
- package/specs/Applicant Create Application Page Test Plan.md +440 -0
- package/specs/Applicant Dashboard Page Test Plan.md +74 -0
- package/specs/Applicant Forgot Password Page Test Plan.md +112 -0
- package/specs/Applicant Help Page Test Plan.md +369 -0
- package/specs/Applicant Landing Page Test Plan.md +42 -0
- package/specs/Applicant Login Page Test Plan.md +116 -0
- package/specs/Applicant My Applications Page Test Plan.md +558 -0
- package/specs/Applicant My Medical Coverage Page Test Plan.md +689 -0
- package/specs/Applicant Privacy Policy Page Test Plan.md +196 -0
- package/specs/Applicant Resources Page Test Plan.md +107 -0
- package/specs/Applicant Self Register Page Test Plan.md +190 -0
- package/specs/README.md +3 -0
- package/test-data/Sample.png +0 -0
- package/test-data/createApplication/formData.json +42 -0
- package/test-data/createApplication/textMessages.json +52 -0
- package/test-data/forgotPassword/email.json +5 -0
- package/test-data/forgotPassword/textMessages.json +5 -0
- package/test-data/help/textContent.json +48 -0
- package/test-data/login/invalidUsernamePassword.json +4 -0
- package/test-data/login/textMessages.json +5 -0
- package/test-data/privacyPolicy/textContent.json +25 -0
- package/test-data/selfRegister/mailingAddressStates.json +21 -0
- package/test-data/selfRegister/registrationFieldData.json +13 -0
- package/test-data/selfRegister/suffix.json +3 -0
- package/test-data/selfRegister/textMessages.json +13 -0
- package/test-data/test-data.zip +0 -0
- package/tests/ApplicantCreateApplicationPageTest.spec.ts +1452 -0
- package/tests/ApplicantDashboardPageTest.spec.ts +74 -0
- package/tests/ApplicantForgotPasswordPageTest.spec.ts +88 -0
- package/tests/ApplicantHelpPageTest.spec.ts +468 -0
- package/tests/ApplicantLandingPageTest.spec.ts +33 -0
- package/tests/ApplicantLoginPageTest.spec.ts +117 -0
- package/tests/ApplicantMyApplicationsPageTest.spec.ts +516 -0
- package/tests/ApplicantMyMedicalCoveragePageTest.spec.ts +470 -0
- package/tests/ApplicantPrivacyPolicyPageTest.spec.ts +188 -0
- package/tests/ApplicantResourcesPageTest.spec.ts +117 -0
- package/tests/ApplicantSelfRegisterPageTest.spec.ts +254 -0
- package/tests/auth.setup.ts +42 -0
- package/tests/authState.ts +15 -0
- package/tests/example.spec.ts +18 -0
- package/tests/seed.spec.ts +7 -0
|
@@ -0,0 +1,1736 @@
|
|
|
1
|
+
import { expect, Locator, Page, BrowserContext, type Dialog } from '@playwright/test';
|
|
2
|
+
import { WebActions } from '@lib/WebActions';
|
|
3
|
+
import createApplicationFormData from '../test-data/createApplication/formData.json';
|
|
4
|
+
|
|
5
|
+
/** Income sources used by `fillApplicantIncomeScreenRandomly` when applicant answered Yes. */
|
|
6
|
+
export type ApplicantIncomeSimpleSource =
|
|
7
|
+
| 'Paycheck (last 4 weeks of paystubs must be provided)'
|
|
8
|
+
| 'Pension'
|
|
9
|
+
| 'Rental Income'
|
|
10
|
+
| 'Self Employed'
|
|
11
|
+
| 'Four Zero One K'
|
|
12
|
+
| 'Social Security Retirement'
|
|
13
|
+
| 'SSDI'
|
|
14
|
+
| 'Unemployment Compensation'
|
|
15
|
+
| 'Interest Income'
|
|
16
|
+
| 'Annuity Payments'
|
|
17
|
+
| 'Dividends';
|
|
18
|
+
|
|
19
|
+
export type ApplicantIncomeScreenFillResult =
|
|
20
|
+
| {
|
|
21
|
+
receivedIncome: 'Yes';
|
|
22
|
+
/** Monthly amount filled on Applicant Income per source (keys = picked sources). */
|
|
23
|
+
amountsBySource: Partial<Record<ApplicantIncomeSimpleSource, string>>;
|
|
24
|
+
/** Value read from "Total Primary Applicant Income Monthly" after amounts were entered. */
|
|
25
|
+
totalPrimaryApplicantIncomeMonthly: string;
|
|
26
|
+
}
|
|
27
|
+
| { receivedIncome: 'No' };
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Return type when Applicant Income is completed with **Yes** (including when `receivedIncome` is omitted and defaults to Yes).
|
|
31
|
+
* Used as the overload return type so callers get `amountsBySource` and `totalPrimaryApplicantIncomeMonthly` without narrowing
|
|
32
|
+
* the full {@link ApplicantIncomeScreenFillResult} union.
|
|
33
|
+
*/
|
|
34
|
+
export type ApplicantIncomeScreenFillResultYes = Extract<
|
|
35
|
+
ApplicantIncomeScreenFillResult,
|
|
36
|
+
{ receivedIncome: 'Yes' }
|
|
37
|
+
>;
|
|
38
|
+
|
|
39
|
+
/** Shared ordering for random income source selection (Applicant Income + household member income). */
|
|
40
|
+
const SIMPLE_INCOME_SOURCES: readonly ApplicantIncomeSimpleSource[] = [
|
|
41
|
+
'Paycheck (last 4 weeks of paystubs must be provided)',
|
|
42
|
+
'Pension',
|
|
43
|
+
'Rental Income',
|
|
44
|
+
'Self Employed',
|
|
45
|
+
'Four Zero One K',
|
|
46
|
+
'Social Security Retirement',
|
|
47
|
+
'SSDI',
|
|
48
|
+
'Unemployment Compensation',
|
|
49
|
+
'Interest Income',
|
|
50
|
+
'Annuity Payments',
|
|
51
|
+
'Dividends',
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
export class CreateApplicationPage {
|
|
55
|
+
readonly page: Page;
|
|
56
|
+
//readonly context: BrowserContext;
|
|
57
|
+
//readonly webActions: WebActions;
|
|
58
|
+
|
|
59
|
+
readonly ApplicationDetailsCompleted_Button: Locator;
|
|
60
|
+
|
|
61
|
+
readonly ApplicationLanguageTitle_Lbl: Locator;
|
|
62
|
+
readonly PreferredLanguage_Lbl: Locator;
|
|
63
|
+
readonly PreferredLanguage_Input: Locator;
|
|
64
|
+
readonly ApplicationDetailsTitle_Lbl: Locator;
|
|
65
|
+
readonly FirstName_Lbl: Locator;
|
|
66
|
+
readonly FirstName_Input: Locator;
|
|
67
|
+
readonly MiddleName_Lbl: Locator;
|
|
68
|
+
readonly MiddleName_Input: Locator;
|
|
69
|
+
readonly LastName_Lbl: Locator;
|
|
70
|
+
readonly LastName_Input: Locator;
|
|
71
|
+
readonly Suffix_Lbl: Locator;
|
|
72
|
+
readonly SuffixField_dd: Locator;
|
|
73
|
+
readonly DOB_Lbl: Locator;
|
|
74
|
+
readonly DOB_Input: Locator;
|
|
75
|
+
readonly SSN_Lbl: Locator;
|
|
76
|
+
readonly SSN_Input: Locator;
|
|
77
|
+
readonly Email_Lbl: Locator;
|
|
78
|
+
readonly Email_Input: Locator;
|
|
79
|
+
readonly Landline_lbl: Locator;
|
|
80
|
+
readonly Landline_Input: Locator;
|
|
81
|
+
readonly CellPhone_Lbl: Locator;
|
|
82
|
+
readonly CellPhone_Input: Locator;
|
|
83
|
+
readonly isPrimaryPhoneLandlineOrCellPhone_Lbl: Locator;
|
|
84
|
+
readonly isPrimaryPhoneLandlineOrCellPhone_dd: Locator;
|
|
85
|
+
readonly Race_Lbl: Locator;
|
|
86
|
+
readonly Race_dd: Locator;
|
|
87
|
+
readonly Ethnicity_Lbl: Locator;
|
|
88
|
+
readonly Ethnicity_dd: Locator;
|
|
89
|
+
readonly Gender_Lbl: Locator;
|
|
90
|
+
readonly Gender_dd: Locator;
|
|
91
|
+
readonly MaritalStatus_Lbl: Locator;
|
|
92
|
+
readonly MaritalStatus_dd: Locator;
|
|
93
|
+
readonly Citizenship_Lbl: Locator;
|
|
94
|
+
readonly Citizenship_dd: Locator;
|
|
95
|
+
readonly Veteran_Lbl: Locator;
|
|
96
|
+
readonly Veteran_dd: Locator;
|
|
97
|
+
readonly Language_Lbl: Locator;
|
|
98
|
+
readonly Language_dd: Locator;
|
|
99
|
+
readonly InsuranceCoverage_Lbl: Locator;
|
|
100
|
+
readonly InsuranceCoverage_dd: Locator;
|
|
101
|
+
readonly IAmCurrentlyHomeless_ChkBox: Locator;
|
|
102
|
+
readonly dropdown_List: Locator;
|
|
103
|
+
readonly dropdownList_Item: Locator;
|
|
104
|
+
|
|
105
|
+
readonly PhysicalAddress_Card: Locator;
|
|
106
|
+
readonly PhysicalAddressTitle_Lbl: Locator;
|
|
107
|
+
readonly PhysicalAddressHint_Lbl: Locator;
|
|
108
|
+
readonly PhysicalAddressAddressField_Input: Locator;
|
|
109
|
+
readonly PhysicalAddressCountryField_Lbl: Locator;
|
|
110
|
+
readonly PhysicalAddressCountryField_dd: Locator;
|
|
111
|
+
readonly PhysicalAddressStreetField_Lbl: Locator;
|
|
112
|
+
readonly PhysicalAddressStreetField_Input: Locator;
|
|
113
|
+
readonly PhysicalAddressCityField_Lbl: Locator;
|
|
114
|
+
readonly PhysicalAddressCityField_Input: Locator;
|
|
115
|
+
readonly PhysicalAddressStateField_Lbl: Locator;
|
|
116
|
+
readonly PhysicalAddressStateField_dd: Locator;
|
|
117
|
+
readonly PhysicalAddressZIP_Lbl: Locator;
|
|
118
|
+
readonly PhysicalAddressZIP_Input: Locator;
|
|
119
|
+
|
|
120
|
+
readonly MailingAddress_Card: Locator;
|
|
121
|
+
readonly MailingAddressTitle_Lbl: Locator;
|
|
122
|
+
readonly MailingAddress_SameAsPhysical_Toggle: Locator;
|
|
123
|
+
readonly MailingAddressHint_Lbl: Locator;
|
|
124
|
+
readonly MailingAddressAddressField_Input: Locator;
|
|
125
|
+
readonly MailingAddressCountryField_Lbl: Locator;
|
|
126
|
+
readonly MailingAddressCountryField_dd: Locator;
|
|
127
|
+
readonly MailingAddressStreetField_Lbl: Locator;
|
|
128
|
+
readonly MailingAddressStreetField_Input: Locator;
|
|
129
|
+
readonly MailingAddressCityField_Lbl: Locator;
|
|
130
|
+
readonly MailingAddressCityField_Input: Locator;
|
|
131
|
+
readonly MailingAddressStateField_Lbl: Locator;
|
|
132
|
+
readonly MailingAddressStateField_dd: Locator;
|
|
133
|
+
readonly MailingAddressZIP_Lbl: Locator;
|
|
134
|
+
readonly MailingAddressZIP_Input: Locator;
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
readonly ApplicantIncomeTitle_Lbl: Locator;
|
|
138
|
+
readonly HaveYouReceivedIncomeInLast30Days_Block: Locator;
|
|
139
|
+
readonly HaveYouReceivedIncomeInLast30Days_dd: Locator;
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
readonly IncomeSource_Block: Locator;
|
|
143
|
+
readonly IncomeSource_Lbl: Locator;
|
|
144
|
+
|
|
145
|
+
readonly Paycheck_ChkBox: Locator;
|
|
146
|
+
readonly Pension_ChkBox: Locator;
|
|
147
|
+
readonly RentalIncome_ChkBox: Locator;
|
|
148
|
+
readonly SelfEmployed_ChkBox: Locator;
|
|
149
|
+
readonly FourZeroOneK_ChkBox: Locator;
|
|
150
|
+
readonly SocialSecurityRetirement_ChkBox: Locator;
|
|
151
|
+
readonly SSDI_ChkBox: Locator;
|
|
152
|
+
readonly UnemploymentCompensation_ChkBox: Locator;
|
|
153
|
+
readonly InterestIncome_ChkBox: Locator;
|
|
154
|
+
readonly AnnuityPayments_ChkBox: Locator;
|
|
155
|
+
readonly Dividends_ChkBox: Locator;
|
|
156
|
+
|
|
157
|
+
readonly PaycheckMessage_Lbl: Locator;
|
|
158
|
+
readonly ICanProvideLastYearTaxReturn_ChkBox: Locator;
|
|
159
|
+
readonly ICanHaveMyEmployerComplete_ChkBox: Locator;
|
|
160
|
+
readonly EmployerVerification_Block: Locator;
|
|
161
|
+
readonly EmployerVerficationForm_Lnk: Locator;
|
|
162
|
+
readonly FirstEmployer_Block: Locator;
|
|
163
|
+
readonly FirstEmployer_Name_Block: Locator;
|
|
164
|
+
readonly FirstEmployer_Name_Txtbox: Locator;
|
|
165
|
+
readonly DoYouWantToAddAnotherEmployer_dd: Locator;
|
|
166
|
+
readonly FirstEmployerGMI_Block: Locator;
|
|
167
|
+
readonly FirstEmployerGMI_Txtbox: Locator;
|
|
168
|
+
readonly SecondEmployer_Block: Locator;
|
|
169
|
+
readonly ThirdEmployer_Block: Locator;
|
|
170
|
+
|
|
171
|
+
readonly Pension_Block: Locator;
|
|
172
|
+
readonly MonthlyPensionAmount_Block: Locator;
|
|
173
|
+
readonly MonthlyPensionAmount_Txtbox: Locator;
|
|
174
|
+
|
|
175
|
+
readonly RentalIncome_Block: Locator;
|
|
176
|
+
readonly RentalIncomeAmount_Block: Locator;
|
|
177
|
+
readonly RentalIncomeAmount_Txtbox: Locator;
|
|
178
|
+
|
|
179
|
+
readonly SelfEmployed_Block: Locator;
|
|
180
|
+
readonly SelfEmploymentValidation_Block: Locator;
|
|
181
|
+
readonly SelfEmploymentValidation_dd: Locator;
|
|
182
|
+
readonly ICertifyThatIAmSelfEmployed_ChkBox: Locator;
|
|
183
|
+
readonly SelfEmploymentName_Block: Locator;
|
|
184
|
+
readonly SelfEmploymentName_Txtbox: Locator;
|
|
185
|
+
readonly DateOfCertificationTodayDate_Block: Locator;
|
|
186
|
+
readonly DateOfCertificationTodayDate_Txtbox: Locator;
|
|
187
|
+
readonly DatePicker: Locator;
|
|
188
|
+
readonly DatePickerToday_Btn: Locator;
|
|
189
|
+
readonly SelfEmploymentTypeOfWork_Block: Locator;
|
|
190
|
+
readonly SelfEmploymentTypeOfWork_Txtbox: Locator;
|
|
191
|
+
readonly SelfEmployedAmount_Block: Locator;
|
|
192
|
+
readonly SelfEmployedAmount_Txtbox: Locator;
|
|
193
|
+
|
|
194
|
+
readonly FourZeroOneK_Block: Locator;
|
|
195
|
+
readonly FourZeroOneKAmount_Block: Locator;
|
|
196
|
+
readonly FourZeroOneKAmount_Txtbox: Locator;
|
|
197
|
+
|
|
198
|
+
readonly SocialSecurityRetirement_Block: Locator;
|
|
199
|
+
readonly SocialSecurityRetirementAmount_Block: Locator;
|
|
200
|
+
readonly SocialSecurityRetirementAmount_Txtbox: Locator;
|
|
201
|
+
|
|
202
|
+
readonly SSDI_Block: Locator;
|
|
203
|
+
readonly SSDIAmount_Block: Locator;
|
|
204
|
+
readonly SSDIAmount_Txtbox: Locator;
|
|
205
|
+
|
|
206
|
+
readonly UnemploymentCompensation_Block: Locator;
|
|
207
|
+
readonly UnemploymentCompensationAmount_Block: Locator;
|
|
208
|
+
readonly UnemploymentCompensationAmount_Txtbox: Locator;
|
|
209
|
+
|
|
210
|
+
readonly InterestIncome_Block: Locator;
|
|
211
|
+
readonly InterestIncomeAmount_Block: Locator;
|
|
212
|
+
readonly InterestIncomeAmount_Txtbox: Locator;
|
|
213
|
+
|
|
214
|
+
readonly AnnuityPayments_Block: Locator;
|
|
215
|
+
readonly AnnuityPaymentsAmount_Block: Locator;
|
|
216
|
+
readonly AnnuityPaymentsAmount_Txtbox: Locator;
|
|
217
|
+
|
|
218
|
+
readonly Dividends_Block: Locator;
|
|
219
|
+
readonly DividendsAmount_Block: Locator;
|
|
220
|
+
readonly DividendsAmount_Txtbox: Locator;
|
|
221
|
+
|
|
222
|
+
readonly TotalPrimaryApplicantIncomeMonthly_Block: Locator;
|
|
223
|
+
readonly TotalPrimaryApplicantIncomeMonthly_Txtbox: Locator;
|
|
224
|
+
|
|
225
|
+
readonly NotWorkingExplaination_Block: Locator;
|
|
226
|
+
readonly NotWorkingExplaination_Txtbox: Locator;
|
|
227
|
+
readonly Explain30DaysExpense_Block: Locator;
|
|
228
|
+
readonly Explain30DaysExpense_Txtbox: Locator;
|
|
229
|
+
readonly ReceiveSupportForNecessities_Block: Locator;
|
|
230
|
+
readonly ReceiveSupportForNecessities_dd: Locator;
|
|
231
|
+
readonly ThirdPartySupport_Block: Locator;
|
|
232
|
+
readonly EngageInFinancialTransactions_Block: Locator;
|
|
233
|
+
readonly EngageInFinancialTransactions_dd: Locator;
|
|
234
|
+
readonly EngageInFinancialTransactions_ddl: Locator;
|
|
235
|
+
readonly PubicAssitanceChxbox_Block: Locator;
|
|
236
|
+
readonly SSI_ChkBox: Locator;
|
|
237
|
+
readonly VABenefits_ChkBox: Locator;
|
|
238
|
+
readonly SNAPBenefits_ChkBox: Locator;
|
|
239
|
+
readonly SubsidizedHousing_ChkBox: Locator;
|
|
240
|
+
readonly Alimony_ChkBox: Locator;
|
|
241
|
+
readonly ChildSupport_ChkBox: Locator;
|
|
242
|
+
readonly NoneOfTheAbove_ChkBox: Locator;
|
|
243
|
+
|
|
244
|
+
readonly HouseholdMembersIncomeTitle_Lbl: Locator;
|
|
245
|
+
readonly Hint_Btn: Locator;
|
|
246
|
+
readonly Hint_Text: Locator;
|
|
247
|
+
readonly AddHouseholdMember_Btn: Locator;
|
|
248
|
+
readonly TotalNumberOfHouseholdMembers_Lbl: Locator;
|
|
249
|
+
readonly TotalNumberOfHouseholdMembers_Value: Locator;
|
|
250
|
+
readonly TotalMonthlyHouseholdIncome_Lbl: Locator;
|
|
251
|
+
readonly TotalMonthlyHouseholdIncome_Value: Locator;
|
|
252
|
+
readonly FPLPercentage_Lbl: Locator;
|
|
253
|
+
readonly FPLPercentage_Value: Locator;
|
|
254
|
+
|
|
255
|
+
readonly EditPrimaryTitle_Lbl: Locator;
|
|
256
|
+
readonly HouseholdIncomeSource_Lbl: Locator;
|
|
257
|
+
//readonly HouseholdPaycheckMostRecent_Text: Locator;
|
|
258
|
+
readonly HouseholdPaycheckAlternate_Text: Locator;
|
|
259
|
+
readonly HouseholdPaycheck_Block: Locator;
|
|
260
|
+
readonly HouseholdFirstEmployerGMI_Txtbox: Locator;
|
|
261
|
+
|
|
262
|
+
readonly HouseholdPension_Block: Locator;
|
|
263
|
+
readonly HouseholdPensionAmount_Txtbox: Locator;
|
|
264
|
+
|
|
265
|
+
readonly HouseholdRentalProperty_Block: Locator;
|
|
266
|
+
readonly HouseholdRentalPropertyAmount_Txtbox: Locator;
|
|
267
|
+
|
|
268
|
+
readonly HouseholdSelfEmployed_Block: Locator;
|
|
269
|
+
readonly HouseholdICertifyThatIAmSelfEmployed_ChkBox: Locator;
|
|
270
|
+
readonly HouseholdSelfEmployedAmount_Txtbox: Locator;
|
|
271
|
+
|
|
272
|
+
readonly HouseholdFourZeroOneK_Block: Locator;
|
|
273
|
+
readonly HouseholdFourZeroOneKAmount_Txtbox: Locator;
|
|
274
|
+
|
|
275
|
+
readonly HouseholdSocialSecurityRetirement_Block: Locator;
|
|
276
|
+
readonly HouseholdSocialSecurityRetirementAmount_Txtbox: Locator;
|
|
277
|
+
|
|
278
|
+
readonly HouseholdSSDI_Block: Locator;
|
|
279
|
+
readonly HouseholdSSDIAmount_Txtbox: Locator;
|
|
280
|
+
|
|
281
|
+
readonly HouseholdUnemploymentCompensation_Block: Locator;
|
|
282
|
+
readonly HouseholdUnemploymentCompensationAmount_Txtbox: Locator;
|
|
283
|
+
|
|
284
|
+
readonly HouseholdInterestIncome_Block: Locator;
|
|
285
|
+
readonly HouseholdInterestIncomeAmount_Txtbox: Locator;
|
|
286
|
+
|
|
287
|
+
readonly HouseholdAnnuityPayments_Block: Locator;
|
|
288
|
+
readonly HouseholdAnnuityPaymentsAmount_Txtbox: Locator;
|
|
289
|
+
|
|
290
|
+
readonly HouseholdDividends_Block: Locator;
|
|
291
|
+
readonly HouseholdDividendsAmount_Txtbox: Locator;
|
|
292
|
+
|
|
293
|
+
readonly HouseholdTotalMonthlyIncome_Lbl: Locator;
|
|
294
|
+
readonly HouseholdTotalMonthlyHouseholdIncome_Value: Locator;
|
|
295
|
+
|
|
296
|
+
readonly HouseholdNotWorkingExplaination_Block: Locator;
|
|
297
|
+
readonly HouseholdExplain30DaysExpense_Block: Locator;
|
|
298
|
+
readonly HouseholdReceiveSupportForNecessities_Block: Locator;
|
|
299
|
+
readonly HouseholdEngageInFinancialTransactions_Block: Locator;
|
|
300
|
+
readonly HouseholdReceivingAssistance_Lbl: Locator;
|
|
301
|
+
|
|
302
|
+
readonly HouseholdFirstName_Lbl: Locator;
|
|
303
|
+
readonly HouseholdMiddleName_Lbl: Locator;
|
|
304
|
+
readonly HouseholdLastName_Lbl: Locator;
|
|
305
|
+
readonly HouseholdDOB_Lbl: Locator;
|
|
306
|
+
readonly HouseholdSSN_Lbl: Locator;
|
|
307
|
+
readonly HouseholdSSN_Txtbox: Locator;
|
|
308
|
+
readonly RelationshipToApplicant_Block: Locator;
|
|
309
|
+
readonly RelationshipToApplicant_dd: Locator;
|
|
310
|
+
readonly RelationshipToApplicant_ddl: Locator;
|
|
311
|
+
readonly HouseholdMemberGender_Block: Locator;
|
|
312
|
+
readonly HouseholdMemberMaritalStatus_Block: Locator;
|
|
313
|
+
readonly HouseholdMemberSeekingBenefits_Block: Locator;
|
|
314
|
+
readonly HouseholdMemberSeekingBenefits_dd: Locator;
|
|
315
|
+
readonly HouseholdMemberSeekingBenefits_ddl: Locator;
|
|
316
|
+
readonly HouseholdMemberHasIncome_Block: Locator;
|
|
317
|
+
readonly HouseholdMemberHasIncome_dd: Locator;
|
|
318
|
+
readonly HouseholdMemberHasIncome_ddl: Locator;
|
|
319
|
+
|
|
320
|
+
readonly DeleteHouseholdMember_Popup: Locator;
|
|
321
|
+
readonly DeletePopup_Heading: Locator;
|
|
322
|
+
readonly DeletePopup_Message2: Locator;
|
|
323
|
+
readonly DeletePopup_MessagePoint1: Locator;
|
|
324
|
+
readonly DeletePopup_MessagePoint2: Locator;
|
|
325
|
+
readonly DeletePopup_MessagePoint3: Locator;
|
|
326
|
+
readonly DeleteSuccess_Message: Locator;
|
|
327
|
+
|
|
328
|
+
readonly Next_Btn: Locator;
|
|
329
|
+
readonly Previous_Btn: Locator;
|
|
330
|
+
readonly Edit_Btn: Locator;
|
|
331
|
+
readonly Save_Btn: Locator;
|
|
332
|
+
readonly Cancel_Btn: Locator;
|
|
333
|
+
readonly Update_Btn: Locator;
|
|
334
|
+
readonly Delete_Btn: Locator;
|
|
335
|
+
readonly Help_Text: Locator;
|
|
336
|
+
readonly Done_Btn: Locator;
|
|
337
|
+
|
|
338
|
+
readonly DocumentsTitle_Lbl: Locator;
|
|
339
|
+
readonly DocumentsNotify_Lbl: Locator;
|
|
340
|
+
readonly DocumentsInstructions_Text: Locator;
|
|
341
|
+
readonly MemberwiseDocuments_Block: Locator;
|
|
342
|
+
readonly MemberwiseName_Lbl: Locator;
|
|
343
|
+
readonly DocumentUploadIdentificationCard_UploadFiles: Locator;
|
|
344
|
+
readonly DocumentUploadProofOfSelfEmployment_UploadFiles: Locator;
|
|
345
|
+
readonly DocumentUploadPaycheck_UploadFiles: Locator;
|
|
346
|
+
readonly DocumentUpload401KWithdrawal_UploadFiles: Locator;
|
|
347
|
+
readonly DocumentUploadAnnuityPayments_UploadFiles: Locator;
|
|
348
|
+
readonly DocumentUploadDividends_UploadFiles: Locator;
|
|
349
|
+
readonly DocumentUploadInterestIncome_UploadFiles: Locator;
|
|
350
|
+
readonly DocumentUploadPension_UploadFiles: Locator;
|
|
351
|
+
readonly DocumentUploadRentalProperty_UploadFiles: Locator;
|
|
352
|
+
readonly DocumentUploadSocialSecurityRetirement_UploadFiles: Locator;
|
|
353
|
+
readonly DocumentUploadSSDI_UploadFiles: Locator;
|
|
354
|
+
readonly DocumentUploadUnemploymentCompensation_UploadFiles: Locator;
|
|
355
|
+
readonly DocumentUploadVerificationOfEarningsForm_UploadFiles: Locator;
|
|
356
|
+
readonly DocumentUploadTaxReturn_UploadFiles: Locator;
|
|
357
|
+
readonly DocumentUpload_Dialog: Locator;
|
|
358
|
+
readonly DocumentUploadSuccess_Icon: Locator;
|
|
359
|
+
readonly DocumentView_Btn: Locator;
|
|
360
|
+
readonly DocumentDelete_Btn: Locator;
|
|
361
|
+
|
|
362
|
+
readonly UploadedDocument_Lbl: Locator;
|
|
363
|
+
readonly UploadedDocuments_Table: Locator;
|
|
364
|
+
|
|
365
|
+
readonly EnrollmentAcknowledgement_Block: Locator;
|
|
366
|
+
readonly EnrollmentAcknowledgementTitle_Lbl: Locator;
|
|
367
|
+
readonly EnrollmentAcknowledgementText1_Block: Locator;
|
|
368
|
+
readonly EnrollmentAcknowledgementText2_Block: Locator;
|
|
369
|
+
readonly EnrollmentAcknowledgementMemberHandbook_Lnk: Locator;
|
|
370
|
+
readonly EnrollmentAcknowledgementText3_Block: Locator;
|
|
371
|
+
readonly EnrollmentAcknowledgementText4_Block: Locator;
|
|
372
|
+
|
|
373
|
+
readonly AdditionalInformation_Block: Locator;
|
|
374
|
+
readonly PrimaryCareProvider_Block: Locator;
|
|
375
|
+
readonly PrimaryCareProvider_dd: Locator;
|
|
376
|
+
readonly PrimaryCareProvider_ddl: Locator;
|
|
377
|
+
readonly ApplicationModeOfUpdates_Block: Locator;
|
|
378
|
+
readonly ApplicationModeOfUpdates_Email_ChkBox: Locator;
|
|
379
|
+
readonly ApplicationModeOfUpdates_TextMessage_ChkBox: Locator;
|
|
380
|
+
readonly ApplicationModeOfUpdates_Telephone_ChkBox: Locator;
|
|
381
|
+
readonly PlanModeOfUpdates_Block: Locator;
|
|
382
|
+
readonly PlanModeOfUpdates_Email_ChkBox: Locator;
|
|
383
|
+
readonly PlanModeOfUpdates_TextMessage_ChkBox: Locator;
|
|
384
|
+
readonly PlanModeOfUpdates_Telephone_ChkBox: Locator;
|
|
385
|
+
readonly PlanModeOfUpdates_NoContact_ChkBox: Locator;
|
|
386
|
+
readonly SMSPrivacyDisclosure_Block: Locator;
|
|
387
|
+
readonly PreviewApplication_Lnk: Locator;
|
|
388
|
+
readonly PreviewApplication_iframe: Locator;
|
|
389
|
+
readonly ICertifyThat_Lbl: Locator;
|
|
390
|
+
readonly TypeLegalName_Textbox: Locator;
|
|
391
|
+
readonly TodayDate_Textbox: Locator;
|
|
392
|
+
readonly Disclaimer_Lbl: Locator;
|
|
393
|
+
|
|
394
|
+
readonly SignConsentFormTitle_Lbl: Locator;
|
|
395
|
+
readonly SignConsentForm_Header: Locator;
|
|
396
|
+
readonly NameAndInformation_Block: Locator;
|
|
397
|
+
readonly UseAndDislosure_Block: Locator;
|
|
398
|
+
readonly UseAndDislosure_Text: Locator;
|
|
399
|
+
readonly ConsentInformation_ChkBox: Locator;
|
|
400
|
+
readonly Signature_Block: Locator;
|
|
401
|
+
readonly Signature_Canvas: Locator;
|
|
402
|
+
readonly SignatureHint_Lbl: Locator;
|
|
403
|
+
readonly AcceptSignature_Button: Locator;
|
|
404
|
+
readonly Clear_Button: Locator;
|
|
405
|
+
readonly AgreeAndConsent_Button: Locator;
|
|
406
|
+
readonly ThanksSubmitApplication_Block: Locator;
|
|
407
|
+
readonly ConsentFormAlreadySubmitted_Block: Locator;
|
|
408
|
+
readonly SubmitApplication_Button: Locator;
|
|
409
|
+
readonly ClickNextToSocialServicesAssesment_Lbl: Locator;
|
|
410
|
+
|
|
411
|
+
readonly ClientNeedsAssessment_Block: Locator;
|
|
412
|
+
readonly IChoose_RadioButton: Locator;
|
|
413
|
+
readonly IDecline_RadioButton: Locator;
|
|
414
|
+
readonly Housing_Block: Locator;
|
|
415
|
+
readonly HousingQuestion_dd: Locator;
|
|
416
|
+
readonly Environment_Block: Locator;
|
|
417
|
+
readonly EnvironmentQuestion_dd: Locator;
|
|
418
|
+
readonly SubstanceAbuse_Block: Locator;
|
|
419
|
+
readonly SubstanceAbuseQuestion_dd: Locator;
|
|
420
|
+
readonly MentalHealth_Block: Locator;
|
|
421
|
+
readonly MentalHealthQuestion_dd: Locator;
|
|
422
|
+
readonly Disability_Block: Locator;
|
|
423
|
+
readonly DisabilityQuestion1_dd: Locator;
|
|
424
|
+
readonly DisabilityQuestion2_dd: Locator;
|
|
425
|
+
readonly ddl_list: Locator;
|
|
426
|
+
|
|
427
|
+
readonly SubmitAssesment_Btn: Locator;
|
|
428
|
+
readonly ThankYouMessage_Lbl: Locator;
|
|
429
|
+
|
|
430
|
+
constructor(page: Page) {
|
|
431
|
+
this.page = page;
|
|
432
|
+
//Application Details Page Locators
|
|
433
|
+
|
|
434
|
+
//Steps
|
|
435
|
+
this.ApplicationDetailsCompleted_Button = page.getByRole('button', { name: 'Application Details Completed' })
|
|
436
|
+
|
|
437
|
+
//Application Language
|
|
438
|
+
this.ApplicationLanguageTitle_Lbl = page.locator('div').filter({ hasText: 'Application Language' }).last()
|
|
439
|
+
this.PreferredLanguage_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='ApplicationLang']")
|
|
440
|
+
this.PreferredLanguage_Input = page.getByRole('combobox', { name: 'Preferred Language' })
|
|
441
|
+
|
|
442
|
+
//Demographics Page Section
|
|
443
|
+
this.ApplicationDetailsTitle_Lbl = page.locator('div').filter({ hasText: 'Application Details' }).last();
|
|
444
|
+
this.FirstName_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-text[data-omni-key='AppFname']")
|
|
445
|
+
this.FirstName_Input = page.getByRole('textbox', { name: 'First Name' });
|
|
446
|
+
this.MiddleName_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-text[data-omni-key='AppMName']")
|
|
447
|
+
this.MiddleName_Input = page.getByRole('textbox', { name: 'Middle Initial' });
|
|
448
|
+
this.LastName_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-text[data-omni-key='AppLName']")
|
|
449
|
+
this.LastName_Input = page.getByRole('textbox', { name: 'Last Name' });
|
|
450
|
+
this.Suffix_Lbl = page.getByText('Suffix', { exact: true });
|
|
451
|
+
this.SuffixField_dd = page.getByRole('combobox', { name: 'Suffix' });
|
|
452
|
+
this.DOB_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-date[data-omni-key='AppDate']")
|
|
453
|
+
this.DOB_Input = page.getByRole('textbox', { name: 'Date Of Birth (Use format dd-mm-yyyy)' })
|
|
454
|
+
this.SSN_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-custom-lwc[data-omni-key='AppSSN']")
|
|
455
|
+
this.SSN_Input = page.getByRole('textbox', { name: 'SSN (Use format xxx-xx-xxxx)' })
|
|
456
|
+
this.Email_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-email[data-omni-key='AppEmail']")
|
|
457
|
+
this.Email_Input = page.getByRole('textbox', { name: 'Email' })
|
|
458
|
+
this.Landline_lbl = page.locator('span:has-text("Landline (Use format (xxx) xxx-xxxx)")')
|
|
459
|
+
this.Landline_Input = page.getByRole('textbox', { name: "Landline (Use format (xxx) xxx-xxxx)" })
|
|
460
|
+
this.CellPhone_Lbl = page.getByLabel('Cell Phone (Use format (xxx) xxx-xxxx)')
|
|
461
|
+
this.CellPhone_Input = page.getByRole('textbox', { name: 'Cell Phone (Use format (xxx) xxx-xxxx)' })
|
|
462
|
+
this.isPrimaryPhoneLandlineOrCellPhone_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='IsTelephoneType']")
|
|
463
|
+
this.isPrimaryPhoneLandlineOrCellPhone_dd = page.getByRole('combobox', { name: 'is primary phone Landline or Cell Phone?' })
|
|
464
|
+
//this.isPrimaryPhoneLandlineOrCellPhone_ddl = page.locator('div.slds-dropdown.slds-dropdown_fluid.slds-p-bottom_none.slds-dropdown_left:visible')
|
|
465
|
+
this.Race_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='AppRace']")
|
|
466
|
+
this.Race_dd = page.getByRole('combobox', { name: 'Race' })
|
|
467
|
+
//this.Race_ddl = page.locator('div.slds-dropdown.slds-dropdown_fluid.slds-p-bottom_none.slds-dropdown_left:visible')
|
|
468
|
+
this.Ethnicity_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='AppEthnicity']")
|
|
469
|
+
this.Ethnicity_dd = page.getByRole('combobox', { name: 'Ethnicity' })
|
|
470
|
+
this.Gender_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='GenderPicklist']")
|
|
471
|
+
this.Gender_dd = page.getByRole('combobox', { name: 'Gender' })
|
|
472
|
+
this.MaritalStatus_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='AppMartialStatus']")
|
|
473
|
+
this.MaritalStatus_dd = page.getByRole('combobox', { name: 'Marital Status' })
|
|
474
|
+
this.Citizenship_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='AppUsCitizen']")
|
|
475
|
+
this.Citizenship_dd = page.getByRole('combobox', { name: 'U.S. Citizen/Permanent Resident Card Holder' })
|
|
476
|
+
this.Veteran_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='AppVeteran']")
|
|
477
|
+
this.Veteran_dd = page.getByRole('combobox', { name: 'Veteran' })
|
|
478
|
+
this.Language_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='MemberLanguage']")
|
|
479
|
+
this.Language_dd = page.getByRole('combobox', { name: 'Language' })
|
|
480
|
+
this.InsuranceCoverage_Lbl = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='CurrentCovergae']")
|
|
481
|
+
this.InsuranceCoverage_dd = page.getByRole('combobox', { name: 'Insurance Coverage' })
|
|
482
|
+
this.IAmCurrentlyHomeless_ChkBox = page.locator('div').filter({ hasText: 'I am currently homeless' }).first()
|
|
483
|
+
this.dropdown_List = page.locator('.slds-combobox.slds-dropdown-trigger_click.slds-is-open > .slds-form-element__control > .slds-form-element > .slds-dropdown')
|
|
484
|
+
this.dropdownList_Item = page.locator('.slds-combobox.slds-dropdown-trigger_click.slds-is-open > .slds-form-element__control > .slds-form-element > .slds-dropdown').locator('.slds-listbox__item')
|
|
485
|
+
|
|
486
|
+
//Physical Address Section
|
|
487
|
+
this.PhysicalAddress_Card = page.locator('div.wrap').locator('section').nth(0)
|
|
488
|
+
this.PhysicalAddressTitle_Lbl = page.getByRole('heading', { name: 'Physical Address' })
|
|
489
|
+
this.PhysicalAddressHint_Lbl = page.locator('p').filter({ hasText: '(Begin typing your address and select the correct match. If your address includes an apartment or unit number; please be sure to add it manually.)' }).first()
|
|
490
|
+
this.PhysicalAddressAddressField_Input = page.locator('div.slds-combobox__form-element.slds-input-has-icon.slds-input-has-icon_right').locator('div').nth(0)
|
|
491
|
+
this.PhysicalAddressCountryField_Lbl = page.locator('label').filter({ hasText: '*Country' }).first()
|
|
492
|
+
this.PhysicalAddressCountryField_dd = page.getByRole('combobox', { name: 'Country' }).first()
|
|
493
|
+
this.PhysicalAddressStreetField_Lbl = page.locator('label').filter({ hasText: '*Street' }).first()
|
|
494
|
+
this.PhysicalAddressStreetField_Input = page.getByRole('textbox', { name: 'Street' }).first()
|
|
495
|
+
this.PhysicalAddressCityField_Lbl = page.locator('label').filter({ hasText: '*City' }).first()
|
|
496
|
+
this.PhysicalAddressCityField_Input = page.getByRole('textbox', { name: 'City' }).first()
|
|
497
|
+
this.PhysicalAddressStateField_Lbl = page.locator('label').filter({ hasText: '*State' }).first()
|
|
498
|
+
this.PhysicalAddressStateField_dd = page.getByRole('combobox', { name: 'State' }).first()
|
|
499
|
+
this.PhysicalAddressZIP_Lbl = page.getByLabel('*ZIP').first()
|
|
500
|
+
this.PhysicalAddressZIP_Input = page.getByRole('textbox', { name: 'ZIP' }).first()
|
|
501
|
+
|
|
502
|
+
//Mailing Address Section
|
|
503
|
+
this.MailingAddress_Card = page.locator('div.wrap').locator('section').nth(1)
|
|
504
|
+
this.MailingAddressTitle_Lbl = page.getByRole('heading', { name: 'Mailing Address' })
|
|
505
|
+
this.MailingAddress_SameAsPhysical_Toggle = page.locator('lightning-input:has-text("Same as Physical")');
|
|
506
|
+
this.MailingAddressHint_Lbl = page.locator('p').filter({ hasText: '(Begin typing your address and select the correct match. If your address includes an apartment or unit number; please be sure to add it manually.)' }).last()
|
|
507
|
+
this.MailingAddressAddressField_Input = page.locator("//lightning-input-address[@data-id='mailingAddress']//div[@class='slds-form-element__row slds-grow']//div[@class='slds-form-element__control']")
|
|
508
|
+
this.MailingAddressCountryField_Lbl = page.locator('label').filter({ hasText: '*Country' }).last()
|
|
509
|
+
this.MailingAddressCountryField_dd = page.getByRole('combobox', { name: 'Country' }).last()
|
|
510
|
+
this.MailingAddressStreetField_Lbl = page.locator('label').filter({ hasText: '*Street' }).last()
|
|
511
|
+
this.MailingAddressStreetField_Input = page.getByRole('textbox', { name: 'Street' }).last()
|
|
512
|
+
this.MailingAddressCityField_Lbl = page.locator('label').filter({ hasText: '*City' }).last()
|
|
513
|
+
this.MailingAddressCityField_Input = page.getByRole('textbox', { name: 'City' }).last()
|
|
514
|
+
this.MailingAddressStateField_Lbl = page.locator('label').filter({ hasText: '*State' }).last()
|
|
515
|
+
this.MailingAddressStateField_dd = page.getByRole('combobox', { name: 'State' }).last()
|
|
516
|
+
this.MailingAddressZIP_Lbl = page.getByLabel('*ZIP').last()
|
|
517
|
+
this.MailingAddressZIP_Input = page.getByRole('textbox', { name: 'ZIP' }).last()
|
|
518
|
+
|
|
519
|
+
//Applicant Income Section
|
|
520
|
+
this.ApplicantIncomeTitle_Lbl = page.locator('div').filter({ hasText: 'Applicant Income' }).last()
|
|
521
|
+
this.HaveYouReceivedIncomeInLast30Days_Block = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='ApplicantHasIncomeToReport']")
|
|
522
|
+
this.HaveYouReceivedIncomeInLast30Days_dd = page.getByRole('combobox', { name: 'Have you received income in last 30 days?' })
|
|
523
|
+
|
|
524
|
+
//Income - Block - Yes
|
|
525
|
+
//Received Income Section
|
|
526
|
+
this.IncomeSource_Block = page.locator("runtime_omnistudio_omniscript-omniscript-multiselect[data-omni-key='ApplicantIncomeSource']")
|
|
527
|
+
this.IncomeSource_Lbl = page.locator(':text("What type of MONTHLY income does applicant have? Please select all income sources that apply")')
|
|
528
|
+
|
|
529
|
+
//Income - Checkboxes (Create Application, Edit Primary Applicant)
|
|
530
|
+
this.Paycheck_ChkBox = page.getByText('Paycheck (last 4 weeks of paystubs must be provided)', { exact: true })
|
|
531
|
+
this.Pension_ChkBox = page.locator('label').filter({ hasText: 'Pension' }).first()
|
|
532
|
+
this.RentalIncome_ChkBox = page.getByText('Rental Income', { exact: true })
|
|
533
|
+
this.SelfEmployed_ChkBox = page.locator('label').filter({ hasText: 'Self Employed' }).first()
|
|
534
|
+
this.FourZeroOneK_ChkBox = page.locator('label').filter({ hasText: '401K Withdrawal' }).first()
|
|
535
|
+
this.SocialSecurityRetirement_ChkBox = page.locator('label').filter({ hasText: 'Social Security Retirement' }).first()
|
|
536
|
+
this.SSDI_ChkBox = page.locator('label').filter({ hasText: 'SSDI' }).first()
|
|
537
|
+
this.UnemploymentCompensation_ChkBox = page.locator('label').filter({ hasText: 'Unemployment Compensation' }).first()
|
|
538
|
+
this.InterestIncome_ChkBox = page.locator('label').filter({ hasText: 'Interest Income' }).first()
|
|
539
|
+
this.AnnuityPayments_ChkBox = page.locator('label').filter({ hasText: 'Annuity Payments' }).first()
|
|
540
|
+
this.Dividends_ChkBox = page.locator('label').filter({ hasText: 'Dividends' }).first()
|
|
541
|
+
|
|
542
|
+
//Income - Paycheck
|
|
543
|
+
this.PaycheckMessage_Lbl = page.locator("//strong[contains(text(),'If you do not have paystubs available you can choo')]")
|
|
544
|
+
this.ICanProvideLastYearTaxReturn_ChkBox = page.locator("runtime_omnistudio_omniscript-omniscript-checkbox[data-omni-key='ProvideLastYearTax'] runtime_omnistudio_common-input")
|
|
545
|
+
this.ICanHaveMyEmployerComplete_ChkBox = page.locator('runtime_omnistudio_omniscript-omniscript-checkbox:has-text("I can have my employer complete the Employer Verification of Earnings form.")')
|
|
546
|
+
this.EmployerVerification_Block = page.locator("runtime_omnistudio_omniscript-omniscript-custom-lwc[class='slds-p-right_small slds-m-bottom_xx-small slds-show_inline-block slds-size_12-of-12 slds-medium-size_12-of-12'] div[class='wrap']")
|
|
547
|
+
this.EmployerVerficationForm_Lnk = page.getByText('Employer Verification of Earnings form', { exact: true }).first()
|
|
548
|
+
this.FirstEmployer_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='Emp1PayBlock']")
|
|
549
|
+
this.FirstEmployer_Name_Block = page.locator("runtime_omnistudio_omniscript-omniscript-text[data-omni-key='Emp1PayName']")
|
|
550
|
+
this.FirstEmployer_Name_Txtbox = page.getByRole('textbox', { name: 'Employer Name' })
|
|
551
|
+
this.FirstEmployerGMI_Block = page.locator("runtime_omnistudio_omniscript-omniscript-currency[data-omni-key='Emp1PayAmount']")
|
|
552
|
+
this.FirstEmployerGMI_Txtbox = page.getByRole('textbox', { name: 'Gross Monthly Amount' }).first()
|
|
553
|
+
this.DoYouWantToAddAnotherEmployer_dd = page.locator('runtime_omnistudio_omniscript-omniscript-select').filter({ hasText: 'Do you want to add another Employer?' }).first()
|
|
554
|
+
this.SecondEmployer_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='Emp2PayBlock']")
|
|
555
|
+
this.ThirdEmployer_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='Emp3PayBlock']")
|
|
556
|
+
//Income - Pension
|
|
557
|
+
this.Pension_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='PensionBlock']")
|
|
558
|
+
this.MonthlyPensionAmount_Block = page.locator("runtime_omnistudio_omniscript-omniscript-currency[data-omni-key='PensionAmount']")
|
|
559
|
+
this.MonthlyPensionAmount_Txtbox = page.getByRole('textbox', { name: 'Monthly Pension Amount' })
|
|
560
|
+
//Income - Rental Income
|
|
561
|
+
this.RentalIncome_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='RentalBlock']")
|
|
562
|
+
this.RentalIncomeAmount_Block = page.locator("runtime_omnistudio_omniscript-omniscript-currency[data-omni-key='RentalPropAmount']")
|
|
563
|
+
this.RentalIncomeAmount_Txtbox = page.getByRole('textbox', { name: 'Monthly Rental Property Amount' })
|
|
564
|
+
//Income - Self Employed
|
|
565
|
+
this.SelfEmployed_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='BLkSelfEmployed']")
|
|
566
|
+
this.SelfEmploymentValidation_Block = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='SelfEmploymentValidation']")
|
|
567
|
+
this.SelfEmploymentValidation_dd = page.getByRole('combobox', { name: 'I can provide self employment validation by the following methods' })
|
|
568
|
+
this.ICertifyThatIAmSelfEmployed_ChkBox = page.locator('div').filter({ hasText: 'I certify that I am self employed' }).last()
|
|
569
|
+
this.SelfEmploymentName_Block = page.locator("runtime_omnistudio_omniscript-omniscript-text[data-omni-key='SelfEmpName']")
|
|
570
|
+
this.SelfEmploymentName_Txtbox = page.getByRole('textbox', { name: 'Please Enter your Name to certify Self Employment' })
|
|
571
|
+
this.DateOfCertificationTodayDate_Block = page.locator("runtime_omnistudio_omniscript-omniscript-date[data-omni-key='TodayDateSelf']")
|
|
572
|
+
this.DateOfCertificationTodayDate_Txtbox = page.getByRole('textbox', { name: "Please Enter the date of the" })
|
|
573
|
+
this.DatePicker = page.getByRole('dialog', { name: 'Date picker' })
|
|
574
|
+
this.DatePickerToday_Btn = page.getByRole('button', { name: 'Today' })
|
|
575
|
+
this.SelfEmploymentTypeOfWork_Block = page.locator("runtime_omnistudio_omniscript-omniscript-textarea[data-omni-key='TypeOfWork']")
|
|
576
|
+
this.SelfEmploymentTypeOfWork_Txtbox = page.getByRole('textbox', { name: 'What type of work do you perform?' })
|
|
577
|
+
this.SelfEmployedAmount_Block = page.locator("runtime_omnistudio_omniscript-omniscript-currency[data-omni-key='SelfEmpAmount']")
|
|
578
|
+
this.SelfEmployedAmount_Txtbox = page.getByRole('textbox', { name: 'Monthly Self Employed Amount' })
|
|
579
|
+
//Income - 401K
|
|
580
|
+
this.FourZeroOneK_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='KIncomeBlock']")
|
|
581
|
+
this.FourZeroOneKAmount_Block = page.locator("runtime_omnistudio_omniscript-omniscript-currency[data-omni-key='KIncomeAmount']")
|
|
582
|
+
this.FourZeroOneKAmount_Txtbox = page.getByRole('textbox', { name: 'Monthly 401K Withdrawal Amount' })
|
|
583
|
+
//Income - Social Security Retirement
|
|
584
|
+
this.SocialSecurityRetirement_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='SocialSecurityBlock']")
|
|
585
|
+
this.SocialSecurityRetirementAmount_Block = page.locator("runtime_omnistudio_omniscript-omniscript-currency[data-omni-key='SSAmount']")
|
|
586
|
+
this.SocialSecurityRetirementAmount_Txtbox = page.getByRole('textbox', { name: 'Monthly Social Security Retirement Amount' })
|
|
587
|
+
//Income - SSDI
|
|
588
|
+
this.SSDI_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='SSDI_Blk']")
|
|
589
|
+
this.SSDIAmount_Block = page.locator("runtime_omnistudio_omniscript-omniscript-currency[data-omni-key='SSDIAmt']")
|
|
590
|
+
this.SSDIAmount_Txtbox = page.getByRole('textbox', { name: 'Monthly SSDI Amount' })
|
|
591
|
+
//Income - Unemployment Compensation
|
|
592
|
+
this.UnemploymentCompensation_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='UnemploymentCompBlk']")
|
|
593
|
+
this.UnemploymentCompensationAmount_Block = page.locator("runtime_omnistudio_omniscript-omniscript-currency[data-omni-key='UnemploymentCompAmt']")
|
|
594
|
+
this.UnemploymentCompensationAmount_Txtbox = page.getByRole('textbox', { name: 'Monthly Unemployment Compensation Amount' })
|
|
595
|
+
//Income - Interest Income
|
|
596
|
+
this.InterestIncome_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='InterestIncomeBlk']")
|
|
597
|
+
this.InterestIncomeAmount_Block = page.locator("runtime_omnistudio_omniscript-omniscript-currency[data-omni-key='InterestIncomeAmt']")
|
|
598
|
+
this.InterestIncomeAmount_Txtbox = page.getByRole('textbox', { name: 'Monthly Interest Income Amount' })
|
|
599
|
+
//Income - Annuity Payments
|
|
600
|
+
this.AnnuityPayments_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='AnnuityPaymentsBlk']")
|
|
601
|
+
this.AnnuityPaymentsAmount_Block = page.locator("runtime_omnistudio_omniscript-omniscript-currency[data-omni-key='AnnuityPaymentsAmt']")
|
|
602
|
+
this.AnnuityPaymentsAmount_Txtbox = page.getByRole('textbox', { name: 'Monthly Annuity Payments Amount' })
|
|
603
|
+
//Income - Dividends
|
|
604
|
+
this.Dividends_Block = page.locator("runtime_omnistudio_omniscript-omniscript-block[data-omni-key='DividendBlk']")
|
|
605
|
+
this.DividendsAmount_Block = page.locator("runtime_omnistudio_omniscript-omniscript-currency[data-omni-key='DividendAmt']")
|
|
606
|
+
this.DividendsAmount_Txtbox = page.getByRole('textbox', { name: 'Monthly Dividends Amount' })
|
|
607
|
+
//Total Primary Applicant Income Monthly
|
|
608
|
+
this.TotalPrimaryApplicantIncomeMonthly_Block = page.locator("runtime_omnistudio_omniscript-omniscript-formula[data-omni-key='TotalPrimaryIncome']")
|
|
609
|
+
this.TotalPrimaryApplicantIncomeMonthly_Txtbox = page.getByRole('textbox', { name: 'Total Primary Applicant Income Monthly' })
|
|
610
|
+
|
|
611
|
+
//Income - Block - No
|
|
612
|
+
//Form
|
|
613
|
+
this.NotWorkingExplaination_Block = page.locator('runtime_omnistudio_common-textarea:has-text("*Please explain why applicant is not working?")')
|
|
614
|
+
this.NotWorkingExplaination_Txtbox = page.getByRole('textbox', { name: 'Please explain why applicant is not working?' })
|
|
615
|
+
this.Explain30DaysExpense_Block = page.locator("runtime_omnistudio_common-textarea[data-id='Explain30DaysExpense']")
|
|
616
|
+
this.Explain30DaysExpense_Txtbox = page.getByRole('textbox', { name:'Please explain how you have managed for the past 30 days without income (a 30-days Financial Statement may be required)'})
|
|
617
|
+
this.ReceiveSupportForNecessities_Block = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='ReceiveSupportForNecess']")
|
|
618
|
+
this.ReceiveSupportForNecessities_dd = page.getByRole('combobox', { name: 'Do you currently receive support from any third parties for basic necessities such as shelter, food, transportation, or medical care?'})
|
|
619
|
+
this.ThirdPartySupport_Block = page.locator("runtime_omnistudio_omniscript-omniscript-custom-lwc[class='slds-p-right_small slds-m-bottom_xx-small slds-show_inline-block slds-size_12-of-12 slds-medium-size_12-of-12'] div[class='wrap']")
|
|
620
|
+
this.EngageInFinancialTransactions_Block = page.locator("runtime_omnistudio_omniscript-omniscript-select[data-omni-key='EngageInFinancialTrans']")
|
|
621
|
+
this.EngageInFinancialTransactions_dd = page.getByRole('combobox', { name: 'Do you engage in any financial transactions with institutions or platforms such as banks, venmo, cash app, or similar services?'})
|
|
622
|
+
this.EngageInFinancialTransactions_ddl = page.getByRole('listbox', { name: 'Do you engage in any financial transactions with institutions or platforms such as banks, venmo, cash app, or similar services?'})
|
|
623
|
+
this.PubicAssitanceChxbox_Block = page.locator("c-applicant-income-l-w-c[data-omni-key='PublicAssitanceCheckboxes']")
|
|
624
|
+
this.SSI_ChkBox = this.PubicAssitanceChxbox_Block.locator('label').filter({ hasText: 'SSI' }).first()
|
|
625
|
+
this.VABenefits_ChkBox = this.PubicAssitanceChxbox_Block.locator('label').filter({ hasText: 'VA Benefits' }).first()
|
|
626
|
+
this.SNAPBenefits_ChkBox = this.PubicAssitanceChxbox_Block.locator('label').filter({ hasText: 'SNAP Benefits' }).first()
|
|
627
|
+
this.SubsidizedHousing_ChkBox = this.PubicAssitanceChxbox_Block.locator('label').filter({ hasText: 'Subsidized Housing' }).first()
|
|
628
|
+
this.Alimony_ChkBox = this.PubicAssitanceChxbox_Block.locator('label').filter({ hasText: 'Alimony' }).first()
|
|
629
|
+
this.ChildSupport_ChkBox = this.PubicAssitanceChxbox_Block.locator('label').filter({ hasText: 'Child Support' }).first()
|
|
630
|
+
this.NoneOfTheAbove_ChkBox = this.PubicAssitanceChxbox_Block.locator('label').filter({ hasText: 'None of the above' }).first()
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
//Household Members & Income Section
|
|
634
|
+
this.HouseholdMembersIncomeTitle_Lbl = page.getByRole('heading', { name: 'Add Household Members' })
|
|
635
|
+
this.Hint_Btn = page.getByRole('button', { name: 'What is considered a Household?' })
|
|
636
|
+
this.Hint_Text = page.locator('div.slds-m-top_small.slds-p-around_small')
|
|
637
|
+
this.AddHouseholdMember_Btn = page.getByRole('button', { name: 'Add a Household Member' })
|
|
638
|
+
this.TotalNumberOfHouseholdMembers_Lbl = page.locator('label:has-text("TOTAL NUMBER OF HOUSEHOLD")')
|
|
639
|
+
this.TotalNumberOfHouseholdMembers_Value = page.locator(`//label[normalize-space()='Total number of household']/parent::div//div[contains(@class,'slds-input_bare')]`)
|
|
640
|
+
this.TotalMonthlyHouseholdIncome_Lbl = page.locator('label:has-text("TOTAL MONTHLY HOUSEHOLD INCOME")')
|
|
641
|
+
this.TotalMonthlyHouseholdIncome_Value = page.locator(`//label[normalize-space()='Total Monthly Household Income']/parent::div//div[contains(@class,'slds-input_bare')]`)
|
|
642
|
+
this.FPLPercentage_Lbl = page.locator('label:has-text("FPL PERCENTAGE")')
|
|
643
|
+
this.FPLPercentage_Value = page.locator(`//label[normalize-space()='FPL Percentage']/parent::div//div[contains(@class,'slds-input_bare')]`)
|
|
644
|
+
|
|
645
|
+
//Edit Primary Applicant Section
|
|
646
|
+
this.EditPrimaryTitle_Lbl = page.getByRole('heading', { name: 'Edit Primary Applicant' })
|
|
647
|
+
|
|
648
|
+
this.HouseholdIncomeSource_Lbl = page.getByText('What type of MONTHLY income does applicant have? Please select all income sources that apply', { exact: true })
|
|
649
|
+
//this.HouseholdPaycheckMostRecent_Text = page.getByText('Most recent 4 weeks paystubs must be provided.', { exact: true })
|
|
650
|
+
this.HouseholdPaycheckAlternate_Text = page.locator("//strong[contains(text(),'If you do not have paystubs available you can choo')]")
|
|
651
|
+
this.HouseholdPaycheck_Block = page.locator('div.paycheck-section')
|
|
652
|
+
this.HouseholdFirstEmployerGMI_Txtbox = page.getByRole('spinbutton', { name: 'Gross Monthly Amount' })
|
|
653
|
+
|
|
654
|
+
this.HouseholdPension_Block = page.locator('div.pension-section')
|
|
655
|
+
this.HouseholdPensionAmount_Txtbox = page.getByRole('spinbutton', { name: 'Monthly Pension Amount' })
|
|
656
|
+
|
|
657
|
+
this.HouseholdRentalProperty_Block = page.locator('div.rental-property-section')
|
|
658
|
+
this.HouseholdRentalPropertyAmount_Txtbox = page.getByRole('spinbutton', { name: 'Monthly Rental Property Amount' })
|
|
659
|
+
|
|
660
|
+
this.HouseholdSelfEmployed_Block = page.locator('div.self-employed-section')
|
|
661
|
+
this.HouseholdICertifyThatIAmSelfEmployed_ChkBox = page.getByText('I certify that I am self')
|
|
662
|
+
|
|
663
|
+
this.HouseholdSelfEmployedAmount_Txtbox = page.getByRole('spinbutton', { name: 'Monthly Self Employed Amount' })
|
|
664
|
+
|
|
665
|
+
this.HouseholdFourZeroOneK_Block = page.locator('div.k401-withdrawal-section')
|
|
666
|
+
this.HouseholdFourZeroOneKAmount_Txtbox = page.getByRole('spinbutton', { name: 'Monthly 401K Withdrawal Amount' })
|
|
667
|
+
|
|
668
|
+
this.HouseholdSocialSecurityRetirement_Block = page.locator('div.social-security-section')
|
|
669
|
+
this.HouseholdSocialSecurityRetirementAmount_Txtbox = page.getByRole('spinbutton', { name: 'Monthly Social Security Retirement Amount' })
|
|
670
|
+
|
|
671
|
+
this.HouseholdSSDI_Block = page.locator('div.ssdi-section')
|
|
672
|
+
this.HouseholdSSDIAmount_Txtbox = page.getByRole('spinbutton', { name: 'Monthly SSDI Amount' })
|
|
673
|
+
|
|
674
|
+
this.HouseholdUnemploymentCompensation_Block = page.locator('div.unemployment-comp-section')
|
|
675
|
+
this.HouseholdUnemploymentCompensationAmount_Txtbox = page.getByRole('spinbutton', { name: 'Monthly Unemployment Compensation Amount' })
|
|
676
|
+
|
|
677
|
+
this.HouseholdInterestIncome_Block = page.locator('div.interest-income-section')
|
|
678
|
+
this.HouseholdInterestIncomeAmount_Txtbox = page.getByRole('spinbutton', { name: 'Monthly Interest Income Amount' })
|
|
679
|
+
|
|
680
|
+
this.HouseholdAnnuityPayments_Block = page.locator('div.annuity-payments-section')
|
|
681
|
+
this.HouseholdAnnuityPaymentsAmount_Txtbox = page.getByRole('spinbutton', { name: 'Monthly Annuity Payments Amount' })
|
|
682
|
+
|
|
683
|
+
this.HouseholdDividends_Block = page.locator('div.dividends-section')
|
|
684
|
+
this.HouseholdDividendsAmount_Txtbox = page.getByRole('spinbutton', { name: 'Monthly Dividends Amount' })
|
|
685
|
+
|
|
686
|
+
this.HouseholdTotalMonthlyIncome_Lbl = page.locator('label:has-text("TOTAL MONTHLY INCOME")')
|
|
687
|
+
this.HouseholdTotalMonthlyHouseholdIncome_Value = page.locator('div.slds-input_bare')
|
|
688
|
+
|
|
689
|
+
//No Income Section
|
|
690
|
+
this.HouseholdNotWorkingExplaination_Block = page.locator("lightning-textarea[data-field='explainWhyNotWorking']")
|
|
691
|
+
this.HouseholdExplain30DaysExpense_Block = page.locator("lightning-textarea[data-field='explainHowManagedWithoutIncome']")
|
|
692
|
+
this.HouseholdReceiveSupportForNecessities_Block = page.locator("lightning-combobox[data-field='receiveSupportFromThirdParties']")
|
|
693
|
+
this.HouseholdEngageInFinancialTransactions_Block = page.locator("lightning-combobox[data-field='engageInFinancialTransactions']")
|
|
694
|
+
this.HouseholdReceivingAssistance_Lbl = page.getByText('* Are you currently receiving income from any government programs or other sources?', { exact: true })
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
//Add Household Member Section
|
|
698
|
+
this.HouseholdFirstName_Lbl = page.locator('lightning-input:has-text("First Name")')
|
|
699
|
+
this.HouseholdMiddleName_Lbl = page.locator('lightning-input:has-text("Middle Initial")')
|
|
700
|
+
this.HouseholdLastName_Lbl = page.locator("lightning-input[data-field='lastName']")
|
|
701
|
+
this.HouseholdDOB_Lbl = page.getByText('Date Of Birth (Use format dd-mm-yyyy)')
|
|
702
|
+
this.HouseholdSSN_Lbl = page.getByLabel('SSN (Use format xxx-xx-xxxx)')
|
|
703
|
+
this.HouseholdSSN_Txtbox = page.getByRole('textbox', { name: 'SSN (Use format xxx-xx-xxxx)' })
|
|
704
|
+
this.RelationshipToApplicant_Block = page.locator("lightning-combobox[data-field$='relationshipToClient']")
|
|
705
|
+
this.RelationshipToApplicant_dd = page.getByRole('combobox', { name: 'Relationship to Applicant' })
|
|
706
|
+
this.RelationshipToApplicant_ddl = page.getByRole('listbox', { name: 'Relationship to Applicant' })
|
|
707
|
+
this.HouseholdMemberGender_Block = page.locator("//lightning-combobox[@data-field='gender']")
|
|
708
|
+
this.HouseholdMemberMaritalStatus_Block = page.locator("//lightning-combobox[@data-field='maritalStatus']")
|
|
709
|
+
this.HouseholdMemberSeekingBenefits_Block = page.locator("//lightning-combobox[@data-field='healthCareAssistanceBeingRequested']")
|
|
710
|
+
this.HouseholdMemberSeekingBenefits_dd = page.getByRole('combobox', { name: 'Is this household member seeking benefits?' })
|
|
711
|
+
this.HouseholdMemberSeekingBenefits_ddl = page.getByRole('listbox', { name: 'Is this household member seeking benefits?' })
|
|
712
|
+
this.HouseholdMemberHasIncome_Block = page.locator("//lightning-combobox[@data-field='hasIncome']")
|
|
713
|
+
this.HouseholdMemberHasIncome_dd = page.getByRole('combobox', { name: 'Does this household member have income?' })
|
|
714
|
+
this.HouseholdMemberHasIncome_ddl = page.getByRole('listbox', { name: 'Does this household member have income?' })
|
|
715
|
+
|
|
716
|
+
this.DeleteHouseholdMember_Popup = page.locator('div.slds-modal__container')
|
|
717
|
+
this.DeletePopup_Heading = page.getByRole('heading', { name: 'Confirm Delete' })
|
|
718
|
+
this.DeletePopup_Message2 = page.getByText('This action cannot be undone and will permanently delete:', { exact: true })
|
|
719
|
+
this.DeletePopup_MessagePoint1 = page.getByText('The household member record', { exact: true })
|
|
720
|
+
this.DeletePopup_MessagePoint2 = page.getByText('All income records for this member', { exact: true })
|
|
721
|
+
this.DeletePopup_MessagePoint3 = page.getByText('All document checklist items for this member', { exact: true })
|
|
722
|
+
this.DeleteSuccess_Message = page.locator('div.slds-theme--success.slds-notify--toast.slds-notify.slds-notify--toast.forceToastMessage')
|
|
723
|
+
|
|
724
|
+
//Next, Previous, Cancel & Update Buttons
|
|
725
|
+
// Use exact label match — .filter({ hasText: 'Next' }) matches "Next Month" on date pickers first.
|
|
726
|
+
this.Next_Btn = page.getByRole('button', { name: 'Next', exact: true })
|
|
727
|
+
this.Previous_Btn = page.getByRole('button', { name: 'Previous', exact: true })
|
|
728
|
+
this.Edit_Btn = page.getByRole('button', { name: 'Edit' })
|
|
729
|
+
this.Save_Btn = page.getByRole('button', { name: 'Save' })
|
|
730
|
+
this.Cancel_Btn = page.locator('button:has-text("Cancel")')
|
|
731
|
+
this.Update_Btn = page.getByRole('button', { name: 'Update' })
|
|
732
|
+
this.Delete_Btn = page.getByRole('button', { name: 'Delete' })
|
|
733
|
+
this.Help_Text = page.locator('.slds-form-element__help')
|
|
734
|
+
this.Done_Btn = page.getByRole('button', { name: 'Done' }).first();
|
|
735
|
+
|
|
736
|
+
//Documents Section
|
|
737
|
+
this.DocumentsTitle_Lbl = page.locator('div.custom-step-label.slds-page-header__title.slds-var-p-horizontal_medium.slds-text-heading_medium.slds-var-m-top_medium.os-step-label')
|
|
738
|
+
this.DocumentsNotify_Lbl = page.locator('div.slds-notify.slds-notify_alert.slds-theme_warning')
|
|
739
|
+
this.DocumentsInstructions_Text = page.locator('div.slds-box.slds-theme_shade.slds-m-bottom_medium')
|
|
740
|
+
this.MemberwiseDocuments_Block = page.locator('div.enrollee-card')
|
|
741
|
+
this.MemberwiseName_Lbl = page.locator('div.member-header')
|
|
742
|
+
this.DocumentUploadIdentificationCard_UploadFiles = page.locator('input[type="file"][name="Driver License / State Identification Card"]');
|
|
743
|
+
this.DocumentUploadProofOfSelfEmployment_UploadFiles = page.locator('input[type="file"][name="Proof of Self Employment"]');
|
|
744
|
+
this.DocumentUploadPaycheck_UploadFiles = page.locator('input[type="file"][name*="Paycheck 1"]');
|
|
745
|
+
this.DocumentUpload401KWithdrawal_UploadFiles = page.locator('input[type="file"][name*="401K Withdrawal"]');
|
|
746
|
+
this.DocumentUploadAnnuityPayments_UploadFiles = page.locator('input[type="file"][name*="Annuity Payments"]');
|
|
747
|
+
this.DocumentUploadDividends_UploadFiles = page.locator('input[type="file"][name*="Dividends"]');
|
|
748
|
+
this.DocumentUploadInterestIncome_UploadFiles = page.locator('input[type="file"][name*="Interest Income"]');
|
|
749
|
+
this.DocumentUploadPension_UploadFiles = page.locator('input[type="file"][name*="Pension"]');
|
|
750
|
+
this.DocumentUploadRentalProperty_UploadFiles = page.locator('input[type="file"][name*="Rental Property"]');
|
|
751
|
+
this.DocumentUploadSocialSecurityRetirement_UploadFiles = page.locator('input[type="file"][name*="Social Security Retirement"]');
|
|
752
|
+
this.DocumentUploadSSDI_UploadFiles = page.locator('input[type="file"][name*="SSDI"]');
|
|
753
|
+
this.DocumentUploadUnemploymentCompensation_UploadFiles = page.locator('input[type="file"][name*="Unemployment Compensation"]');
|
|
754
|
+
this.DocumentUploadVerificationOfEarningsForm_UploadFiles = page.locator('input[type="file"][name*="Verification of Earnings Form"]');
|
|
755
|
+
this.DocumentUploadTaxReturn_UploadFiles = page.locator('input[type="file"][name*="Tax Return"]');
|
|
756
|
+
this.DocumentUpload_Dialog = page.getByRole('dialog', { name: 'Upload Files' })
|
|
757
|
+
this.DocumentUploadSuccess_Icon = page.locator("//lightning-primitive-icon[@variant='success']")
|
|
758
|
+
|
|
759
|
+
//Uploaded Documents Table (scope View/Delete here — page-level `name: 'View'` also matches step nav "viewing"/"viewed")
|
|
760
|
+
this.UploadedDocument_Lbl = page.getByText('Uploaded Documents', { exact: true })
|
|
761
|
+
this.UploadedDocuments_Table = page
|
|
762
|
+
.locator('runtime_omnistudio_omniscript-omniscript-step, div, section')
|
|
763
|
+
.filter({ has: this.UploadedDocument_Lbl })
|
|
764
|
+
.locator('table')
|
|
765
|
+
.first()
|
|
766
|
+
this.DocumentView_Btn = this.UploadedDocuments_Table.getByRole('button', { name: 'View', exact: true }).first();
|
|
767
|
+
this.DocumentDelete_Btn = this.UploadedDocuments_Table.getByRole('button', { name: 'Delete', exact: true }).first();
|
|
768
|
+
//Enrollment Acknowledgement
|
|
769
|
+
this.EnrollmentAcknowledgement_Block = page.locator("runtime_omnistudio_omniscript-omniscript-step[data-omni-key='STP_EnrollmentAcknowledgement']")
|
|
770
|
+
this.EnrollmentAcknowledgementTitle_Lbl = page.locator('div').filter({ hasText: 'Enrollment Acknowledgement' }).last()
|
|
771
|
+
this.EnrollmentAcknowledgementText1_Block = page.locator("runtime_omnistudio_omniscript-omniscript-text-block[data-omni-key='TextBlock1']")
|
|
772
|
+
this.EnrollmentAcknowledgementText2_Block = page.locator("runtime_omnistudio_omniscript-omniscript-text-block[data-omni-key='TextBlock3']")
|
|
773
|
+
this.EnrollmentAcknowledgementMemberHandbook_Lnk = page.locator('runtime_omnistudio_omniscript-omniscript-navigate-action[data-omni-key="NavigateAction2"] a')
|
|
774
|
+
this.EnrollmentAcknowledgementText3_Block = page.locator("runtime_omnistudio_omniscript-omniscript-text-block[data-omni-key='TextBlock5']")
|
|
775
|
+
this.EnrollmentAcknowledgementText4_Block = page.locator("runtime_omnistudio_omniscript-omniscript-checkbox[data-omni-key='acknowledgement']")
|
|
776
|
+
|
|
777
|
+
//Additional Information & Attestation
|
|
778
|
+
this.AdditionalInformation_Block = page.locator("runtime_omnistudio_omniscript-omniscript-step[data-omni-key='STP_Attestation']")
|
|
779
|
+
this.PrimaryCareProvider_Block = page.locator('runtime_omnistudio_omniscript-omniscript-typeahead[data-omni-key="ProviderLookup"]')
|
|
780
|
+
this.PrimaryCareProvider_dd = page.getByRole('combobox', { name: 'Select an in‑network primary care provider. Selection does not confirm plan eligibility.' })
|
|
781
|
+
this.PrimaryCareProvider_ddl = page.getByRole('listbox')
|
|
782
|
+
this.ApplicationModeOfUpdates_Block = page.locator('runtime_omnistudio_omniscript-omniscript-multiselect[data-omni-key="AppPreferedContact"]')
|
|
783
|
+
this.ApplicationModeOfUpdates_Email_ChkBox = page.locator('label').filter({ hasText: 'Email' }).first();
|
|
784
|
+
this.ApplicationModeOfUpdates_TextMessage_ChkBox = page.locator('label').filter({ hasText: 'Text Message' }).first();
|
|
785
|
+
this.ApplicationModeOfUpdates_Telephone_ChkBox = page.locator('Label').filter({ hasText: 'Telephone (calls or voicemails)' }).first();
|
|
786
|
+
this.PlanModeOfUpdates_Block = page.locator('runtime_omnistudio_omniscript-omniscript-custom-lwc[data-omni-key="CustomLWC13"]')
|
|
787
|
+
this.PlanModeOfUpdates_Email_ChkBox = page.locator('label').filter({ hasText: 'Email' }).last();
|
|
788
|
+
this.PlanModeOfUpdates_TextMessage_ChkBox = page.locator('label').filter({ hasText: 'Text Message' }).last();
|
|
789
|
+
this.PlanModeOfUpdates_Telephone_ChkBox = page.locator('Label').filter({ hasText: 'Telephone (calls or voicemails)' }).last();
|
|
790
|
+
this.PlanModeOfUpdates_NoContact_ChkBox = page.locator('label').filter({ hasText: 'I do not wish to be contacted' })
|
|
791
|
+
this.SMSPrivacyDisclosure_Block = page.locator("runtime_omnistudio_omniscript-omniscript-text-block[data-omni-key='TextBlock18']")
|
|
792
|
+
this.PreviewApplication_Lnk = page.getByText('Click here to Preview Application')
|
|
793
|
+
this.PreviewApplication_iframe = page.locator('iframe:visible')
|
|
794
|
+
|
|
795
|
+
this.ICertifyThat_Lbl = page.getByText('I certify that all statements made in this application are true and complete.', { exact: true })
|
|
796
|
+
this.TypeLegalName_Textbox = page.getByRole('textbox', { name: 'Type Full Legal Name Here (must match your ID)' })
|
|
797
|
+
this.TodayDate_Textbox = page.getByRole('textbox', { name: 'Date' })
|
|
798
|
+
this.Disclaimer_Lbl = page.getByText('(Disclaimer: Applications may be delayed or denied if the name provided does not match your government‑issued ID)', { exact: true })
|
|
799
|
+
|
|
800
|
+
//Sign Consent Form
|
|
801
|
+
this.SignConsentFormTitle_Lbl = page.locator('div.custom-step-label').filter({ hasText: 'Sign Consent Form' })
|
|
802
|
+
this.SignConsentForm_Header = page.locator('header.bluebar')
|
|
803
|
+
this.NameAndInformation_Block = page.locator('.card').nth(0)
|
|
804
|
+
this.UseAndDislosure_Block = page.locator('.card').nth(1)
|
|
805
|
+
this.UseAndDislosure_Text = page.locator('.scroll')
|
|
806
|
+
this.ConsentInformation_ChkBox = page.getByText('I have read and agree to the consent information.', { exact: true })
|
|
807
|
+
this.Signature_Block = page.locator('.card').nth(1)
|
|
808
|
+
this.Signature_Canvas = page.locator('canvas.sigCanvas')
|
|
809
|
+
this.SignatureHint_Lbl = page.getByText('Use mouse/finger to draw. Accept to lock your signature.', { exact: true })
|
|
810
|
+
this.AcceptSignature_Button = page.getByRole('button', { name: 'Accept Signature' })
|
|
811
|
+
this.Clear_Button = page.getByRole('button', { name: 'Clear' })
|
|
812
|
+
this.AgreeAndConsent_Button = page.getByRole('button', { name: 'Agree and Consent' })
|
|
813
|
+
this.ThanksSubmitApplication_Block = page.locator('section.thanks')
|
|
814
|
+
this.ConsentFormAlreadySubmitted_Block = page.locator("runtime_omnistudio_omniscript-omniscript-custom-lwc[data-omni-key='CustomLWC5']")
|
|
815
|
+
this.SubmitApplication_Button = page.getByRole('button', { name: 'Submit Application' })
|
|
816
|
+
this.ClickNextToSocialServicesAssesment_Lbl = page.getByText('Please click Next to be taken')
|
|
817
|
+
|
|
818
|
+
//Client Needs Assessment
|
|
819
|
+
this.ClientNeedsAssessment_Block = page.locator('runtime_omnistudio_omniscript-omniscript-block[data-omni-key="ClientAssessmentBlk"]')
|
|
820
|
+
this.IChoose_RadioButton = page.getByText('I choose to complete the assessment')
|
|
821
|
+
this.IDecline_RadioButton = page.getByText('I decline to complete the assessment')
|
|
822
|
+
this.Housing_Block = page.locator('runtime_omnistudio_omniscript-omniscript-block[data-omni-key="HousingBLK"]')
|
|
823
|
+
this.HousingQuestion_dd = page.getByRole('combobox', { name: 'What is your current living situation?' })
|
|
824
|
+
this.Environment_Block = page.locator('runtime_omnistudio_omniscript-omniscript-block[data-omni-key="EnvironmentBLK"]')
|
|
825
|
+
this.EnvironmentQuestion_dd = page.getByRole('combobox', { name: 'Do you want help with employment?' })
|
|
826
|
+
this.SubstanceAbuse_Block = page.locator('runtime_omnistudio_omniscript-omniscript-block[data-omni-key="SubstanceAbuseBlock"]')
|
|
827
|
+
this.SubstanceAbuseQuestion_dd = page.getByRole('combobox', { name: 'Are you interested in learning more about services that assist with alcohol use, non‑medical use of prescription drugs, or use of illegal drugs?' })
|
|
828
|
+
this.MentalHealth_Block = page.locator('runtime_omnistudio_omniscript-omniscript-block[data-omni-key="MentalHealthBlk"]')
|
|
829
|
+
this.MentalHealthQuestion_dd = page.getByRole('combobox', { name: 'Would you like to be connected to counseling or mental health services?' })
|
|
830
|
+
this.Disability_Block = page.locator('runtime_omnistudio_omniscript-omniscript-block[data-omni-key="DisabilityBLK"]')
|
|
831
|
+
this.DisabilityQuestion1_dd =page.getByRole('combobox', { name: 'Do you need assistance applying for disability?' })
|
|
832
|
+
this.DisabilityQuestion2_dd = page.getByRole('combobox', { name: 'Have you recently been denied disability (in the process of an appeal)?' })
|
|
833
|
+
this.ddl_list = page.locator('ul:visible')
|
|
834
|
+
//Thank You
|
|
835
|
+
this.SubmitAssesment_Btn = page.locator('button').filter({ hasText: 'Submit Assesment' }).first()
|
|
836
|
+
this.ThankYouMessage_Lbl = page.getByText('Thank you for taking the time to complete the Application. We’ve received your')
|
|
837
|
+
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
//Click the actions on the page
|
|
841
|
+
async clickNextButton(): Promise<void> {
|
|
842
|
+
await this.Next_Btn.click();
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
async clickPreviousButton(): Promise<void> {
|
|
846
|
+
await this.Previous_Btn.click();
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
async clickCancelButton(): Promise<void> {
|
|
850
|
+
await this.Cancel_Btn.click();
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
async clickUpdateButton(): Promise<void> {
|
|
854
|
+
await this.Update_Btn.click();
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
async clickIsPrimaryPhoneLandlineOrCellPhoneDropdown(): Promise<void> {
|
|
858
|
+
await this.isPrimaryPhoneLandlineOrCellPhone_dd.click();
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
async clickRaceDropdown(): Promise<void> {
|
|
862
|
+
await this.Race_dd.click();
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
async clickEthnicityDropdown(): Promise<void> {
|
|
866
|
+
await this.Ethnicity_dd.click();
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
async clickGenderDropdown(): Promise<void> {
|
|
870
|
+
await this.Gender_dd.click();
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
async clickMaritalStatusDropdown(): Promise<void> {
|
|
874
|
+
await this.MaritalStatus_dd.click();
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
async clickCitizenshipDropdown(): Promise<void> {
|
|
878
|
+
await this.Citizenship_dd.click();
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
async clickVeteranDropdown(): Promise<void> {
|
|
882
|
+
await this.Veteran_dd.click();
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
async clickLanguageDropdown(): Promise<void> {
|
|
886
|
+
await this.Language_dd.click();
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
async clickInsuranceCoverageDropdown(): Promise<void> {
|
|
890
|
+
await this.InsuranceCoverage_dd.click();
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
async clickAllIncomeSourcesChkboxes(): Promise<void> {
|
|
894
|
+
await this.Paycheck_ChkBox.click();
|
|
895
|
+
await this.Pension_ChkBox.click();
|
|
896
|
+
await this.RentalIncome_ChkBox.click();
|
|
897
|
+
await this.SelfEmployed_ChkBox.click();
|
|
898
|
+
await this.FourZeroOneK_ChkBox.click();
|
|
899
|
+
await this.SocialSecurityRetirement_ChkBox.click();
|
|
900
|
+
await this.SSDI_ChkBox.click();
|
|
901
|
+
await this.UnemploymentCompensation_ChkBox.click();
|
|
902
|
+
await this.InterestIncome_ChkBox.click();
|
|
903
|
+
await this.AnnuityPayments_ChkBox.click();
|
|
904
|
+
await this.Dividends_ChkBox.click();
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
async clickPaycheckChkbox(): Promise<void> {
|
|
908
|
+
await this.Paycheck_ChkBox.click();
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
async clickPensionChkbox(): Promise<void> {
|
|
912
|
+
await this.Pension_ChkBox.click();
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
async clickRentalIncomeChkbox(): Promise<void> {
|
|
916
|
+
await this.RentalIncome_ChkBox.click();
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
async clickSelfEmployedChkbox(): Promise<void> {
|
|
920
|
+
await this.SelfEmployed_ChkBox.click();
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
async clickFourZeroOneKChkbox(): Promise<void> {
|
|
924
|
+
await this.FourZeroOneK_ChkBox.click();
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
async clickSocialSecurityRetirementChkbox(): Promise<void> {
|
|
928
|
+
await this.SocialSecurityRetirement_ChkBox.click();
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
async clickSSDIChkbox(): Promise<void> {
|
|
932
|
+
await this.SSDI_ChkBox.click();
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
async clickUnemploymentCompensationChkbox(): Promise<void> {
|
|
936
|
+
await this.UnemploymentCompensation_ChkBox.click();
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
async clickInterestIncomeChkbox(): Promise<void> {
|
|
940
|
+
await this.InterestIncome_ChkBox.click();
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
async clickAnnuityPaymentsChkbox(): Promise<void> {
|
|
944
|
+
await this.AnnuityPayments_ChkBox.click();
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
async clickDividendsChkbox(): Promise<void> {
|
|
948
|
+
await this.Dividends_ChkBox.click();
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
async clickICanHaveMyEmployerCompleteChkbox(): Promise<void> {
|
|
952
|
+
await this.ICanHaveMyEmployerComplete_ChkBox.click();
|
|
953
|
+
await this.EmployerVerification_Block.waitFor({ state: 'visible' });
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
async clickHouseholdHintButton(): Promise<void> {
|
|
957
|
+
await this.Hint_Btn.click();
|
|
958
|
+
await this.Hint_Text.waitFor({ state: 'visible' });
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
async clickEditButton(): Promise<void> {
|
|
962
|
+
await this.Edit_Btn.click();
|
|
963
|
+
await this.EditPrimaryTitle_Lbl.waitFor({ state: 'visible' });
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
async clickAddHouseholdMemberButton(): Promise<void> {
|
|
967
|
+
await this.AddHouseholdMember_Btn.click();
|
|
968
|
+
await this.HouseholdFirstName_Lbl.waitFor({ state: 'visible' });
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
async clickHouseholdMemberHasIncomeDropdown(): Promise<void> {
|
|
972
|
+
await this.HouseholdMemberHasIncome_dd.click();
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
async clickSaveOrUpdateButton(): Promise<void> {
|
|
976
|
+
// Add household member uses **Save**; Edit Primary Applicant uses **Update** (same step).
|
|
977
|
+
await this.Save_Btn.or(this.Update_Btn).click();
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
async clickRelationshipToApplicantDropdown(): Promise<void> {
|
|
981
|
+
await this.RelationshipToApplicant_dd.click();
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
async clickDoneButton(): Promise<void> {
|
|
985
|
+
await this.Done_Btn.click();
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
async clickViewButton(): Promise<void> {
|
|
989
|
+
await this.UploadedDocuments_Table.waitFor({ state: 'visible' });
|
|
990
|
+
await this.DocumentView_Btn.click();
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
async clickDeleteButton(): Promise<void> {
|
|
994
|
+
await this.DocumentDelete_Btn.click();
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* Document delete triggers window.confirm(). Dismiss/accept must run when the dialog
|
|
999
|
+
* fires (inside waitForEvent); otherwise the click action blocks until actionTimeout.
|
|
1000
|
+
*/
|
|
1001
|
+
async clickDeleteButtonAndHandleConfirm(action: 'accept' | 'dismiss'): Promise<Dialog> {
|
|
1002
|
+
const [dialog] = await Promise.all([
|
|
1003
|
+
this.page.waitForEvent('dialog').then(async (d) => {
|
|
1004
|
+
if (action === 'accept') {
|
|
1005
|
+
await d.accept();
|
|
1006
|
+
} else {
|
|
1007
|
+
await d.dismiss();
|
|
1008
|
+
}
|
|
1009
|
+
return d;
|
|
1010
|
+
}),
|
|
1011
|
+
this.DocumentDelete_Btn.click(),
|
|
1012
|
+
]);
|
|
1013
|
+
return dialog;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
async clickHouseholdMemberDeleteButton(): Promise<void> {
|
|
1017
|
+
await this.Delete_Btn.click();
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
async clickHouseholdDeletePopupConfirmButton(): Promise<void> {
|
|
1021
|
+
await this.DeleteHouseholdMember_Popup.getByRole('button', { name: 'Delete' }).click();
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
async clickClearButton(): Promise<void> {
|
|
1025
|
+
await this.Clear_Button.click();
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
async clickAcceptSignatureButton(): Promise<void> {
|
|
1029
|
+
await this.AcceptSignature_Button.click();
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
async clickAgreeAndConsentButton(): Promise<void> {
|
|
1033
|
+
await this.AgreeAndConsent_Button.click();
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
async clickConsentInformationCheckbox(): Promise<void> {
|
|
1037
|
+
await this.ConsentInformation_ChkBox.click();
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
async clickSubmitApplicationButton(): Promise<void> {
|
|
1041
|
+
await this.SubmitApplication_Button.click();
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
async clickIChooseRadioButton(): Promise<void> {
|
|
1045
|
+
await this.IChoose_RadioButton.click();
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
async clickIDeclineRadioButton(): Promise<void> {
|
|
1049
|
+
await this.IDecline_RadioButton.click();
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
async clickHousingQuestionDropdown(): Promise<void> {
|
|
1053
|
+
await this.HousingQuestion_dd.click();
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
async clickEnvironmentQuestionDropdown(): Promise<void> {
|
|
1057
|
+
await this.EnvironmentQuestion_dd.click();
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
async clickSubstanceAbuseQuestionDropdown(): Promise<void> {
|
|
1061
|
+
await this.SubstanceAbuseQuestion_dd.click();
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
async clickMentalHealthQuestionDropdown(): Promise<void> {
|
|
1065
|
+
await this.MentalHealthQuestion_dd.click();
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
async clickDisabilityQuestion1Dropdown(): Promise<void> {
|
|
1069
|
+
await this.DisabilityQuestion1_dd.click();
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
async clickDisabilityQuestion2Dropdown(): Promise<void> {
|
|
1073
|
+
await this.DisabilityQuestion2_dd.click();
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
async clickSubmitAssesmentButton(): Promise<void> {
|
|
1077
|
+
await this.SubmitAssesment_Btn.click();
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
async clickEnrollmentAcknowledgementChkbox(): Promise<void> {
|
|
1081
|
+
await this.EnrollmentAcknowledgementText4_Block.click();
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
async clickPreferredLanguageDropdown(): Promise<void> {
|
|
1085
|
+
await this.PreferredLanguage_Input.click();
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
async selectRandomPreferredLanguage(): Promise<string> {
|
|
1089
|
+
const values = createApplicationFormData.dropdowns.preferredLanguage;
|
|
1090
|
+
const randomValue = values[Math.floor(Math.random() * values.length)];
|
|
1091
|
+
await this.fillDropdown(this.PreferredLanguage_Input, randomValue);
|
|
1092
|
+
return randomValue;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
//Fill the dropdown with the given value
|
|
1096
|
+
async fillDropdown(dropdown: Locator, value: string): Promise<void> {
|
|
1097
|
+
await dropdown.scrollIntoViewIfNeeded();
|
|
1098
|
+
await dropdown.fill(value);
|
|
1099
|
+
await this.dropdown_List.waitFor({ state: 'visible' });
|
|
1100
|
+
|
|
1101
|
+
const escapedValue = value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
1102
|
+
const exactOption = this.dropdown_List
|
|
1103
|
+
.locator('[role="option"], .slds-listbox__option, .slds-listbox__item')
|
|
1104
|
+
.filter({ hasText: new RegExp(`^\\s*${escapedValue}\\s*$`) })
|
|
1105
|
+
.first();
|
|
1106
|
+
|
|
1107
|
+
if (await exactOption.isVisible().catch(() => false)) {
|
|
1108
|
+
await exactOption.click();
|
|
1109
|
+
} else {
|
|
1110
|
+
await this.dropdownList_Item.filter({ hasText: value }).first().click();
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
await dropdown.blur();
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
async selectDropdownOption(dropdown: Locator, value: string): Promise<void> {
|
|
1117
|
+
await dropdown.waitFor({ state: 'visible' });
|
|
1118
|
+
const option = this.page.getByRole('option', { name: value }).first();
|
|
1119
|
+
await option.waitFor({ state: 'visible' });
|
|
1120
|
+
await option.click();
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
async getDropdownOptions(dropdown: Locator, screen: number): Promise<string[] | undefined> {
|
|
1124
|
+
if(screen==1){
|
|
1125
|
+
await dropdown.scrollIntoViewIfNeeded();
|
|
1126
|
+
await dropdown.click();
|
|
1127
|
+
await this.dropdown_List.waitFor({ state: 'visible' });
|
|
1128
|
+
const listbox = this.dropdown_List;
|
|
1129
|
+
const optionTexts = await listbox
|
|
1130
|
+
.locator('[role="option"], .slds-listbox__option, .slds-listbox__item')
|
|
1131
|
+
.allInnerTexts();
|
|
1132
|
+
return optionTexts.map((text) => text.replace(/\s+/g, ' ').trim()).filter(Boolean);
|
|
1133
|
+
}
|
|
1134
|
+
if(screen==2){
|
|
1135
|
+
await dropdown.scrollIntoViewIfNeeded();
|
|
1136
|
+
await dropdown.click();
|
|
1137
|
+
let listbox = await this.page.getByRole('listbox', { name: 'I can provide self employment' });
|
|
1138
|
+
const optionTexts = await listbox
|
|
1139
|
+
.locator('[role="option"], .slds-listbox__option, .slds-listbox__item')
|
|
1140
|
+
.allInnerTexts();
|
|
1141
|
+
return optionTexts.map((text) => text.replace(/\s+/g, ' ').trim()).filter(Boolean);
|
|
1142
|
+
}
|
|
1143
|
+
else if(screen==8){
|
|
1144
|
+
await dropdown.scrollIntoViewIfNeeded();
|
|
1145
|
+
await dropdown.click();
|
|
1146
|
+
await this.ddl_list.waitFor({ state: 'visible' });
|
|
1147
|
+
const listbox = this.ddl_list;
|
|
1148
|
+
const optionTexts = await listbox
|
|
1149
|
+
.locator('[role="option"], .slds-listbox__option, .slds-listbox__item')
|
|
1150
|
+
.allInnerTexts();
|
|
1151
|
+
return optionTexts.map((text) => text.replace(/\s+/g, ' ').trim()).filter(Boolean);
|
|
1152
|
+
}
|
|
1153
|
+
return undefined;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
async closeDropdown(dropdown: Locator): Promise<void> {
|
|
1157
|
+
await this.page.keyboard.press('Escape');
|
|
1158
|
+
await this.dropdown_List.waitFor({ state: 'hidden' });
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
//Clear the textbox
|
|
1162
|
+
async clearTextbox(textbox: Locator): Promise<void> {
|
|
1163
|
+
await textbox.click();
|
|
1164
|
+
await textbox.press('Control+A');
|
|
1165
|
+
await textbox.press('Delete');
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/** Fill Application Details fields only (caller must already be on the Application Details step). */
|
|
1169
|
+
async fillApplicationDetails() {
|
|
1170
|
+
await this.FirstName_Input.fill(createApplicationFormData.firstName);
|
|
1171
|
+
await this.LastName_Input.fill(createApplicationFormData.lastName);
|
|
1172
|
+
await this.DOB_Input.fill(createApplicationFormData.dob);
|
|
1173
|
+
await this.clearTextbox(this.SSN_Input);
|
|
1174
|
+
await this.SSN_Input.fill(createApplicationFormData.ssn);
|
|
1175
|
+
await this.Email_Input.fill(createApplicationFormData.email);
|
|
1176
|
+
await this.Landline_Input.fill(createApplicationFormData.landline);
|
|
1177
|
+
await this.CellPhone_Input.fill(createApplicationFormData.cellPhone);
|
|
1178
|
+
await this.fillRandomApplicationDetailsDropdowns({
|
|
1179
|
+
isPrimaryPhoneLandlineOrCellPhone: createApplicationFormData.dropdowns.isPrimaryPhoneLandlineOrCellPhone,
|
|
1180
|
+
race: createApplicationFormData.dropdowns.race,
|
|
1181
|
+
ethnicity: createApplicationFormData.dropdowns.ethnicity,
|
|
1182
|
+
gender: createApplicationFormData.dropdowns.gender,
|
|
1183
|
+
maritalStatus: createApplicationFormData.dropdowns.maritalStatus,
|
|
1184
|
+
citizenship: createApplicationFormData.dropdowns.citizenship,
|
|
1185
|
+
veteran: createApplicationFormData.dropdowns.veteran,
|
|
1186
|
+
language: createApplicationFormData.dropdowns.language,
|
|
1187
|
+
insuranceCoverage: createApplicationFormData.dropdowns.insuranceCoverage,
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
async uploadDocumentsForIncomeStep(
|
|
1192
|
+
incomeStep: ApplicantIncomeScreenFillResultYes,
|
|
1193
|
+
filePath = 'test-data/Sample.png',
|
|
1194
|
+
): Promise<void> {
|
|
1195
|
+
const incomeSources = Object.keys(incomeStep.amountsBySource) as ApplicantIncomeSimpleSource[];
|
|
1196
|
+
await this.uploadIdentificationCardIfPresent(filePath);
|
|
1197
|
+
for (const source of incomeSources) {
|
|
1198
|
+
const upload = this.getDocumentUploadLocatorForIncomeSource(source);
|
|
1199
|
+
await upload.setInputFiles(filePath);
|
|
1200
|
+
await this.DocumentUploadSuccess_Icon.waitFor({ state: 'attached' });
|
|
1201
|
+
await this.clickDoneButton();
|
|
1202
|
+
}
|
|
1203
|
+
await this.UploadedDocuments_Table.waitFor({ state: 'attached' });
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
//Fill the dropdowns with fixed random values in Application Details Screen 1
|
|
1207
|
+
async fillRandomApplicationDetailsDropdowns(dropdowns: Record<string, string[]>) {
|
|
1208
|
+
const selectedData: Record<string, string> = {};
|
|
1209
|
+
const locatorByField: Record<string, Locator> = {
|
|
1210
|
+
isPrimaryPhoneLandlineOrCellPhone: this.isPrimaryPhoneLandlineOrCellPhone_dd,
|
|
1211
|
+
race: this.Race_dd,
|
|
1212
|
+
ethnicity: this.Ethnicity_dd,
|
|
1213
|
+
gender: this.Gender_dd,
|
|
1214
|
+
maritalStatus: this.MaritalStatus_dd,
|
|
1215
|
+
citizenship: this.Citizenship_dd,
|
|
1216
|
+
veteran: this.Veteran_dd,
|
|
1217
|
+
language: this.Language_dd,
|
|
1218
|
+
insuranceCoverage: this.InsuranceCoverage_dd,
|
|
1219
|
+
};
|
|
1220
|
+
for (const field in dropdowns) {
|
|
1221
|
+
const locator = locatorByField[field];
|
|
1222
|
+
if (!locator) {
|
|
1223
|
+
throw new Error(`fillRandomDropdowns: unknown field "${field}" - add it to locatorByField`);
|
|
1224
|
+
}
|
|
1225
|
+
const values = dropdowns[field];
|
|
1226
|
+
const randomValue = values[Math.floor(Math.random() * values.length)];
|
|
1227
|
+
selectedData[field] = randomValue;
|
|
1228
|
+
console.log(`Selecting ${field}: ${randomValue}`);
|
|
1229
|
+
await this.fillDropdown(locator, randomValue);
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
return selectedData;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
//Generate a random number between 10 and 100
|
|
1236
|
+
async generateRandomNumbers(){
|
|
1237
|
+
const randomNumber = Math.floor(Math.random() * 90) + 10;
|
|
1238
|
+
return randomNumber;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Completes Applicant Income (step 2): Yes/No on "Have you received income in last 30 days?".
|
|
1243
|
+
* Yes: random subset of simple income sources (amount spinbuttons; Paycheck / Self Employed also get required companion fields), then Next.
|
|
1244
|
+
* No: required no-income narrative + dropdowns + public assistance option, then Next.
|
|
1245
|
+
*
|
|
1246
|
+
* **Overload return types:** TypeScript cannot infer Yes vs No from runtime alone, so two call signatures are declared:
|
|
1247
|
+
* - `receivedIncome: 'No'` → `{ receivedIncome: 'No' }` only.
|
|
1248
|
+
* - `receivedIncome` omitted or `'Yes'` → {@link ApplicantIncomeScreenFillResultYes} (`amountsBySource`, `totalPrimaryApplicantIncomeMonthly`).
|
|
1249
|
+
* The implementation signature keeps the full {@link ApplicantIncomeScreenFillResult} union for internal typing.
|
|
1250
|
+
*
|
|
1251
|
+
* @param opts.receivedIncome — omit to default to Yes (keeps document-upload flows predictable for other tests).
|
|
1252
|
+
* @param opts.incomeSourceCount — when `receivedIncome` is Yes: pick exactly this many sources (clamped to 1…available count).
|
|
1253
|
+
* Omit for legacy behavior: random count from 1 through all simple sources.
|
|
1254
|
+
* @returns What was submitted so callers (e.g. household edit assertions) can branch on Yes vs No and read `amountsBySource`.
|
|
1255
|
+
*/
|
|
1256
|
+
async fillApplicantIncomeScreenRandomly(opts: {
|
|
1257
|
+
receivedIncome: 'No';
|
|
1258
|
+
incomeSourceCount?: number;
|
|
1259
|
+
}): Promise<{ receivedIncome: 'No' }>;
|
|
1260
|
+
async fillApplicantIncomeScreenRandomly(opts?: {
|
|
1261
|
+
receivedIncome?: 'Yes';
|
|
1262
|
+
incomeSourceCount?: number;
|
|
1263
|
+
}): Promise<ApplicantIncomeScreenFillResultYes>;
|
|
1264
|
+
/** Implementation (union return); prefer the overloads above for accurate inferred types at call sites. */
|
|
1265
|
+
async fillApplicantIncomeScreenRandomly(opts?: {
|
|
1266
|
+
receivedIncome?: 'Yes' | 'No';
|
|
1267
|
+
incomeSourceCount?: number;
|
|
1268
|
+
}): Promise<ApplicantIncomeScreenFillResult> {
|
|
1269
|
+
console.log('[Applicant Income] fillApplicantIncomeScreenRandomly — start');
|
|
1270
|
+
const receivedIncome = opts?.receivedIncome ?? 'Yes';
|
|
1271
|
+
console.log('[Applicant Income] Have you received income in last 30 days?:', receivedIncome);
|
|
1272
|
+
await this.fillDropdown(this.HaveYouReceivedIncomeInLast30Days_dd, receivedIncome);
|
|
1273
|
+
|
|
1274
|
+
let result: ApplicantIncomeScreenFillResult;
|
|
1275
|
+
|
|
1276
|
+
if (receivedIncome === 'Yes') {
|
|
1277
|
+
const sources = [...SIMPLE_INCOME_SOURCES];
|
|
1278
|
+
this.shuffleArrayInPlace(sources);
|
|
1279
|
+
|
|
1280
|
+
const maxSources = sources.length;
|
|
1281
|
+
const howMany =
|
|
1282
|
+
opts?.incomeSourceCount !== undefined
|
|
1283
|
+
? Math.min(maxSources, Math.max(1, Math.trunc(opts.incomeSourceCount)))
|
|
1284
|
+
: 1 + Math.floor(Math.random() * maxSources);
|
|
1285
|
+
const picked = sources.slice(0, howMany);
|
|
1286
|
+
const amountsBySource: Partial<Record<ApplicantIncomeSimpleSource, string>> = {};
|
|
1287
|
+
const applicantSpin = this.getApplicantIncomeSpinboxesBySimpleSource();
|
|
1288
|
+
const incomeCheckbox = this.getIncomeSourceCheckboxes();
|
|
1289
|
+
console.log('[Applicant Income] Random income sources count:', howMany);
|
|
1290
|
+
console.log('[Applicant Income] Random income sources selected:', picked.join(', '));
|
|
1291
|
+
|
|
1292
|
+
for (const source of picked) {
|
|
1293
|
+
await incomeCheckbox[source].click();
|
|
1294
|
+
await this.fillApplicantIncomeRequiredFieldsForSource(source);
|
|
1295
|
+
const amount = String(await this.generateRandomNumbers());
|
|
1296
|
+
amountsBySource[source] = amount;
|
|
1297
|
+
console.log('[Applicant Income] ', source, '-> monthly amount:', amount);
|
|
1298
|
+
await applicantSpin[source].fill(amount);
|
|
1299
|
+
}
|
|
1300
|
+
await this.TotalPrimaryApplicantIncomeMonthly_Txtbox.click();
|
|
1301
|
+
const totalPrimaryIncome = await this.TotalPrimaryApplicantIncomeMonthly_Txtbox.inputValue();
|
|
1302
|
+
console.log('[Applicant Income] Total Primary Applicant Income Monthly (field):', totalPrimaryIncome);
|
|
1303
|
+
result = {
|
|
1304
|
+
receivedIncome: 'Yes',
|
|
1305
|
+
amountsBySource,
|
|
1306
|
+
totalPrimaryApplicantIncomeMonthly: totalPrimaryIncome,
|
|
1307
|
+
};
|
|
1308
|
+
} else {
|
|
1309
|
+
console.log('[Applicant Income] Not working explanation:', createApplicationFormData.notWorkingExplaination);
|
|
1310
|
+
console.log('[Applicant Income] 30-day expense explanation:', createApplicationFormData.explain30DaysExpense);
|
|
1311
|
+
await this.NotWorkingExplaination_Txtbox.fill(createApplicationFormData.notWorkingExplaination);
|
|
1312
|
+
await this.Explain30DaysExpense_Txtbox.fill(createApplicationFormData.explain30DaysExpense);
|
|
1313
|
+
const receiveSupport =
|
|
1314
|
+
createApplicationFormData.receiveSupportForNecessities[
|
|
1315
|
+
Math.floor(Math.random() * createApplicationFormData.receiveSupportForNecessities.length)
|
|
1316
|
+
];
|
|
1317
|
+
const engageFinancial =
|
|
1318
|
+
createApplicationFormData.engageInFinancialTransactions[
|
|
1319
|
+
Math.floor(Math.random() * createApplicationFormData.engageInFinancialTransactions.length)
|
|
1320
|
+
];
|
|
1321
|
+
console.log('[Applicant Income] Receive support for necessities:', receiveSupport);
|
|
1322
|
+
console.log('[Applicant Income] Engage in financial transactions:', engageFinancial);
|
|
1323
|
+
await this.fillDropdown(this.ReceiveSupportForNecessities_dd, receiveSupport);
|
|
1324
|
+
await this.fillDropdown(this.EngageInFinancialTransactions_dd, engageFinancial);
|
|
1325
|
+
const publicAssistanceOptions: { label: string; locator: Locator }[] = [
|
|
1326
|
+
{ label: 'SSI', locator: this.SSI_ChkBox },
|
|
1327
|
+
{ label: 'VA Benefits', locator: this.VABenefits_ChkBox },
|
|
1328
|
+
{ label: 'SNAP Benefits', locator: this.SNAPBenefits_ChkBox },
|
|
1329
|
+
{ label: 'Subsidized Housing', locator: this.SubsidizedHousing_ChkBox },
|
|
1330
|
+
{ label: 'Alimony', locator: this.Alimony_ChkBox },
|
|
1331
|
+
{ label: 'Child Support', locator: this.ChildSupport_ChkBox },
|
|
1332
|
+
];
|
|
1333
|
+
const publicAssistanceChoice =
|
|
1334
|
+
publicAssistanceOptions[Math.floor(Math.random() * publicAssistanceOptions.length)];
|
|
1335
|
+
console.log('[Applicant Income] Public assistance checkbox selected:', publicAssistanceChoice.label);
|
|
1336
|
+
await this.PubicAssitanceChxbox_Block.scrollIntoViewIfNeeded();
|
|
1337
|
+
await publicAssistanceChoice.locator.scrollIntoViewIfNeeded();
|
|
1338
|
+
await publicAssistanceChoice.locator.click();
|
|
1339
|
+
result = { receivedIncome: 'No' };
|
|
1340
|
+
}
|
|
1341
|
+
console.log('[Applicant Income] fillApplicantIncomeScreenRandomly — clicking Next');
|
|
1342
|
+
await this.clickNextButton();
|
|
1343
|
+
return result;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* Paycheck and Self Employed require fields beyond the monthly amount. Invoked after each income checkbox is checked.
|
|
1348
|
+
*/
|
|
1349
|
+
async fillApplicantIncomeRequiredFieldsForSource(source: ApplicantIncomeSimpleSource): Promise<void> {
|
|
1350
|
+
if (source === 'Paycheck (last 4 weeks of paystubs must be provided)') {
|
|
1351
|
+
await this.FirstEmployer_Block.scrollIntoViewIfNeeded();
|
|
1352
|
+
await this.FirstEmployer_Name_Txtbox.fill(`Test Employer ${await this.generateRandomNumbers()}`);
|
|
1353
|
+
return;
|
|
1354
|
+
}
|
|
1355
|
+
if (source === 'Self Employed') {
|
|
1356
|
+
await this.SelfEmployed_Block.scrollIntoViewIfNeeded();
|
|
1357
|
+
const choices = await this.getDropdownOptions(this.SelfEmploymentValidation_dd, 1);
|
|
1358
|
+
await this.closeDropdown(this.SelfEmploymentValidation_dd);
|
|
1359
|
+
if (!choices || choices.length === 0) {
|
|
1360
|
+
throw new Error(
|
|
1361
|
+
'[Applicant Income] Self Employed: no validation method options from dropdown; cannot complete income.',
|
|
1362
|
+
);
|
|
1363
|
+
}
|
|
1364
|
+
const trimmed = choices.map((c) => (c || '').trim()).filter(Boolean);
|
|
1365
|
+
const pick = trimmed[trimmed.length - 1];
|
|
1366
|
+
if (!pick) {
|
|
1367
|
+
throw new Error(
|
|
1368
|
+
'[Applicant Income] Self Employed: no validation method options from dropdown; cannot complete income.',
|
|
1369
|
+
);
|
|
1370
|
+
}
|
|
1371
|
+
await this.fillDropdown(this.SelfEmploymentValidation_dd, pick);
|
|
1372
|
+
await this.ICertifyThatIAmSelfEmployed_ChkBox.click();
|
|
1373
|
+
await this.SelfEmploymentName_Txtbox.fill(`Self Employ Cert ${await this.generateRandomNumbers()}`);
|
|
1374
|
+
// await this.DateOfCertificationTodayDate_Txtbox.click();
|
|
1375
|
+
// await this.DatePicker.waitFor({ state: 'visible' });
|
|
1376
|
+
// await this.DatePickerToday_Btn.click();
|
|
1377
|
+
await this.SelfEmploymentTypeOfWork_Txtbox.fill('Independent consulting');
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
/** Normalize currency / spinbutton strings (e.g. Applicant Income vs Edit Primary Applicant). */
|
|
1382
|
+
static parseAmountField(value: string): number {
|
|
1383
|
+
const n = parseFloat(String(value).replace(/[^0-9.-]/g, ''));
|
|
1384
|
+
return Number.isFinite(n) ? n : NaN;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
/** Step 4 (Documents) file input mapped from each {@link ApplicantIncomeSimpleSource} on Applicant Income (step 2). */
|
|
1388
|
+
getDocumentUploadLocatorForIncomeSource(source: ApplicantIncomeSimpleSource): Locator {
|
|
1389
|
+
switch (source) {
|
|
1390
|
+
case 'Paycheck (last 4 weeks of paystubs must be provided)':
|
|
1391
|
+
return this.DocumentUploadPaycheck_UploadFiles;
|
|
1392
|
+
case 'Pension':
|
|
1393
|
+
return this.DocumentUploadPension_UploadFiles;
|
|
1394
|
+
case 'Rental Income':
|
|
1395
|
+
return this.DocumentUploadRentalProperty_UploadFiles;
|
|
1396
|
+
case 'Self Employed':
|
|
1397
|
+
return this.DocumentUploadProofOfSelfEmployment_UploadFiles;
|
|
1398
|
+
case 'Four Zero One K':
|
|
1399
|
+
return this.DocumentUpload401KWithdrawal_UploadFiles;
|
|
1400
|
+
case 'Social Security Retirement':
|
|
1401
|
+
return this.DocumentUploadSocialSecurityRetirement_UploadFiles;
|
|
1402
|
+
case 'SSDI':
|
|
1403
|
+
return this.DocumentUploadSSDI_UploadFiles;
|
|
1404
|
+
case 'Unemployment Compensation':
|
|
1405
|
+
return this.DocumentUploadUnemploymentCompensation_UploadFiles;
|
|
1406
|
+
case 'Interest Income':
|
|
1407
|
+
return this.DocumentUploadInterestIncome_UploadFiles;
|
|
1408
|
+
case 'Annuity Payments':
|
|
1409
|
+
return this.DocumentUploadAnnuityPayments_UploadFiles;
|
|
1410
|
+
case 'Dividends':
|
|
1411
|
+
return this.DocumentUploadDividends_UploadFiles;
|
|
1412
|
+
default:
|
|
1413
|
+
throw new Error(`Unhandled income source for document upload: ${String(source)}`);
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* Checkbox locator per simple income source. Same labels are used on Applicant Income (step 2)
|
|
1419
|
+
* and on Add/Edit Household Member, so this map is shared by both flows.
|
|
1420
|
+
*/
|
|
1421
|
+
getIncomeSourceCheckboxes(): Record<ApplicantIncomeSimpleSource, Locator> {
|
|
1422
|
+
return {
|
|
1423
|
+
'Paycheck (last 4 weeks of paystubs must be provided)': this.Paycheck_ChkBox,
|
|
1424
|
+
Pension: this.Pension_ChkBox,
|
|
1425
|
+
'Rental Income': this.RentalIncome_ChkBox,
|
|
1426
|
+
'Self Employed': this.SelfEmployed_ChkBox,
|
|
1427
|
+
'Four Zero One K': this.FourZeroOneK_ChkBox,
|
|
1428
|
+
'Social Security Retirement': this.SocialSecurityRetirement_ChkBox,
|
|
1429
|
+
SSDI: this.SSDI_ChkBox,
|
|
1430
|
+
'Unemployment Compensation': this.UnemploymentCompensation_ChkBox,
|
|
1431
|
+
'Interest Income': this.InterestIncome_ChkBox,
|
|
1432
|
+
'Annuity Payments': this.AnnuityPayments_ChkBox,
|
|
1433
|
+
Dividends: this.Dividends_ChkBox,
|
|
1434
|
+
};
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
/** Applicant Income (step 2) amount field per simple income source — mirrors {@link getHouseholdIncomeLocatorsForEditPrimary} spinboxes. */
|
|
1438
|
+
getApplicantIncomeSpinboxesBySimpleSource(): Record<ApplicantIncomeSimpleSource, Locator> {
|
|
1439
|
+
return {
|
|
1440
|
+
'Paycheck (last 4 weeks of paystubs must be provided)': this.FirstEmployerGMI_Txtbox,
|
|
1441
|
+
Pension: this.MonthlyPensionAmount_Txtbox,
|
|
1442
|
+
'Rental Income': this.RentalIncomeAmount_Txtbox,
|
|
1443
|
+
'Self Employed': this.SelfEmployedAmount_Txtbox,
|
|
1444
|
+
'Four Zero One K': this.FourZeroOneKAmount_Txtbox,
|
|
1445
|
+
'Social Security Retirement': this.SocialSecurityRetirementAmount_Txtbox,
|
|
1446
|
+
SSDI: this.SSDIAmount_Txtbox,
|
|
1447
|
+
'Unemployment Compensation': this.UnemploymentCompensationAmount_Txtbox,
|
|
1448
|
+
'Interest Income': this.InterestIncomeAmount_Txtbox,
|
|
1449
|
+
'Annuity Payments': this.AnnuityPaymentsAmount_Txtbox,
|
|
1450
|
+
Dividends: this.DividendsAmount_Txtbox,
|
|
1451
|
+
};
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
/** Block + amount spinbutton per income source on Edit Primary Applicant. */
|
|
1455
|
+
getHouseholdIncomeLocatorsForEditPrimary(): Record<
|
|
1456
|
+
ApplicantIncomeSimpleSource,
|
|
1457
|
+
{ block: Locator; spinbox: Locator }
|
|
1458
|
+
> {
|
|
1459
|
+
return {
|
|
1460
|
+
'Paycheck (last 4 weeks of paystubs must be provided)': {
|
|
1461
|
+
block: this.HouseholdFirstEmployerGMI_Txtbox,
|
|
1462
|
+
spinbox: this.HouseholdFirstEmployerGMI_Txtbox,
|
|
1463
|
+
},
|
|
1464
|
+
Pension: {
|
|
1465
|
+
block: this.HouseholdPension_Block,
|
|
1466
|
+
spinbox: this.HouseholdPensionAmount_Txtbox
|
|
1467
|
+
},
|
|
1468
|
+
'Rental Income': {
|
|
1469
|
+
block: this.HouseholdRentalProperty_Block,
|
|
1470
|
+
spinbox: this.HouseholdRentalPropertyAmount_Txtbox,
|
|
1471
|
+
},
|
|
1472
|
+
'Self Employed': {
|
|
1473
|
+
block: this.HouseholdSelfEmployed_Block,
|
|
1474
|
+
spinbox: this.HouseholdSelfEmployedAmount_Txtbox,
|
|
1475
|
+
},
|
|
1476
|
+
'Four Zero One K': {
|
|
1477
|
+
block: this.HouseholdFourZeroOneK_Block,
|
|
1478
|
+
spinbox: this.HouseholdFourZeroOneKAmount_Txtbox,
|
|
1479
|
+
},
|
|
1480
|
+
'Social Security Retirement': {
|
|
1481
|
+
block: this.HouseholdSocialSecurityRetirement_Block,
|
|
1482
|
+
spinbox: this.HouseholdSocialSecurityRetirementAmount_Txtbox,
|
|
1483
|
+
},
|
|
1484
|
+
SSDI: { block: this.HouseholdSSDI_Block, spinbox: this.HouseholdSSDIAmount_Txtbox },
|
|
1485
|
+
'Unemployment Compensation': {
|
|
1486
|
+
block: this.HouseholdUnemploymentCompensation_Block,
|
|
1487
|
+
spinbox: this.HouseholdUnemploymentCompensationAmount_Txtbox,
|
|
1488
|
+
},
|
|
1489
|
+
'Interest Income': {
|
|
1490
|
+
block: this.HouseholdInterestIncome_Block,
|
|
1491
|
+
spinbox: this.HouseholdInterestIncomeAmount_Txtbox,
|
|
1492
|
+
},
|
|
1493
|
+
'Annuity Payments': {
|
|
1494
|
+
block: this.HouseholdAnnuityPayments_Block,
|
|
1495
|
+
spinbox: this.HouseholdAnnuityPaymentsAmount_Txtbox,
|
|
1496
|
+
},
|
|
1497
|
+
Dividends: { block: this.HouseholdDividends_Block, spinbox: this.HouseholdDividendsAmount_Txtbox },
|
|
1498
|
+
};
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
/**
|
|
1502
|
+
* Opens **Add a Household Member**, fills demographics (same textboxes the UI exposes as primary-field locators
|
|
1503
|
+
* in the add flow), then optionally fills random household income like {@link fillApplicantIncomeScreenRandomly}.
|
|
1504
|
+
*/
|
|
1505
|
+
async addHouseholdMember(opts?: {
|
|
1506
|
+
relationship?: string;
|
|
1507
|
+
/** When true (default), sets Has Income = Yes and runs {@link fillHouseholdMemberIncomeRandomly}. */
|
|
1508
|
+
fillRandomIncome?: boolean;
|
|
1509
|
+
incomeSourceCount?: number;
|
|
1510
|
+
}): Promise<ApplicantIncomeScreenFillResultYes | undefined> {
|
|
1511
|
+
console.log('[Household Member] addHouseholdMember — start');
|
|
1512
|
+
const relationship = opts?.relationship ?? 'Spouse';
|
|
1513
|
+
const fillRandomIncome = opts?.fillRandomIncome !== false;
|
|
1514
|
+
const suffix = String(await this.generateRandomNumbers());
|
|
1515
|
+
|
|
1516
|
+
await this.clickAddHouseholdMemberButton();
|
|
1517
|
+
await this.FirstName_Input.fill(`HouseholdFirst${suffix}`);
|
|
1518
|
+
await this.MiddleName_Input.fill('T');
|
|
1519
|
+
await this.LastName_Input.fill(`HouseholdLast${suffix}`);
|
|
1520
|
+
await this.DOB_Input.fill('2015-01-15');
|
|
1521
|
+
await this.HouseholdSSN_Txtbox.fill(`12${suffix}34567`.slice(0, 9));
|
|
1522
|
+
console.log(
|
|
1523
|
+
'[Household Member] Demographics filled:',
|
|
1524
|
+
`HouseholdFirst${suffix}`,
|
|
1525
|
+
'T',
|
|
1526
|
+
`HouseholdLast${suffix}`,
|
|
1527
|
+
'| DOB: 2015-01-15',
|
|
1528
|
+
);
|
|
1529
|
+
|
|
1530
|
+
await this.clickRelationshipToApplicantDropdown();
|
|
1531
|
+
await this.selectDropdownOption(this.RelationshipToApplicant_ddl, relationship);
|
|
1532
|
+
|
|
1533
|
+
if (!fillRandomIncome) {
|
|
1534
|
+
console.log('[Household Member] addHouseholdMember — skipping random income (fillRandomIncome false)');
|
|
1535
|
+
return undefined;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
console.log('[Household Member] Household Member Has Income: Yes');
|
|
1539
|
+
await this.clickHouseholdMemberHasIncomeDropdown();
|
|
1540
|
+
await this.selectDropdownOption(this.HouseholdMemberHasIncome_ddl, 'Yes');
|
|
1541
|
+
|
|
1542
|
+
return this.fillHouseholdMemberIncomeRandomly({
|
|
1543
|
+
incomeSourceCount: opts?.incomeSourceCount,
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
/**
|
|
1548
|
+
* On **Add Household Member** (or edit member) with "Has income" = Yes: picks a random subset of the same
|
|
1549
|
+
* simple sources as {@link fillApplicantIncomeScreenRandomly}, checks each, and fills the
|
|
1550
|
+
* **household** spinbuttons from {@link getHouseholdIncomeLocatorsForEditPrimary}.
|
|
1551
|
+
*/
|
|
1552
|
+
async fillHouseholdMemberIncomeRandomly(opts?: {
|
|
1553
|
+
incomeSourceCount?: number;
|
|
1554
|
+
/** Sources already selected on the form (e.g. from Applicant Income); never picked, so checkboxes are not toggled off. */
|
|
1555
|
+
excludeSources?: readonly ApplicantIncomeSimpleSource[];
|
|
1556
|
+
}): Promise<ApplicantIncomeScreenFillResultYes> {
|
|
1557
|
+
console.log('[Household Member Income] fillHouseholdMemberIncomeRandomly — start');
|
|
1558
|
+
const excluded = new Set(opts?.excludeSources ?? []);
|
|
1559
|
+
const sources = SIMPLE_INCOME_SOURCES.filter((s) => !excluded.has(s));
|
|
1560
|
+
if (sources.length === 0) {
|
|
1561
|
+
throw new Error(
|
|
1562
|
+
'[Household Member Income] fillHouseholdMemberIncomeRandomly: excludeSources removed all income types; pass fewer exclusions or a smaller incomeSourceCount.',
|
|
1563
|
+
);
|
|
1564
|
+
}
|
|
1565
|
+
this.shuffleArrayInPlace(sources);
|
|
1566
|
+
|
|
1567
|
+
const maxSources = sources.length;
|
|
1568
|
+
const howMany =
|
|
1569
|
+
opts?.incomeSourceCount !== undefined
|
|
1570
|
+
? Math.min(maxSources, Math.max(1, Math.trunc(opts.incomeSourceCount)))
|
|
1571
|
+
: 1 + Math.floor(Math.random() * maxSources);
|
|
1572
|
+
const picked = sources.slice(0, howMany);
|
|
1573
|
+
const amountsBySource: Partial<Record<ApplicantIncomeSimpleSource, string>> = {};
|
|
1574
|
+
const locs = this.getHouseholdIncomeLocatorsForEditPrimary();
|
|
1575
|
+
const incomeCheckbox = this.getIncomeSourceCheckboxes();
|
|
1576
|
+
console.log('[Household Member Income] Random income sources count:', howMany);
|
|
1577
|
+
console.log('[Household Member Income] Random income sources selected:', picked.join(', '));
|
|
1578
|
+
|
|
1579
|
+
for (const source of picked) {
|
|
1580
|
+
await incomeCheckbox[source].click();
|
|
1581
|
+
await this.fillHouseholdMemberIncomeRequiredFieldsForSource(source);
|
|
1582
|
+
const amount = String(await this.generateRandomNumbers());
|
|
1583
|
+
amountsBySource[source] = amount;
|
|
1584
|
+
console.log('[Household Member Income] ', source, '-> monthly amount:', amount);
|
|
1585
|
+
await locs[source].spinbox.fill(amount);
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
await this.HouseholdTotalMonthlyHouseholdIncome_Value.click();
|
|
1589
|
+
const totalRaw =
|
|
1590
|
+
(await this.HouseholdTotalMonthlyHouseholdIncome_Value.textContent())?.trim() ?? '';
|
|
1591
|
+
console.log('[Household Member Income] Total Monthly Household Income (member, field):', totalRaw);
|
|
1592
|
+
console.log('[Household Member Income] fillHouseholdMemberIncomeRandomly — clicking Save or Update');
|
|
1593
|
+
await this.clickSaveOrUpdateButton();
|
|
1594
|
+
return {
|
|
1595
|
+
receivedIncome: 'Yes',
|
|
1596
|
+
amountsBySource,
|
|
1597
|
+
totalPrimaryApplicantIncomeMonthly: totalRaw,
|
|
1598
|
+
};
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
|
|
1602
|
+
/**
|
|
1603
|
+
* Household-member equivalent of {@link fillApplicantIncomeRequiredFieldsForSource}: Paycheck and Self Employed
|
|
1604
|
+
* require companion fields beyond the monthly amount on the Add/Edit Household Member form.
|
|
1605
|
+
*/
|
|
1606
|
+
async fillHouseholdMemberIncomeRequiredFieldsForSource(source: ApplicantIncomeSimpleSource): Promise<void> {
|
|
1607
|
+
if (source === 'Paycheck (last 4 weeks of paystubs must be provided)') {
|
|
1608
|
+
await this.HouseholdPaycheck_Block.scrollIntoViewIfNeeded();
|
|
1609
|
+
await this.FirstEmployer_Name_Txtbox.fill(`Test Employer ${await this.generateRandomNumbers()}`);
|
|
1610
|
+
return;
|
|
1611
|
+
}
|
|
1612
|
+
if (source === 'Self Employed') {
|
|
1613
|
+
await this.HouseholdSelfEmployed_Block.scrollIntoViewIfNeeded();
|
|
1614
|
+
const choices = (await this.getDropdownOptions(this.SelfEmploymentValidation_dd, 2)) ?? [];
|
|
1615
|
+
const trimmed = choices.map((c) => c.trim()).filter(Boolean);
|
|
1616
|
+
const pick = trimmed[trimmed.length - 1];
|
|
1617
|
+
if (!pick) {
|
|
1618
|
+
throw new Error(
|
|
1619
|
+
'[Household Member Income] Self Employed: no validation method options from dropdown; cannot complete income.',
|
|
1620
|
+
);
|
|
1621
|
+
}
|
|
1622
|
+
await this.selectDropdownOption(this.SelfEmploymentValidation_dd, pick);
|
|
1623
|
+
//await this.fillDropdown(this.SelfEmploymentValidation_dd, pick);
|
|
1624
|
+
await this.HouseholdICertifyThatIAmSelfEmployed_ChkBox.click();
|
|
1625
|
+
await this.SelfEmploymentName_Txtbox.fill(`Self Employ Cert ${await this.generateRandomNumbers()}`);
|
|
1626
|
+
await this.SelfEmploymentTypeOfWork_Txtbox.fill('Independent consulting');
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
async fillAdditionalInformationScreenRandomly(){
|
|
1631
|
+
await this.PrimaryCareProvider_dd.click();
|
|
1632
|
+
await this.selectDropdownOption(this.PrimaryCareProvider_ddl, 'Sample Provider');
|
|
1633
|
+
const applicationModeOfUpdatesOptions = [
|
|
1634
|
+
this.ApplicationModeOfUpdates_Email_ChkBox,
|
|
1635
|
+
this.ApplicationModeOfUpdates_TextMessage_ChkBox,
|
|
1636
|
+
this.ApplicationModeOfUpdates_Telephone_ChkBox,
|
|
1637
|
+
];
|
|
1638
|
+
const numberOfApplicationOptionsToSelect = Math.floor(Math.random() * applicationModeOfUpdatesOptions.length) + 1;
|
|
1639
|
+
const shuffledApplicationModeOptions = [...applicationModeOfUpdatesOptions].sort(() => Math.random() - 0.5);
|
|
1640
|
+
|
|
1641
|
+
for (const option of shuffledApplicationModeOptions.slice(0, numberOfApplicationOptionsToSelect)) {
|
|
1642
|
+
await option.click();
|
|
1643
|
+
}
|
|
1644
|
+
const planModeOfUpdatesOptions = [
|
|
1645
|
+
this.PlanModeOfUpdates_Email_ChkBox,
|
|
1646
|
+
this.PlanModeOfUpdates_TextMessage_ChkBox,
|
|
1647
|
+
this.PlanModeOfUpdates_Telephone_ChkBox,
|
|
1648
|
+
];
|
|
1649
|
+
if (Math.random() < 0.25) {
|
|
1650
|
+
await this.PlanModeOfUpdates_NoContact_ChkBox.click();
|
|
1651
|
+
} else {
|
|
1652
|
+
const numberOfOptionsToSelect = Math.floor(Math.random() * planModeOfUpdatesOptions.length) + 1;
|
|
1653
|
+
const shuffledPlanModeOptions = [...planModeOfUpdatesOptions].sort(() => Math.random() - 0.5);
|
|
1654
|
+
for (const option of shuffledPlanModeOptions.slice(0, numberOfOptionsToSelect)) {
|
|
1655
|
+
await option.click();
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
const [previewPage] = await Promise.all([
|
|
1659
|
+
this.page.waitForEvent('popup'),
|
|
1660
|
+
this.PreviewApplication_Lnk.click(),
|
|
1661
|
+
]);
|
|
1662
|
+
await (previewPage.locator('iframe:visible')).waitFor({ state: 'visible' });
|
|
1663
|
+
await previewPage.close();
|
|
1664
|
+
await this.TypeLegalName_Textbox.fill(createApplicationFormData.firstName + ' ' + createApplicationFormData.lastName);
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
/** Upload Driver License / State Identification Card only when that required document is present. */
|
|
1668
|
+
async uploadIdentificationCardIfPresent(filePath = 'test-data/Sample.png'): Promise<boolean> {
|
|
1669
|
+
await this.MemberwiseDocuments_Block.waitFor({ state: 'visible' });
|
|
1670
|
+
if (await this.DocumentUploadIdentificationCard_UploadFiles.count() === 0) {
|
|
1671
|
+
return false;
|
|
1672
|
+
}
|
|
1673
|
+
await this.DocumentUploadIdentificationCard_UploadFiles.setInputFiles(filePath);
|
|
1674
|
+
await this.DocumentUploadSuccess_Icon.waitFor({ state: 'attached' });
|
|
1675
|
+
await this.Done_Btn.click();
|
|
1676
|
+
return true;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
async signConsentFormRandomly(): Promise<void> {
|
|
1680
|
+
const signatureBox = await this.Signature_Canvas.boundingBox();
|
|
1681
|
+
if (!signatureBox) {
|
|
1682
|
+
throw new Error('Signature canvas is not visible');
|
|
1683
|
+
}
|
|
1684
|
+
await this.page.mouse.move(signatureBox.x + 20, signatureBox.y + signatureBox.height / 2);
|
|
1685
|
+
await this.page.mouse.down();
|
|
1686
|
+
await this.page.mouse.move(signatureBox.x + 80, signatureBox.y + 20);
|
|
1687
|
+
await this.page.mouse.move(signatureBox.x + 140, signatureBox.y + signatureBox.height - 20);
|
|
1688
|
+
await this.page.mouse.up();
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
async isSignConsentFormVisible(timeout = 10_000): Promise<boolean> {
|
|
1692
|
+
return this.SignConsentForm_Header.waitFor({ state: 'visible', timeout })
|
|
1693
|
+
.then(() => true)
|
|
1694
|
+
.catch(() => false);
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
async isSignatureCanvasEmpty(): Promise<boolean> {
|
|
1698
|
+
return this.Signature_Canvas.evaluate((canvas) => {
|
|
1699
|
+
const signatureCanvas = canvas as HTMLCanvasElement;
|
|
1700
|
+
const ctx = signatureCanvas.getContext('2d');
|
|
1701
|
+
if (!ctx) {
|
|
1702
|
+
throw new Error('Signature canvas 2D context is not available');
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
const { width, height } = signatureCanvas;
|
|
1706
|
+
const pixelData = ctx.getImageData(0, 0, width, height).data;
|
|
1707
|
+
return !pixelData.some(channel => channel !== 0);
|
|
1708
|
+
});
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
async fillConsentForm(): Promise<void> {
|
|
1712
|
+
if (await this.isSignConsentFormVisible()) {
|
|
1713
|
+
await this.clickConsentInformationCheckbox();
|
|
1714
|
+
await this.signConsentFormRandomly();
|
|
1715
|
+
await this.clickAcceptSignatureButton();
|
|
1716
|
+
await this.clickAgreeAndConsentButton();
|
|
1717
|
+
await this.clickSubmitApplicationButton();
|
|
1718
|
+
await this.clickNextButton();
|
|
1719
|
+
} else {
|
|
1720
|
+
await this.clickSubmitApplicationButton();
|
|
1721
|
+
await this.ClickNextToSocialServicesAssesment_Lbl.waitFor({ state: 'visible' });
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
shuffleArrayInPlace<T>(items: T[]): void {
|
|
1726
|
+
for (let i = items.length - 1; i > 0; i--) {
|
|
1727
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
1728
|
+
[items[i], items[j]] = [items[j], items[i]];
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
normalizeText(text: string | null | undefined): string {
|
|
1733
|
+
return (text ?? '').replace(/\s+/g, ' ').trim();
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
}
|