Browse Source

Merge pull request #523 from communitiesuk/style-table-items

Make names bold in users table
pull/525/head
Paul Robert Lloyd 3 years ago committed by GitHub
parent
commit
f9c6a6b076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/helpers/tab_nav_helper.rb
  2. 2
      spec/helpers/tab_nav_helper_spec.rb

2
app/helpers/tab_nav_helper.rb

@ -2,7 +2,7 @@ module TabNavHelper
include GovukLinkHelper
def user_cell(user)
[govuk_link_to(user.name, user), user.email].join("\n")
[govuk_link_to(user.name, user, class: "govuk-!-font-weight-bold"), user.email].join("\n")
end
def org_cell(user)

2
spec/helpers/tab_nav_helper_spec.rb

@ -6,7 +6,7 @@ RSpec.describe TabNavHelper do
describe "#user_cell" do
it "returns user link and email separated by a newline character" do
expected_html = "<a class=\"govuk-link\" href=\"/users\">Danny Rojas</a>\n#{user.email}"
expected_html = "<a class=\"govuk-link govuk-!-font-weight-bold\" href=\"/users\">Danny Rojas</a>\n#{user.email}"
expect(user_cell(user)).to match(expected_html)
end
end

Loading…
Cancel
Save