Browse Source

Button text

pull/680/head
baarkerlounger 3 years ago
parent
commit
8bdeafe2d6
  1. 2
      app/views/organisations/logs.html.erb
  2. 6
      spec/features/organisation_spec.rb

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

@ -13,7 +13,7 @@
<div class="app-filter-layout" data-controller="filter-layout">
<div class="govuk-button-group app-filter-toggle">
<%= govuk_button_to "Create a new lettings log for #{@organisation.name}", case_logs_path(case_log: { owning_organisation_id: @organisation.id }, method: :post) %>
<%= govuk_button_to "Create a new lettings log for this organisation", case_logs_path(case_log: { owning_organisation_id: @organisation.id }, method: :post) %>
</div>
<%= render partial: "case_logs/log_filters" %>

6
spec/features/organisation_spec.rb

@ -112,12 +112,12 @@ RSpec.describe "User Features" do
end
it "shows a create button for that organisation" do
expect(page).to have_button("Create a new lettings log for #{org_name}")
expect(page).to have_button("Create a new lettings log for this organisation")
end
context "when creating a log for that organisation" do
it "pre-fills the value for owning organisation for that log" do
click_button("Create a new lettings log for #{org_name}")
click_button("Create a new lettings log for this organisation")
click_link("Set up this lettings log")
expect(page).to have_content(org_name)
end
@ -201,7 +201,7 @@ RSpec.describe "User Features" do
end
end
it "shows submenu for selected orgnisation" do
it "shows submenu for selected organisation" do
expect(page).to have_css('[aria-current="page"]', text: "Users")
expect(page).to have_current_path("/organisations/#{org_id}/users")
expect(page).to have_link("Logs")

Loading…
Cancel
Save