Browse Source

fixed hidde3n field view

pull/627/head
JG 3 years ago
parent
commit
ecaf27671e
  1. 2
      app/views/layouts/_footer.html.erb
  2. 3
      app/views/users/_user_list.html.erb
  3. 7
      spec/requests/organisations_controller_spec.rb

2
app/views/layouts/_footer.html.erb

@ -29,7 +29,7 @@
</div>
</div>
<h2 class="govuk-visually-hidden"> Users</h2>
<h2 class="govuk-visually-hidden">Helpful links<spec/requests/organisations_controller_spec.rb/h2>
<ul class="govuk-footer__inline-list govuk-!-margin-top-6 govuk-!-margin-bottom-0">
<li class="govuk-footer__inline-list-item">
<%= govuk_link_to("Privacy notice", privacy_notice_path, class: "govuk-footer__link") %>

3
app/views/users/_user_list.html.erb

@ -49,6 +49,9 @@
<% end %>
<% row.cell(text: simple_format(org_cell(user), {}, wrapper_tag: "div")) %>
<% row.cell(text: user.active? ? user.last_sign_in_at&.to_formatted_s(:govuk_date) : "Deactivated") %>
<%= govuk_link_to users_path(user) do %>
<span class="govuk-visually-hidden">User </span><%= user.id %>
<% end %>
<% end %>
<% end %>
<% end %>

7
spec/requests/organisations_controller_spec.rb

@ -131,12 +131,9 @@ RSpec.describe OrganisationsController, type: :request do
expect(response.body).to include(user.email)
end
it "has a hidden header title" do
expected_html = "<h2 class=\"govuk-visually-hidden\"> Users"
expect(response.body).to include(expected_html)
end
it "shows only active users in the current user's organisation" do
expected_case_row_log = "<span class=\"govuk-visually-hidden\">User </span>#{user.id}"
unauthorized_case_row_log = "<span class=\"govuk-visually-hidden\">User </span>#{other_org_user.id}"
expect(page).to have_content(user.name)
expect(page).to have_content(other_user.name)
expect(page).to have_content(inactive_user.name)

Loading…
Cancel
Save