File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ def call
15
15
16
16
submit_application_form
17
17
18
+ if application_form . reload . assessment . prioritisation_checks_incomplete?
19
+ return application_form
20
+ end
18
21
return application_form unless params . pre_assess?
19
22
20
23
if application_form . requires_preliminary_check
@@ -114,6 +117,10 @@ def create_application_form
114
117
traits << :with_work_history
115
118
end
116
119
120
+ unless params . prioritisation_check?
121
+ traits << :with_other_england_work_history
122
+ end
123
+
117
124
if region . status_check_written? || region . sanction_check_written?
118
125
traits << :with_written_statement
119
126
end
@@ -126,6 +133,7 @@ def create_application_form
126
133
FactoryBot . create (
127
134
:application_form ,
128
135
*traits ,
136
+ includes_prioritisation_features : true ,
129
137
created_at : date_generator . date ,
130
138
region :,
131
139
)
Original file line number Diff line number Diff line change 3
3
class FakeData ::ApplicationFormParameters
4
4
def initialize (
5
5
submitted : false ,
6
+ prioritisation_check : false ,
6
7
pre_assessment : false ,
7
8
assessment : false ,
8
9
further_information : false ,
@@ -15,6 +16,7 @@ def initialize(
15
16
declined : false
16
17
)
17
18
@submitted = submitted
19
+ @prioritisation_check = prioritisation_check
18
20
@pre_assessment = pre_assessment
19
21
@assessment = assessment
20
22
@further_information = further_information
@@ -34,6 +36,10 @@ def submit?
34
36
@verification || @review || @awarded || @declined
35
37
end
36
38
39
+ def prioritisation_check?
40
+ @prioritisation_check
41
+ end
42
+
37
43
def pre_assess?
38
44
@pre_assessment || @assessment || @further_information || @verification ||
39
45
@review || @awarded || @declined
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ namespace :fake_data do
53
53
ReferenceRequest . delete_all
54
54
SelectedFailureReason . delete_all
55
55
AssessmentSection . delete_all
56
+ PrioritisationReferenceRequest . delete_all
57
+ PrioritisationWorkHistoryCheck . delete_all
56
58
Assessment . delete_all
57
59
Qualification . delete_all
58
60
WorkHistory . delete_all
@@ -78,6 +80,10 @@ def application_form_params_for_region(region)
78
80
]
79
81
end
80
82
83
+ unless region . application_form_skip_work_history
84
+ params += [ { prioritisation_check : true } ]
85
+ end
86
+
81
87
if rand ( 5 ) . zero?
82
88
params += [
83
89
{ further_information : true } ,
You can’t perform that action at this time.
0 commit comments