-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add autofill cypress test (#4607)
* test: update cypress test steps to include conditional autofill logic * test: run autofill test after regular test (broken) * test: change second test to Elm Village for continuity * test: remove zeros from mock bday months * test: edit command conditionals based on actual autofill logic and add some cy.wait() to pass tests * chore: move cy.wait into autofill only conditional and move step 12 to be after step 11 * test: create blue sky specific autofill application and run that after elm village * chore: add BlueSkyProgramsAndPreferences to minimalDataApplication * chore: remove only from test * chore: pull nextStep logic out of function argument * chore: wait 1 second on step 6 autofill * chore: remove cy.log and put autofill logic back in arg * test: add pathname checks before and after problematic line * test: conditional isNextRouteValid call because using skip arg was inconsistent * test: grab text to slow down step 6 during autofill * test: run step6 only if not autofill * test: select text instead of cy.wait() to slow app down * test: rm minimalApplication, pass empty programs array, don't skip household step on autofill
- Loading branch information
1 parent
fd0e526
commit cf128ee
Showing
5 changed files
with
361 additions
and
528 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,7 @@ export const ElmVillageApplication: Application = { | |
firstName: "First Name", | ||
middleName: "Middle Name", | ||
lastName: "Last Name", | ||
birthMonth: "07", | ||
birthMonth: "7", | ||
birthDay: "17", | ||
birthYear: "1996", | ||
emailAddress: "[email protected]", | ||
|
@@ -166,7 +166,7 @@ export const ElmVillageApplication: Application = { | |
firstName: "Member Name", | ||
middleName: "Member Middle Name", | ||
lastName: "Member Last Name", | ||
birthMonth: "07", | ||
birthMonth: "7", | ||
birthDay: "17", | ||
birthYear: "1996", | ||
householdMemberAddress: { | ||
|
@@ -191,42 +191,12 @@ export const ElmVillageApplication: Application = { | |
}, | ||
], | ||
preferredUnitTypes: [ | ||
{ | ||
...idDefaults, | ||
id: "dff3ff70-7085-4dab-afd9-de4b33e0ec1e", | ||
name: "SRO" as UnitTypeEnum, | ||
numBedrooms: 0, | ||
}, | ||
{ | ||
...idDefaults, | ||
id: "dff3ff70-7085-4dab-afd9-de4b33e0ec1e", | ||
name: "Studio" as UnitTypeEnum, | ||
numBedrooms: 0, | ||
}, | ||
{ | ||
...idDefaults, | ||
id: "dff3ff70-7085-4dab-afd9-de4b33e0ec1e", | ||
name: "1 Bedroom" as UnitTypeEnum, | ||
numBedrooms: 1, | ||
}, | ||
{ | ||
...idDefaults, | ||
id: "dff3ff70-7085-4dab-afd9-de4b33e0ec1e", | ||
name: "2 Bedroom" as UnitTypeEnum, | ||
numBedrooms: 2, | ||
}, | ||
{ | ||
...idDefaults, | ||
id: "dff3ff70-7085-4dab-afd9-de4b33e0ec1e", | ||
name: "3 Bedroom" as UnitTypeEnum, | ||
numBedrooms: 3, | ||
}, | ||
{ | ||
...idDefaults, | ||
id: "dff3ff70-7085-4dab-afd9-de4b33e0ec1e", | ||
name: "4 Bedroom" as UnitTypeEnum, | ||
numBedrooms: 3, | ||
}, | ||
], | ||
demographics: { | ||
...idDefaults, | ||
|
@@ -307,207 +277,10 @@ export const ElmVillageApplication: Application = { | |
language: LanguagesEnum.en, | ||
} | ||
|
||
export const minimalDataApplication: Application = { | ||
markedAsDuplicate: false, | ||
...idDefaults, | ||
listings: { | ||
id: "abcd1234", | ||
}, | ||
applicant: { | ||
...idDefaults, | ||
phoneNumber: null, | ||
noPhone: true, | ||
phoneNumberType: null, | ||
workInRegion: YesNoEnum.no, | ||
applicantAddress: { | ||
...idDefaults, | ||
street: "600 Montgomery St", | ||
street2: "Unit", | ||
city: "San Francisco", | ||
state: "CA", | ||
zipCode: "94111", | ||
county: "", | ||
}, | ||
applicantWorkAddress: { | ||
...idDefaults, | ||
street: "", | ||
street2: "", | ||
city: "", | ||
state: "", | ||
zipCode: "", | ||
}, | ||
firstName: "First Name", | ||
middleName: null, | ||
lastName: "Last Name", | ||
birthMonth: "07", | ||
birthDay: "17", | ||
birthYear: "1996", | ||
emailAddress: null, | ||
noEmail: true, | ||
}, | ||
additionalPhone: false, | ||
additionalPhoneNumber: "", | ||
additionalPhoneNumberType: "", | ||
contactPreferences: ["letter"], | ||
householdSize: 1, | ||
housingStatus: "", | ||
sendMailToMailingAddress: false, | ||
householdExpectingChanges: false, | ||
householdStudent: false, | ||
applicationsMailingAddress: { | ||
...idDefaults, | ||
street: "", | ||
street2: "", | ||
city: "", | ||
state: "", | ||
zipCode: "", | ||
}, | ||
applicationsAlternateAddress: { | ||
...idDefaults, | ||
street: "", | ||
street2: "", | ||
city: "", | ||
state: "", | ||
zipCode: "", | ||
}, | ||
alternateContact: { | ||
...idDefaults, | ||
type: AlternateContactRelationship.noContact, | ||
firstName: "", | ||
lastName: "", | ||
agency: "", | ||
phoneNumber: "", | ||
otherType: "", | ||
emailAddress: "", | ||
address: { | ||
...idDefaults, | ||
street: "", | ||
street2: "", | ||
city: "", | ||
state: "", | ||
zipCode: "", | ||
}, | ||
}, | ||
accessibility: { | ||
...idDefaults, | ||
mobility: false, | ||
vision: false, | ||
hearing: false, | ||
}, | ||
incomeVouchers: false, | ||
income: "50000", | ||
incomePeriod: IncomePeriodEnum.perYear, | ||
householdMember: [], | ||
preferredUnitTypes: [ | ||
{ | ||
...idDefaults, | ||
id: "dff3ff70-7085-4dab-afd9-de4b33e0ec1e", | ||
name: "1 Bedroom" as UnitTypeEnum, | ||
numBedrooms: 1, | ||
}, | ||
], | ||
demographics: { | ||
...idDefaults, | ||
howDidYouHear: [], | ||
race: [], | ||
}, | ||
export const autofillBlueSkyApplication: Application = { | ||
...ElmVillageApplication, | ||
preferences: [], | ||
programs: [ | ||
{ | ||
claimed: false, | ||
key: "servedInMilitary", | ||
options: [ | ||
{ | ||
key: "servedInMilitary", | ||
checked: false, | ||
}, | ||
{ | ||
key: "doNotConsider", | ||
checked: false, | ||
}, | ||
{ | ||
key: "preferNotToSay", | ||
checked: false, | ||
}, | ||
], | ||
}, | ||
{ | ||
key: "tay", | ||
claimed: false, | ||
options: [ | ||
{ | ||
key: "tay", | ||
checked: false, | ||
}, | ||
{ | ||
key: "doNotConsider", | ||
checked: false, | ||
}, | ||
{ | ||
key: "preferNotToSay", | ||
checked: false, | ||
}, | ||
], | ||
}, | ||
{ | ||
key: "disabilityOrMentalIllness", | ||
claimed: false, | ||
options: [ | ||
{ | ||
key: "disabilityOrMentalIllness", | ||
checked: false, | ||
}, | ||
{ | ||
key: "doNotConsider", | ||
checked: false, | ||
}, | ||
{ | ||
key: "preferNotToSay", | ||
checked: false, | ||
}, | ||
], | ||
}, | ||
{ | ||
key: "housingSituation", | ||
claimed: false, | ||
options: [ | ||
{ | ||
key: "notPermanent", | ||
checked: false, | ||
}, | ||
{ | ||
key: "homeless", | ||
checked: false, | ||
}, | ||
{ | ||
key: "doNotConsider", | ||
checked: false, | ||
}, | ||
{ | ||
key: "preferNotToSay", | ||
checked: false, | ||
}, | ||
], | ||
}, | ||
{ | ||
key: "rentBasedOnIncome", | ||
claimed: true, | ||
options: [ | ||
{ | ||
key: "flatRent", | ||
checked: true, | ||
}, | ||
{ | ||
key: "30Percent", | ||
checked: true, | ||
}, | ||
], | ||
}, | ||
] as ApplicationMultiselectQuestion[], | ||
confirmationCode: "", | ||
status: ApplicationStatusEnum.draft, | ||
submissionType: ApplicationSubmissionTypeEnum.electronical, | ||
language: LanguagesEnum.en, | ||
programs: [] as ApplicationMultiselectQuestion[], | ||
} | ||
|
||
export const applicationStepOrder = [ | ||
|
Oops, something went wrong.