Conversation
| before do | ||
| fill_in 'user_phone_form_phone', with: Faker::PhoneNumber.cell_phone | ||
| phone = Faker::PhoneNumber.cell_phone | ||
| until PhonyRails.plausible_number? phone, country_code: :us |
There was a problem hiding this comment.
Can we break out a helper method to generate a number like this? With git grep Faker::PhoneNumber.cell_phone I find two uses in this file
There was a problem hiding this comment.
Moved this into a helper at the end of the spec. PTAL!
| end | ||
|
|
||
| config.around(:each, user_flow: true) do |example| | ||
| Capybara.current_driver = :rack_test |
There was a problem hiding this comment.
this is the opposite of our js: true -- don't some of our user flow tests use JS?
There was a problem hiding this comment.
The default driver is rack_test_desktop which does not support screenshots, so it isn't quite the opposite of js: true.
Also, there's issues with poltergeist coming from the SP so our JS user flows are disabled right now.
There was a problem hiding this comment.
Ok thanks for clarifying!
There was a problem hiding this comment.
I had meant just pulling the part that generates the valid-looking phone number into a helper, not the fillin in part, but this works too
**Why**: The rake_test_desktop driver does not support the `screenshot_and_save_page` function. Using the rack test driver allows us to save screenshot and save pages for the user flows. Use valid phone in phone form during user flows **Why**: Faker::PhoneNumber does not always produce valid phone numbers, which leads to flickering specs. This change loops until a valid phone number is generated Add idv_job metadata to LOA3 user flow specs **Why**: Setting `idv_job` to true is necessary for LOA3 specs to simulate the background jobs running to verify the user's identity.
3ff4316 to
c27df46
Compare
Add idv_job metadata to LOA3 user flow specs
Why: Setting
idv_jobto true is necessary for LOA3 specs tosimulate the background jobs running to verify the user's identity.
Use valid phone in phone form during user flows
Why: Faker::PhoneNumber does not always produce valid phone numbers,
which leads to flickering specs. This change loops until a valid phone
number is generated
Use rack_test driver for user flow specs
Why: The rake_test_desktop driver does not support the
screenshot_and_save_pagefunction. Using the rack test driver allowsus to save screenshot and save pages for the user flows.