diff --git a/app/controllers/mappings_controller.rb b/app/controllers/mappings_controller.rb index 650ed016b..253412a07 100644 --- a/app/controllers/mappings_controller.rb +++ b/app/controllers/mappings_controller.rb @@ -101,6 +101,7 @@ def index end if params[:sort] == 'by_traffic' + @filtered = true @sorted_by_traffic = true @mappings = @mappings.with_traffic_summary.order('hit_count DESC') end diff --git a/features/mapping_priority.feature b/features/mapping_priority.feature index 3a74a5ee4..162b8faff 100644 --- a/features/mapping_priority.feature +++ b/features/mapping_priority.feature @@ -21,3 +21,5 @@ Feature: Mappings priority Then I should see a column with traffic information And the cells should have hit counts And the cells should have percentages + When I remove all sorting and filtering + Then I should not see a column with traffic information diff --git a/features/step_definitions/mappings_interaction_steps.rb b/features/step_definitions/mappings_interaction_steps.rb index 51fb2e084..7c628a73d 100644 --- a/features/step_definitions/mappings_interaction_steps.rb +++ b/features/step_definitions/mappings_interaction_steps.rb @@ -187,3 +187,7 @@ click_button 'Filter' end end + +When(/^I remove all sorting and filtering$/) do + find(:css, ".remove-filters").click +end