-
Notifications
You must be signed in to change notification settings - Fork 2
Fix application_question.locator for payload #227
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
Open
patanj101
wants to merge
44
commits into
main
Choose a base branch
from
2024-08-08-fix/missing-payload-locator
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
36f5852
Fix application_question.locator for payload
patanj101 f46f3f6
Fix application_question.locator for payload (remove byebug)
patanj101 3c4660f
created apply_to_job_spec
daniel-sussman 33aa52c
Minor fixes for Bamboo
patanj101 31268ac
Workable: improvements & possibility to attach photo
patanj101 74cdbfe
Update question.option_text_values
patanj101 faef4c6
FieldsFormatter: DRY & Refactor attribute methods
patanj101 57d3224
FieldsFormatter: DRY & Refactor attribute methods (2)
patanj101 39f7cdc
Remove byebug
patanj101 8710538
apply_with_cheddar: fix
patanj101 2a034ff
Reset seeds.rb
patanj101 6dc9e26
rake task is functional except for date fields
daniel-sussman aa402f4
merged to branch
daniel-sussman 616bc36
Formatter Ouput jsons update
patanj101 3c0e8ca
Formatter Ouput jsons delete
patanj101 0b83b89
Payload formatter to manage textarea and date format
patanj101 6f78152
updates to rake task
daniel-sussman 0311e4e
merged branch
daniel-sussman a5ed9f5
Denied apply_with_cheddar for jobs with group type questions
patanj101 bbb0591
Prioritize Cover letter text over cover letter pdf
patanj101 e2c8167
Prioritize Cover letter text over cover letter pdf
patanj101 55f92e7
fix to ashby_form_filler
daniel-sussman eb5cbc0
merged to branch
daniel-sussman 0b012bb
added full list of FormFillers to ApplyToJob
daniel-sussman 33f16ec
Update converted_type for interaction purpose
patanj101 32de85d
Step back from formatted_answered_value
patanj101 5083aa1
Improve value output for payload
patanj101 86404b3
ApplicationSubmission: Fix ApplyJob call
patanj101 bc0d676
fixed apply_url with old_format greenhouse jobs
daniel-sussman 2e37eda
fixed it properly this time
daniel-sussman 673c2d4
tests:end_to_end is running correctly in the test environment
daniel-sussman 37cba6d
bugfix to true_up_spec
daniel-sussman 34bc584
added some rake_helpers
daniel-sussman a24aa55
apply_to_job_spec mocks a user and user_detail
daniel-sussman 4ff06f3
Bamboo is passing end_to_end tests
daniel-sussman 8121f8d
disabled attach_resume in FactoryBot
daniel-sussman 1944139
Bamboo yes_no question -> :radiogroup
daniel-sussman 52ca4e5
re-activated FormFiller submit
daniel-sussman b2ae2e2
end_to_end raketask can handle more standard fields
daniel-sussman f43183a
WorkableFormFiller is working for most questions but not group type
daniel-sussman ba49e50
group questions managed up to stimulus controller
daniel-sussman 864d082
problems with simple_form, group questions will break at template page
daniel-sussman 755a674
very hacky version of group question is working for Workable
daniel-sussman 0eebbc3
fixed Workable issue with group fields having same id as non-group fi…
daniel-sussman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| module RakeHelpers | ||
| # presents a menu of the ATSs that we can seed and test end-to-end | ||
| # user's selection is parsed by parse_response | ||
| def prompt_for_ats | ||
| ats_list = { | ||
| AshbyHQ: true, | ||
| BambooHR: true, | ||
| Greenhouse: true, | ||
| Workable: true | ||
| } | ||
|
|
||
| user_ready = false | ||
| options_count = ats_list.count | ||
|
|
||
| until user_ready | ||
| display_options(ats_list) | ||
| response = fetch_input(options_count) | ||
| user_ready, ats_list = parse_response(ats_list, response) | ||
| end | ||
|
|
||
| ats_list.select { |_, value| value.present? }.keys # return an array of the user-selected values | ||
| end | ||
|
|
||
| private | ||
|
|
||
| def display_options(ats_list) | ||
| system('clear') || system('cls') # depending on mac/linux | ||
| puts "Select which Applicant Tracking Systems you'd like to test:\n" | ||
| ats_list.each_with_index do |(name, value), index| | ||
| spacing = ' ' * [1, 14 - name.length].max | ||
| puts " #{index + 1}) - #{name}#{spacing}[#{value ? 'x' : ' '}]" | ||
| end | ||
| end | ||
|
|
||
| def fetch_input(options_count) | ||
| puts "\nSelect a number between 1 and #{options_count}:" | ||
| puts "Enter 'x' to select/deselect all.\n" | ||
| puts "Enter 'c' to commit these options." | ||
| $stdin.gets.chomp.downcase | ||
| end | ||
|
|
||
| def parse_response(ats_list, response) | ||
| return [true, ats_list] if response == 'c' # user_ready = true | ||
| return select_deselect_all(ats_list) if response == 'x' | ||
|
|
||
| response = response.to_i | ||
| ats_list = select_deselect_option(ats_list, response) if response.positive? && response <= ats_list.count | ||
| [false, ats_list] | ||
| end | ||
|
|
||
| def select_deselect_all(ats_list) | ||
| ats_list = ats_list.values.any?(&:blank?) ? ats_list.transform_values { true } : ats_list.transform_values { false } | ||
| [false, ats_list] | ||
| end | ||
|
|
||
| def select_deselect_option(ats_list, response) | ||
| index = response - 1 | ||
| key = ats_list.keys[index] | ||
| ats_list[key] ^= true # invert the value | ||
| ats_list | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import { Controller } from "@hotwired/stimulus"; | ||
|
|
||
| // Adds groups to forms and adjusts the id and name attributes of each group element | ||
| // This makes it possible to distinguish between duplicated groups | ||
| export default class extends Controller { | ||
| static targets = ['group', 'template', 'placeholder']; | ||
|
|
||
| increment_ids(fields, labels, nextId) { | ||
| fields.forEach(field => { | ||
| const id = field.id | ||
| const name = field.name | ||
| field.id = id + `[${nextId}]` | ||
| field.name = name + `[${nextId}]` | ||
| }) | ||
| labels.forEach(label => { | ||
| const forId = label.htmlFor | ||
| label.htmlFor = forId + `[${nextId}]` | ||
| }) | ||
| } | ||
|
|
||
| addGroup() { | ||
| const newGroup = this.templateTarget.content.cloneNode(true) | ||
| const labels = newGroup.querySelectorAll('label') | ||
| const fields = newGroup.querySelectorAll('input, date') | ||
| const nextId = this.groupTarget.querySelectorAll('.question-group').length | ||
| this.increment_ids(fields, labels, nextId) | ||
| this.placeholderTarget.appendChild(newGroup) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,7 +41,9 @@ def form_filler | |
| { | ||
| 'Greenhouse' => check_which_greenhouse, | ||
| 'AshbyHQ' => AshbyFormFiller, | ||
| 'DevITJobs' => DevitFormFiller | ||
| 'BambooHR' => BambooFormFiller, | ||
| 'DevITJobs' => DevitFormFiller, | ||
| 'Workable' => WorkableFormFiller | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to work out how best to route this in due course |
||
| } | ||
| end | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come you've set it up like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An application form has several attachments now ... and the number will probably grow.
I need to be able to retrieve that specific attachment.
I need the question as a parameter to be able to do so.