Browse Source

uniform partials

pull/608/head
JG 3 years ago
parent
commit
e167e5863d
  1. 2
      app/frontend/styles/_table-group.scss
  2. 2
      app/views/organisations/_organisation_list.html.erb
  3. 2
      app/views/users/_user_list.html.erb
  4. 4
      spec/features/log_spec.rb

2
app/frontend/styles/_table-group.scss

@ -2,7 +2,7 @@
overflow-x: auto; overflow-x: auto;
overflow-y: hidden; overflow-y: hidden;
margin: govuk-spacing(-3) govuk-spacing(-3) govuk-spacing(3); margin: govuk-spacing(-3) govuk-spacing(-3) govuk-spacing(3);
padding: govuk-spacing(1) govuk-spacing(3); padding: govuk-spacing(3) govuk-spacing(3);
scrollbar-color: $govuk-text-colour govuk-colour("light-grey"); scrollbar-color: $govuk-text-colour govuk-colour("light-grey");
.govuk-table { .govuk-table {

2
app/views/organisations/_organisation_list.html.erb

@ -1,3 +1,4 @@
<section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>">
<%= govuk_table do |table| %> <%= govuk_table do |table| %>
<%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<% if searched.present? %> <% if searched.present? %>
@ -33,3 +34,4 @@
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
</section>

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

@ -1,3 +1,4 @@
<section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>">
<%= govuk_table do |table| %> <%= govuk_table do |table| %>
<%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<span class="govuk-!-margin-right-4"> <span class="govuk-!-margin-right-4">
@ -52,3 +53,4 @@
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
</section>

4
spec/features/log_spec.rb

@ -17,13 +17,13 @@ RSpec.describe "Log Features" do
context "when I search for a specific log" do context "when I search for a specific log" do
it "there is a search bar with a message and search button for logs" do it "there is a search bar with a message and search button for logs" do
expect(page).to have_field("search-field") expect(page).to have_field("search")
expect(page).to have_content("Search by log ID, tenant code, property reference or postcode") expect(page).to have_content("Search by log ID, tenant code, property reference or postcode")
expect(page).to have_button("Search") expect(page).to have_button("Search")
end end
it "displays log matching the log ID" do it "displays log matching the log ID" do
fill_in("search-field", with: log_to_search.id) fill_in("search", with: log_to_search.id)
click_button("Search") click_button("Search")
expect(page).to have_content(log_to_search.id) expect(page).to have_content(log_to_search.id)
expect(page).not_to have_content(same_organisation_log.id) expect(page).not_to have_content(same_organisation_log.id)

Loading…
Cancel
Save