Skip to content

Commit

Permalink
Implement pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
hunchr committed Aug 21, 2024
1 parent 6841a01 commit cd5ff6f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/helpers/sac_cas/people_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def format_data_quality_icons(status)
warning: "exclamation-triangle",
error: "times-circle"
}
icon(icons[status.to_sym], title: I18n.t("people.data_quality.#{status}"))
icon_name = icons[status.to_sym]
icon(icon_name, title: I18n.t("people.data_quality.#{status}"))
end
end
11 changes: 9 additions & 2 deletions spec/features/people/list_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,17 @@
end

it "allows showing the data_quality column" do
group.people.first.update! data_quality: "info"
group.people.second.update! data_quality: "warning"
group.people.third.update! data_quality: "error"

visit group_people_path(group_id: group.id)
click_link("Spalten")
check("Datenqualität")
click_link("Spalten")
expect(page).to have_css('td[data-attribute-name="data_quality"]')

expect(page).to have_css("td[data-attribute-name=data_quality] .fas.fa-check-circle")
expect(page).to have_css("td[data-attribute-name=data_quality] .fas.fa-info-circle")
expect(page).to have_css("td[data-attribute-name=data_quality] .fas.fa-exclamation-triangle")
expect(page).to have_css("td[data-attribute-name=data_quality] .fas.fa-times-circle")
end
end

0 comments on commit cd5ff6f

Please sign in to comment.