Files
grecia/spec/components/admin/stats/event_links_component_spec.rb
Javi Martín d25f2e7259 Add missing event name translations
We were always displaying the event names in English.

Note we're changing the `user_supported_budgets` key because it didn't
make much sense; the investments are supported, and not the budgets.

We're also adding "created" to most of the event names in order to make
the texts more explicit, since not all the events refer to created data.
2024-05-09 14:28:32 +02:00

18 lines
536 B
Ruby

require "rails_helper"
describe Admin::Stats::EventLinksComponent do
it "renders an <h2> heading followed by a list of links" do
render_inline Admin::Stats::EventLinksComponent.new(
%w[legislation_annotation_created legislation_answer_created]
)
expect(page).to have_css "h2", exact_text: "Graphs"
expect(page).to have_link count: 2
page.find("ul") do |list|
expect(list).to have_link "Legislation annotations created"
expect(list).to have_link "Legislation answers created"
end
end
end