Add labels to the search form in the management area
The text for the unfeasible checkbox wasn't correctly defined as a label, while the fields to search investments and select the heading weren't intuitive since their purpose wasn't obvious.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe Management::Budgets::Investments::SearchComponent do
|
||||
include Rails.application.routes.url_helpers
|
||||
|
||||
let(:budget) { create(:budget) }
|
||||
let(:url) { management_budget_investments_path(budget) }
|
||||
let(:component) { Management::Budgets::Investments::SearchComponent.new(budget, url: url) }
|
||||
|
||||
it "renders a label for each field" do
|
||||
render_inline component
|
||||
|
||||
expect(page).to have_field "Search investments"
|
||||
expect(page).to have_select "Heading"
|
||||
expect(page).to have_field "Search unfeasible", type: :checkbox
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user