Skip to content

Commit

Permalink
Merge pull request #9581 from alphagov/content-modelling/656-tweak-nu…
Browse files Browse the repository at this point in the history
…mber-presentation

(656) Change number presentation
  • Loading branch information
pezholio authored Nov 5, 2024
2 parents 8ca6529 + 1846ed6 commit d1fe5e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def rows
text: content_item.document_type.humanize,
},
{
text: content_item.unique_pageviews ? number_to_human(content_item.unique_pageviews) : nil,
text: content_item.unique_pageviews ? number_to_human(content_item.unique_pageviews, format: "%n%u", precision: 3, significant: true, units: { thousand: "k", million: "m", billion: "b" }) : nil,
},
{
text: organisation_link(content_item),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def self.it_returns_unknown_user

assert_selector "tbody .govuk-table__cell", text: host_content_item.title
assert_selector "tbody .govuk-table__cell", text: host_content_item.document_type.humanize
assert_selector "tbody .govuk-table__cell", text: "1.2 Million"
assert_selector "tbody .govuk-table__cell", text: "1.2m"
assert_selector "tbody .govuk-table__cell", text: host_content_item.publishing_organisation["title"]
assert_selector "tbody .govuk-table__cell", text: "#{time_ago_in_words(host_content_item.last_edited_at)} ago by #{user.name}"
assert_link user.name, { href: "mailto:#{user.email}" }
Expand Down

0 comments on commit d1fe5e2

Please sign in to comment.