Move confirmation email reference generation to job runtime#1918
Move confirmation email reference generation to job runtime#1918theseanything wants to merge 1 commit intomainfrom
Conversation
eb90806 to
0c9211b
Compare
d779cd7 to
4864c05
Compare
Move confirmation email reference creation from EmailConfirmationInput request-time handling into SendConfirmationEmailJob, so the Notify reference is generated when the job executes only when we need it.
4864c05 to
009c374
Compare
|
|
🎉 A review copy of this PR has been deployed! It is made of up two components Important Not all of the functionality of forms-runner is present in review apps. You should use the full dev environment to test the functionality which is disabled here. It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
| it "contains a hidden notify reference for the confirmation email" do | ||
| expect(rendered).to have_field("confirmation-email-reference", type: "hidden", with: email_confirmation_input.confirmation_email_reference) |
There was a problem hiding this comment.
We use this hidden reference in the end-to-end tests: https://github.com/alphagov/forms-e2e-tests/blob/5af8577d3291d7490634340bcd616badfda10e72/spec/support/feature_helpers.rb#L385
I think without this we'll either need to find another way of knowing which reference to look for in the Notify API or another way of checking the Notify content
There was a problem hiding this comment.
ah good catch! I'll take a look at decoupling the e2e tests



Move confirmation email reference creation from EmailConfirmationInput request-time handling into SendConfirmationEmailJob, so the Notify reference is generated when the job executes only when we need it.
Removes a lot of unnecessary code and makes EmailConfirmationInput model simpler.
We don't need to log the notify_response_id at request time, as request will not fail due a notify error - so little use to correlate them.