Skip to content

Commit

Permalink
JB feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sussman committed Jul 9, 2024
1 parent 7bfb58d commit 2ec2dbc
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions app/services/applier/form_filler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ def processable

def process
visit_url
click_apply_button
fill_in_all_fields
sleep 2
fill_application_form
click_submit_button
confirm_submission_was_successful
verify_submission
ensure
@session.quit
end
Expand All @@ -49,11 +47,13 @@ def click_apply_button
end

def click_submit_button
sleep 2 # temporary -- just for testing
submit_button.click
end

def confirm_submission_was_successful
sleep 4
def verify_submission
sleep 4 # temporary -- just for testing
# TODO: add logic to check for successful submission message or other indicators
end

def doc_tmp_file(file_text)
Expand All @@ -63,11 +63,14 @@ def doc_tmp_file(file_text)
filepath
end

def fill_application_form
click_apply_button
fill_in_all_fields
end

def fill_in_all_fields
within(@application_form) do
@fields.each do |field|
fill_in_field(field)
end
@fields.each { |field| fill_in_field(field) }
end
end

Expand Down

0 comments on commit 2ec2dbc

Please sign in to comment.