ECP-206 Delete the 3 info boxes for each sub-category on the Browse page

This commit is contained in:
rebuilt 2025-10-30 13:32:39 -07:00
parent aa39303dfc
commit b6675c2516
15 changed files with 43 additions and 63 deletions

View file

@ -462,7 +462,7 @@ RSpec.describe SurveyItemValues, type: :model do
it "returns an unknown race" do
row = {"Race-1" => ""}
row.keys.each do |key|
row.each_key do |key|
headers << key
end
@ -475,7 +475,7 @@ RSpec.describe SurveyItemValues, type: :model do
it "returns an unknown race" do
row = {"Race-1" => "99", "Race-2" => "99", "Race-3" => "", "Race-4" => "nil"}
row.keys.each do |key|
row.each_key do |key|
headers << key
end
@ -488,15 +488,15 @@ RSpec.describe SurveyItemValues, type: :model do
context "for defined races" do
it "returns the qualtrics code of that race" do
[1,2,3,4,5,8].each do |i|
row = {"Race-1" => "#{i}"}
[1, 2, 3, 4, 5, 8].each do |i|
row = {"Race-1" => i.to_s}
row.keys.each do |key|
headers << key
end
row.each_key do |key|
headers << key
end
values = SurveyItemValues.new(row:, headers:, survey_items:, schools:, academic_years:)
expect(values.races_of_children).to eq [i]
values = SurveyItemValues.new(row:, headers:, survey_items:, schools:, academic_years:)
expect(values.races_of_children).to eq [i]
end
end
end
@ -506,7 +506,7 @@ RSpec.describe SurveyItemValues, type: :model do
row = {"Race-1" => "6"}
row.keys.each do |key|
row.each_key do |key|
headers << key
end
@ -515,7 +515,7 @@ RSpec.describe SurveyItemValues, type: :model do
row = {"Race-1" => "7"}
row.keys.each do |key|
row.each_key do |key|
headers << key
end
@ -530,14 +530,14 @@ RSpec.describe SurveyItemValues, type: :model do
context "when there is more than one race defined" do
it "returns the qualtrics code for the two races and the designation for multiracial(100)" do
row = {"Race-1" => "1", "Race-2" => "2","Race-3" => "3"}
row = {"Race-1" => "1", "Race-2" => "2", "Race-3" => "3"}
row.keys.each do |key|
headers << key
end
row.each_key do |key|
headers << key
end
values = SurveyItemValues.new(row:, headers:, survey_items:, schools:, academic_years:)
expect(values.races_of_children).to eq [1,2,3,100]
values = SurveyItemValues.new(row:, headers:, survey_items:, schools:, academic_years:)
expect(values.races_of_children).to eq [1, 2, 3, 100]
end
end

View file

@ -368,16 +368,16 @@ describe SurveyResponsesDataLoader do
it "returns -1 when any aspect of the data is unknown" do
score = SocioEconomicCalculator.socio_economic_score(Education.new(designation: "Associates Degree"), Benefit.new(designation: "Unknown"), [Employment.new(designation: "Two adults with full-time employment")])
expect(score).to eq -1
expect(score).to eq(-1)
score = SocioEconomicCalculator.socio_economic_score(Education.new(designation: "Associates Degree"), Benefit.new(designation: "No"), [Employment.new(designation: "Unknown")])
expect(score).to eq -1
expect(score).to eq(-1)
score = SocioEconomicCalculator.socio_economic_score(Education.new(designation: "Unknown"), Benefit.new(designation: "No"), [Employment.new(designation: "No full-time or part-time employment")])
expect(score).to eq -1
expect(score).to eq(-1)
score = SocioEconomicCalculator.socio_economic_score(Education.new(designation: "Unknown"), Benefit.new(designation: "No"), [])
expect(score).to eq -1
expect(score).to eq(-1)
end
end
end