Browse Source

shows incomplete tag if the scheme is not confirmed

pull/784/head
Kat 3 years ago
parent
commit
2a969dfe63
  1. 2
      app/views/schemes/_scheme_list.html.erb
  2. 6
      spec/requests/schemes_controller_spec.rb

2
app/views/schemes/_scheme_list.html.erb

@ -29,7 +29,7 @@
<% row.cell(text: simple_format(scheme_cell(scheme), { class: "govuk-!-font-weight-bold" }, wrapper_tag: "div")) %>
<% row.cell(text: scheme.locations&.count) %>
<% row.cell(text: scheme.managing_organisation&.name) %>
<% row.cell(text: scheme.created_at.to_formatted_s(:govuk_date)) %>
<% row.cell(text: scheme.confirmed? ? scheme.created_at.to_formatted_s(:govuk_date) : govuk_tag(colour: "grey",text: "Incomplete")) %>
<% end %>
<% end %>
<% end %>

6
spec/requests/schemes_controller_spec.rb

@ -68,6 +68,12 @@ RSpec.describe SchemesController, type: :request do
end
end
it "shows incomplete tag if the scheme is not confirmed" do
schemes[0].update!(confirmed: nil)
get "/schemes"
assert_select ".govuk-tag", text: /Incomplete/, count: 1
end
it "shows a search bar" do
expect(page).to have_field("search", type: "search")
end

Loading…
Cancel
Save