-
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
base: main
Are you sure you want to change the base?
Conversation
Ches-ctrl
left a comment
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.
1st Review
| queue: updates | ||
| devitjobs_updater: | ||
| enabled: <%= Rails.env.production? %> # production only as it interferes with end-to-end testing | ||
| devitjobs_updater: # off temporarily as interferes with end-to-end testing |
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 so?
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.
Can you explain why this interferes and revert this in due course
config/sidekiq.yml
Outdated
| cron: '0 2 * * *' # Runs once per day (at 2 am) | ||
| class: Importer::Api::DevitJobsJob | ||
| queue: updates | ||
| enabled: <%= Rails.env.production? %> # production only as it interferes with end-to-end testing |
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.
Similarly - why?
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.
FormFiller runs as a background job. Can't run if there's three hundred background jobs already in the queue. Also it's just annoying in development to have the database constantly being filled with jobs I didn't seed.
lib/tasks/testing.rake
Outdated
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.
Interesting approach - can we add some comments for how this should work
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.
Thank you! This is exactly what I want
|
|
||
| RSpec.feature 'ApplyToJob', type: :feature, apply_to_job: true do | ||
| before do | ||
| skip 'No URL available to test' if ENV['URL_FOR_TESTING'].nil? |
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.
Why do we put the url for testing in the ENV file? Seems like an odd place to store 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.
It's temporary memory, not permanent storage. To my knowledge, it's the best way to pass a variable from a rake task to an rspec file.
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 does this work?
Ches-ctrl
left a comment
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.
2nd Review
| return photo if question.photo? | ||
| return cover_letter if question.cover_letter? | ||
|
|
||
| resume |
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.
| # Returns true if no such question is found, indicating the user can apply with Cheddar. | ||
| def apply_with_cheddar | ||
| return false unless form_structure.dig(:core_questions, :questions) | ||
| return false unless form_structure.dig('core_questions', 'questions') |
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.
Why are we accessing off strings rather than symbols now? What is the rule we're applying in general?
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.
I don't know. I think i am loosing sym while saving into the database. It is fix because we are in a sprint.
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.
What is this file doing?
| }, | ||
| { | ||
| "attribute": "where_are_you_based_or_where_would_you_be_planning_on_workin", | ||
| "attribute": "where-are-you-based-or-where-would-you-be-planning-on-workin", |
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.
Why hyphen rather than underscore?
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.
Quick fix yesterday. I need to correct it.
| def complete_date_fields | ||
| puts "Completing datepicker fields..." | ||
| all('input[type="date"]').each do |field| | ||
| field.set((Date.today + 14).strftime('%d/%m/%Y')) |
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.
Incorrect date format for HTML5 date input. The code sets the date in '%d/%m/%Y' format, but HTML5 date inputs require 'YYYY-MM-DD' format. This will cause the date to be invalid or not set correctly in the input field.
| field.set((Date.today + 14).strftime('%d/%m/%Y')) | |
| field.set((Date.today + 14).strftime('%Y-%m-%d')) |
React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)
|
😱 Found 1 issue. Time to roll up your sleeves! 😱 Need help? Join our Discord for support! |
No description provided.