From 114ab8d677f4212b57927b52f626c809fa58e254 Mon Sep 17 00:00:00 2001 From: Eric Tillberg Date: Tue, 22 Oct 2024 11:52:59 -0400 Subject: [PATCH 01/57] Add template id for 21-0966 error email (#19003) --- config/settings.yml | 1 + .../services/simple_forms_api/notification_email.rb | 2 +- .../spec/services/notification_email_spec.rb | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config/settings.yml b/config/settings.yml index 79b8a3e13de..46b0fdf9ccd 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -1306,6 +1306,7 @@ vanotify: form1990emeb_denied_confirmation_email: form1990emeb_denied_confirmation_email_template_id form1995_confirmation_email: form1995_confirmation_email_template_id form21_0966_confirmation_email: form21_0966_confirmation_email_template_id + form21_0966_error_email: form21_0966_error_email_template_id form21_0972_confirmation_email: form21_0972_confirmation_email_template_id form21_0972_error_email: form21_0972_error_email_template_id form21_0972_received_email: form21_0972_received_email_template_id diff --git a/modules/simple_forms_api/app/services/simple_forms_api/notification_email.rb b/modules/simple_forms_api/app/services/simple_forms_api/notification_email.rb index 355509714df..234627b9732 100644 --- a/modules/simple_forms_api/app/services/simple_forms_api/notification_email.rb +++ b/modules/simple_forms_api/app/services/simple_forms_api/notification_email.rb @@ -18,7 +18,7 @@ class NotificationEmail }, 'vba_21_0966' => { confirmation: Settings.vanotify.services.va_gov.template_id.form21_0966_confirmation_email, - error: nil, + error: Settings.vanotify.services.va_gov.template_id.form21_0966_error_email, received: nil }, 'vba_21_0972' => { diff --git a/modules/simple_forms_api/spec/services/notification_email_spec.rb b/modules/simple_forms_api/spec/services/notification_email_spec.rb index e734c584fb9..0bf7237cbbb 100644 --- a/modules/simple_forms_api/spec/services/notification_email_spec.rb +++ b/modules/simple_forms_api/spec/services/notification_email_spec.rb @@ -592,17 +592,17 @@ end let(:user) { create(:user, :loa3) } - context 'template_id is provided', if: notification_type == :confirmation do - it 'sends the confirmation email' do + context 'template_id is provided', unless: notification_type == :received do + it 'sends the email' do allow(VANotify::EmailJob).to receive(:perform_async) - subject = described_class.new(config, user:) + subject = described_class.new(config, notification_type:, user:) subject.send expect(VANotify::EmailJob).to have_received(:perform_async).with( user.va_profile_email, - 'form21_0966_confirmation_email_template_id', + "form21_0966_#{notification_type}_email_template_id", { 'first_name' => 'Veteran', 'date_submitted' => date_submitted, @@ -615,7 +615,7 @@ end end - context 'template_id is missing', if: notification_type != :confirmation do + context 'template_id is missing', if: notification_type == :received do let(:data) do fixture_path = Rails.root.join( 'modules', 'simple_forms_api', 'spec', 'fixtures', 'form_json', 'vba_21_0966.json' From f9e79b24606807e83132b74443e89da0a9c9c954 Mon Sep 17 00:00:00 2001 From: Andrew Herzberg Date: Tue, 22 Oct 2024 09:24:16 -0700 Subject: [PATCH 02/57] update specs to api docs (#18987) --- modules/mobile/docs/index.html | 34 +- modules/mobile/docs/openapi.json | 420 +++++++++++++++++- modules/mobile/docs/openapi.yaml | 2 +- modules/mobile/docs/schemas/Address.yml | 1 + modules/mobile/docs/schemas/AddressCreate.yml | 3 + .../mobile/docs/schemas/AddressResponse.yml | 4 + .../docs/schemas/AddressTransaction.yml | 3 + modules/mobile/docs/schemas/AddressUpdate.yml | 2 + .../docs/schemas/AllergyIntolerances.yml | 16 + modules/mobile/docs/schemas/Appeal.yml | 5 + modules/mobile/docs/schemas/Appointment.yml | 5 + .../docs/schemas/AppointmentCheckin.yml | 1 + .../AppointmentCheckinDemographics.yml | 7 + .../AppointmentCheckinDemographicsPatch.yml | 1 + .../schemas/AppointmentCheckinErrors400.yml | 4 + .../schemas/AppointmentCheckinErrors500.yml | 4 + .../docs/schemas/AppointmentPreferences.yml | 3 + .../schemas/AppointmentPreferencesRequest.yml | 1 + modules/mobile/docs/schemas/Appointments.yml | 3 + modules/mobile/docs/schemas/Awards.yml | 3 + modules/mobile/docs/schemas/Claim.yml | 3 + .../docs/schemas/ClaimDecisionResponse.yml | 2 + .../mobile/docs/schemas/ClaimDocUpload.yml | 2 + .../docs/schemas/ClaimUploadRequestBody.yml | 1 + .../mobile/docs/schemas/ClaimsAndAppeals.yml | 1 + .../docs/schemas/ClaimsAndAppealsOverview.yml | 4 + .../ClaimsAndAppealsOverviewAppealsError.yml | 6 + .../ClaimsAndAppealsOverviewClaimsError.yml | 6 + .../ClaimsAndAppealsOverviewDoubleFailure.yml | 5 + .../ClaimsAndAppealsOverviewErrors.yml | 1 + modules/mobile/docs/schemas/ClinicSlots.yml | 2 + .../docs/schemas/CommunityCareProvider.yml | 3 + .../docs/schemas/CommunityCareProviders.yml | 2 + .../schemas/CommunityCaresEligibility.yml | 3 + modules/mobile/docs/schemas/ContactPoint.yml | 1 + .../docs/schemas/CreateAppointmentCC.yml | 1 + .../docs/schemas/CreateAppointmentDirect.yml | 4 + .../docs/schemas/CreateAppointmentRequest.yml | 2 + .../docs/schemas/CreateDependentsResponse.yml | 3 + .../schemas/CreatePreneedBurialResponse.yml | 3 + .../schemas/CreateSecureMessagingFolder.yml | 2 + .../CreateSecureMessagingFolderResponse.yml | 4 + modules/mobile/docs/schemas/Debt.yml | 5 + modules/mobile/docs/schemas/Debts.yml | 4 + .../docs/schemas/DecisionLetterRecord.yml | 2 + .../mobile/docs/schemas/DecisionLetters.yml | 2 + modules/mobile/docs/schemas/Dependents.yml | 3 + .../schemas/DependentsRequestDecisions.yml | 5 + .../mobile/docs/schemas/DisabilityRating.yml | 4 + .../mobile/docs/schemas/DiscoveryRequest.yml | 1 + .../mobile/docs/schemas/DiscoveryResponse.yml | 6 +- modules/mobile/docs/schemas/EVSSAuthError.yml | 1 + modules/mobile/docs/schemas/Efolder.yml | 3 + modules/mobile/docs/schemas/Email.yml | 1 + .../mobile/docs/schemas/EmailTransaction.yml | 3 + modules/mobile/docs/schemas/EmailUpdate.yml | 1 + .../mobile/docs/schemas/EndpointDiscovery.yml | 34 ++ .../mobile/docs/schemas/EnrollmentStatus.yml | 3 + modules/mobile/docs/schemas/Error.yml | 3 + modules/mobile/docs/schemas/Errors.yml | 1 + .../mobile/docs/schemas/FacilitiesInfo.yml | 4 + .../mobile/docs/schemas/FacilityAddress.yml | 1 + .../mobile/docs/schemas/FacilityClinic.yml | 2 + .../mobile/docs/schemas/FacilityClinics.yml | 2 + .../docs/schemas/FacilityEligibilities.yml | 2 + .../docs/schemas/FacilityEligibility.yml | 2 + modules/mobile/docs/schemas/FacilityInfo.yml | 1 + .../docs/schemas/GenderIdentityEdit.yml | 4 + .../docs/schemas/GenderIdentityUpdate.yml | 1 + .../docs/schemas/GetSecureMessageDetail.yml | 7 + .../docs/schemas/ImmunizationRecord.yml | 5 + modules/mobile/docs/schemas/Immunizations.yml | 2 + .../schemas/IndividualDisabilityRatings.yml | 1 + modules/mobile/docs/schemas/LabsAndTests.yml | 5 + modules/mobile/docs/schemas/Letter.yml | 5 + modules/mobile/docs/schemas/LetterOptions.yml | 1 + modules/mobile/docs/schemas/Letters.yml | 4 + .../docs/schemas/LettersBeneficiaryInfo.yml | 5 + modules/mobile/docs/schemas/LettersInfo.yml | 1 + .../mobile/docs/schemas/LighthouseErrors.yml | 2 + modules/mobile/docs/schemas/Locations.yml | 4 + .../docs/schemas/MaintenanceWindows.yml | 3 + modules/mobile/docs/schemas/Message.yml | 12 - .../mobile/docs/schemas/MilitaryHistory.yml | 4 + .../mobile/docs/schemas/NewAppointment.yml | 1 + modules/mobile/docs/schemas/Observation.yml | 10 + .../mobile/docs/schemas/PatientContact.yml | 1 + .../mobile/docs/schemas/PaymentHistory.yml | 4 + modules/mobile/docs/schemas/PaymentInfo.yml | 3 + modules/mobile/docs/schemas/Pensions.yml | 3 + modules/mobile/docs/schemas/Period.yml | 1 + modules/mobile/docs/schemas/Phone.yml | 1 + .../mobile/docs/schemas/PhoneTransaction.yml | 3 + modules/mobile/docs/schemas/PhoneUpdate.yml | 1 + .../docs/schemas/PostSecureMessageDetail.yml | 6 + modules/mobile/docs/schemas/Practitioner.yml | 3 + .../mobile/docs/schemas/PractitionerIds.yml | 1 + .../mobile/docs/schemas/PreferredLocation.yml | 1 + .../docs/schemas/PreferredNameUpdate.yml | 1 + modules/mobile/docs/schemas/PreneedBurial.yml | 3 + .../docs/schemas/PrescriptionRecord.yml | 2 + .../docs/schemas/PrescriptionTracking.yml | 2 + .../schemas/PrescriptionTrackingRecord.yml | 3 + modules/mobile/docs/schemas/Prescriptions.yml | 4 + .../docs/schemas/PrescriptionsRefill.yml | 2 + .../docs/schemas/PushGetPreferences.yml | 4 + .../mobile/docs/schemas/PushPreferences.yml | 1 + .../mobile/docs/schemas/PushRegistration.yml | 1 + .../docs/schemas/PushRegistrationResponse.yml | 3 + .../docs/schemas/PushSendRequestBody.yml | 2 + modules/mobile/docs/schemas/ReasonCode.yml | 1 + modules/mobile/docs/schemas/RefillPayload.yml | 1 + .../docs/schemas/SecureMessageAttachment.yml | 3 + .../docs/schemas/SecureMessageCategories.yml | 2 + .../mobile/docs/schemas/SecureMessageList.yml | 5 + .../SecureMessageNewMessageRequest.yml | 1 + .../schemas/SecureMessageReplyRequest.yml | 1 + .../docs/schemas/SecureMessageSignature.yml | 3 + .../docs/schemas/SecureMessageSummary.yml | 3 + .../docs/schemas/SecureMessageThread.yml | 3 + .../docs/schemas/SecureMessageThreadList.yml | 1 + .../docs/schemas/SecureMessagingFolder.yml | 3 + .../docs/schemas/SecureMessagingFolders.yml | 3 + .../schemas/SecureMessagingRecipients.yml | 5 + .../docs/schemas/ServiceEligibilities.yml | 4 + .../mobile/docs/schemas/ServiceHistory.yml | 1 + modules/mobile/docs/schemas/Slot.yml | 2 + .../docs/schemas/UpdatePaymentInfoRequest.yml | 1 + modules/mobile/docs/schemas/User.yml | 5 + .../docs/schemas/UserAuthorizedServices.yml | 3 + .../mobile/docs/schemas/UserContactInfo.yml | 3 + .../mobile/docs/schemas/UserDemographics.yml | 2 + .../docs/schemas/v1/ImmunizationsV1.yml | 4 + .../docs/schemas/v1/SecureMessageListV1.yml | 8 + modules/mobile/docs/schemas/v1/UserV1.yml | 5 + modules/mobile/docs/schemas/v2/UserV2.yml | 2 + .../spec/requests/mobile/mobile_spec.rb | 7 +- .../spec/support/helpers/committee_helper.rb | 13 + .../spec/support/helpers/rails_helper.rb | 10 - 139 files changed, 863 insertions(+), 54 deletions(-) create mode 100644 modules/mobile/docs/schemas/EndpointDiscovery.yml delete mode 100644 modules/mobile/docs/schemas/Message.yml create mode 100644 modules/mobile/spec/support/helpers/committee_helper.rb diff --git a/modules/mobile/docs/index.html b/modules/mobile/docs/index.html index 017150b692d..a1c9a4ab0eb 100755 --- a/modules/mobile/docs/index.html +++ b/modules/mobile/docs/index.html @@ -12,7 +12,7 @@ margin: 0; } - -