Files
grecia/spec/components/management/budgets/investments/search_component_spec.rb
Javi Martín 1cefc040a7 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.
2024-11-11 15:04:35 +01:00

18 lines
565 B
Ruby

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