File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,9 +134,9 @@ def validate_batches_or_samples_for_purpose
134134 when "LOD" , "Other"
135135 @box . errors . add ( :base , "A batch is required" ) unless unique_batch_count >= 1
136136 when "Variants"
137- @box . errors . add ( :base , "You must select at least two batches" ) unless unique_batch_count >= 2
137+ @box . errors . add ( :base , "You must select at least two different batches" ) unless unique_batch_count >= 2
138138 when "Challenge"
139- @box . errors . add ( :base , "A virus batch is required " ) unless have_virus_batch?
139+ @box . errors . add ( :base , "You must select at least one non-distractor batch " ) unless have_virus_batch?
140140 @box . errors . add ( :base , "You must select at least one distractor batch" ) unless have_distractor_batch?
141141 end
142142 when "add_samples"
@@ -147,7 +147,7 @@ def validate_batches_or_samples_for_purpose
147147 else
148148 case @box . purpose
149149 when "Variants"
150- @box . errors . add ( :base , "You must select samples coming from at least two batches" ) unless samples_unique_batch_count >= 2
150+ @box . errors . add ( :base , "You must select samples coming from at least two different batches" ) unless samples_unique_batch_count >= 2
151151 when "Challenge"
152152 @box . errors . add ( :base , "You must select at least one non-distractor sample" ) unless have_virus_sample?
153153 @box . errors . add ( :base , "You must select at least one distractor sample" ) unless have_distractor_sample?
Original file line number Diff line number Diff line change 136136 end
137137
138138 expect_page CreateBoxPage do |form |
139- expect ( form . errors ) . to have_text ( "You must select at least two batches" )
139+ expect ( form . errors ) . to have_text ( "You must select at least two different batches" )
140140 expect ( form . purpose_field . value ) . to eq ( "Variants" )
141141 expect ( form . media_field . value ) . to eq ( media )
142142 expect ( form . batch_summaries . size ) . to eq ( 2 )
205205 end
206206
207207 expect_page CreateBoxPage do |form |
208- expect ( form . errors ) . to have_text ( "A virus batch is required " )
208+ expect ( form . errors ) . to have_text ( "You must select at least one non-distractor batch " )
209209 expect ( form . purpose_field . value ) . to eq ( "Challenge" )
210210 expect ( form . batch_summaries . size ) . to eq ( 2 )
211211
374374 end
375375
376376 expect_page CreateBoxPage do |form |
377- expect ( form . errors ) . to have_text ( "You must select samples coming from at least two batches" )
377+ expect ( form . errors ) . to have_text ( "You must select samples coming from at least two different batches" )
378378 expect ( form . purpose_field . value ) . to eq ( "Variants" )
379379 expect ( form . media_field . value ) . to eq ( media )
380380 end
You can’t perform that action at this time.
0 commit comments