Skip to content

Commit

Permalink
Fix failing features
Browse files Browse the repository at this point in the history
We now have two 'Path' links within .filters, so we need to disambiguate
them in the step definition.
  • Loading branch information
jennyd committed May 6, 2014
1 parent 801ab87 commit 5677432
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/mappings/filter/_by_path_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<li class="if-no-js-hide">
<li class="if-no-js-hide filter-by-path">
<% if @path_contains.present? %>
<%= filter_remove_option_link(@site, 'Path', :path_contains) %>
<% else %>
Expand Down
6 changes: 4 additions & 2 deletions features/step_definitions/mappings_interaction_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
end

When(/^I open the "(.*)" filter and filter by "(.*)"$/) do |filter_type, value|
within '.filters' do
within ".filters#{ ' .filter-by-path' if filter_type == 'Path' }" do
click_link filter_type
fill_in filter_type, with: value
click_button 'Filter'
Expand All @@ -84,7 +84,9 @@
end

When(/^I remove the filter "(.*?)"$/) do |filter_type|
click_link filter_type
within ".filters#{ ' .filter-by-path' if filter_type == 'Path' }" do
click_link filter_type
end
end

When(/^I click the tag filter "(.*?)"$/) do |tag_filter|
Expand Down

0 comments on commit 5677432

Please sign in to comment.