Skip to content

Commit

Permalink
Remove intervention_type_search feature flag (#4206)
Browse files Browse the repository at this point in the history
  • Loading branch information
urbanwide authored Jan 29, 2025
1 parent 1cc381c commit e568483
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
8 changes: 3 additions & 5 deletions app/views/intervention_type_groups/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
<div class="col">
<div class="d-flex justify-content-between align-items-center">
<h1><%= t('intervention_type_groups.index.explore_energy_saving_actions') %></h1>
<% if EnergySparks::FeatureFlags.active?(:intervention_type_search) %>
<%= link_to t('intervention_type_groups.index.search'),
search_intervention_types_path,
class: 'btn btn-default' %>
<% end %>
<%= link_to t('intervention_type_groups.index.search'),
search_intervention_types_path,
class: 'btn btn-default' %>
</div>
</div>
</div>
Expand Down
17 changes: 4 additions & 13 deletions spec/system/intervention_types_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,11 @@
let!(:intervention_type_2) { create(:intervention_type, name: 'bar', description: 'second intervention') }

it 'links from intervention groups page and shows empty page' do
ClimateControl.modify FEATURE_FLAG_INTERVENTION_TYPE_SEARCH: 'true' do
visit intervention_type_groups_path
click_on 'Search'

expect(page).to have_content('Find actions')
expect(page).not_to have_content('No results found')
end
end
visit intervention_type_groups_path
click_on 'Search'

it 'link is feature flag controlled' do
ClimateControl.modify FEATURE_FLAG_INTERVENTION_TYPE_SEARCH: 'false' do
visit intervention_type_groups_path
expect(page).not_to have_link('Search')
end
expect(page).to have_content('Find actions')
expect(page).not_to have_content('No results found')
end

it 'links to intervention categories page' do
Expand Down

0 comments on commit e568483

Please sign in to comment.