-
Notifications
You must be signed in to change notification settings - Fork 9
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
Skip school selection in CourseSelection based on Provider#selectable_school
#9758
Skip school selection in CourseSelection based on Provider#selectable_school
#9758
Conversation
def6227
to
03a17f9
Compare
classes_without_edit = [DuplicateCourseSelectionStep, FullCourseSelectionStep, ClosedCourseSelectionStep] | ||
return next_step_path(next_step_klass) if classes_without_edit.include?(next_step_klass) |
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.
This is a bug fix.
We get silent exception.
When we try to instantiate the next step and call next_step
on that (to know if there is a next step) we get errors about the params required to create the next - next step.
This was originally designed to avoid having to list all the steps we know do not have a next step.
We now revert to doing that out of necessity. Description added to the commit message also.
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.
Ideally "terminal" or "editable" steps should have a property so we can identify them.
class ThingStep < DfE::Wizard::Step
def self.terminal
true
end
...
return next_step_path(next_step_klass) unless next_step_klass.terminal?
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 try to read and read and I don't understand to be fair. 🤔
Let's huddle in the afternoon?
03a17f9
to
fefade0
Compare
You have one or more flakey tests on this branch! ❄️ ❄️ ❄️Failed 1 out of 3 times at ./spec/system/provider_interface/change_existing_offer_ske_standard_flow_spec.rb:28: |
fefade0
to
09d9273
Compare
2e6cbbb
to
9416059
Compare
9416059
to
63eb509
Compare
a52d2f1
to
3fab9c5
Compare
The next_edit_step_path does not exist for steps that are not editable. When we need to generate a path for a non-editable step when we are in the process of editing a course, we need to return the show action rather than the edit action. The previous implementation of this tried to detect if the next step had an edit page by instantiating the next step and calling `next_step` on that. This introduced a bug, because calling `next_step` required all the steps parameters to be present and we cannot reliably provide those in the absence of candidate input. This appears to be the best way to check the conditions above for now.
Providers will have the attribute `selectable_school`. If this is true, we will show the Candidate the School Placement (course_site_step) in the Course Selection wizard. If it's false, we will select a site for the application automatically.
We test the case where the course has multiple sites but the provider is selectable school false. Test for courses with and without multiple study modes.
3fab9c5
to
03e61b6
Compare
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.
Tested this on review, works as expected. Thanks for the video, that helped 👍🏻
You have one or more flakey tests on this branch! ❄️ ❄️ ❄️Failed 1 out of 3 times at ./spec/system/candidate_interface/carry_over/candidate_carries_over_after_rejecting_offer_between_cycles_spec.rb:6: |
2b54ab0
to
dd18845
Compare
You have one or more flakey tests on this branch! ❄️ ❄️ ❄️Failed 1 out of 3 times at ./spec/system/candidate_interface/course_selection/candidate_deletes_application_spec.rb:6: |
Context
Starting in the 2025 Recruitment Cycle we will be hiding the
CourseSiteStep
(picking a placement school) in theCourseSelectionWizard
for certain providers.For these providers' courses, we will automatically choose a placement school. This happens already if the provider has only one placement school.
We will also hide the Location row of the Application Review component if we have automatically selected a School.
Changes proposed in this pull request
selectable_school
.ApplicationChoice#school_placement_auto_selected
for applications to providers that haveselectable_school
set to false.Guidance to review
Selectable school factory defaults
Q: Should factories reflect the most common conditions or the most complex conditions by default?
For example, adding selectable_school to Provider.
In production the default will be false.
99%+ providers will have this as false.
This makes the Course selection journey simpler. But it also means we have to set selectable_school to true if we want to test existing examples.
Would you set the factory by default to true or false
Whats the best way to clean up the recruitment cycle check for enabling the feature?
Testing
The environment is already set up to after apply opens in 2025.
true
false
Video
As described above, Harris is
selectable_school
true
and Keele isselectable_school
false
selectable_school-2025.webm
Things to check