Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AFE dummy API calls and form validation #35360

Merged
merged 6 commits into from
Jun 18, 2020

Conversation

bencodeorg
Copy link
Contributor

@bencodeorg bencodeorg commented Jun 17, 2020

This PR:

  1. Adds a route to allow us to actually submit data to AFE. It seems like it should be relatively straightforward to submit to Pardot, but our tests of the route aren't working (we've reached out to AFE for guidance). I've included a dummy URL for now.
  2. Does validation on the form -- namely, it a) does not allow users to move from the first step (email and school) to the second step until they've filled out both fields, and b) does appropriate requiring of fields in the second step. Eg, it requires shipping address fields if you've said you want the "inspiration kit".

To dos:

  1. Actually make API work (waiting on response from AFE).
  2. Second API call to CSTA JotForm API endpoint.
  3. The school validation doesn't work as I'd like currently -- it won't let you progress without choosing a school, but doesn't appropriately circle the school dropdown in red if it's empty.
  4. Dedupe a lot of the repetitive code that creates checkboxes / text fields.
  5. Use submitted variable to keep track of whether we've submitted this users data before.

Testing story

Manual testing still for client side validation. Added some basic initial tests for the new controller action.

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@bencodeorg bencodeorg requested review from a team and islemaster June 17, 2020 00:31
Copy link
Contributor

@islemaster islemaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Excellent incremental step

class Api::V1::AmazonFutureEngineerController < ApplicationController
include PardotHelpers

skip_before_action :verify_authenticity_token
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder that we'll want to actually require an authenticity token before we're done with this feature.

@bencodeorg bencodeorg changed the title AFE dummy API calls and validation AFE dummy API calls and form validation Jun 17, 2020
Base automatically changed from eligibility-check-afe to staging June 17, 2020 23:28
@bencodeorg bencodeorg merged commit f117c04 into staging Jun 18, 2020
@bencodeorg bencodeorg deleted the afe-api-calls-and-validation branch June 18, 2020 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants