Skip to content

Commit

Permalink
Show the link to remove all filters when sorting by traffic
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyd committed May 6, 2014
1 parent 5677432 commit a9f29a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/mappings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions features/mapping_priority.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions features/step_definitions/mappings_interaction_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,7 @@
click_button 'Filter'
end
end

When(/^I remove all sorting and filtering$/) do
find(:css, ".remove-filters").click
end

0 comments on commit a9f29a8

Please sign in to comment.