diff --git a/app/views/schemes/_scheme_list.html.erb b/app/views/schemes/_scheme_list.html.erb index c0a640103..6f4445164 100644 --- a/app/views/schemes/_scheme_list.html.erb +++ b/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 %> diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index 1b5a187fd..ff935a0e0 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/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