DC DG fix search cucumber step
This commit is contained in:
parent
3db0cd3776
commit
c3ea1dfc6e
2 changed files with 3 additions and 7 deletions
|
|
@ -22,7 +22,7 @@ class PeopleController < ApplicationController
|
|||
if params[:q][0] == 35 || params[:q][0] == '#'
|
||||
if params[:q].length > 1
|
||||
tag_name = params[:q].gsub(/[#\.]/, '')
|
||||
redirect_to tags_path(:q => params[:q])
|
||||
redirect_to tag_path(:name => tag_name, :q => params[:q])
|
||||
return
|
||||
else
|
||||
flash[:error] = I18n.t('tags.show.none', :name => params[:q])
|
||||
|
|
|
|||
|
|
@ -148,12 +148,8 @@ Then /^I should get download alert$/ do
|
|||
end
|
||||
|
||||
When /^I search for "([^\"]*)"$/ do |search_term|
|
||||
step "I fill in \"q\" with \"#{search_term}\""
|
||||
page.execute_script <<-JS
|
||||
var e = jQuery.Event("keypress");
|
||||
e.keyCode = 13;
|
||||
$("#q").trigger(e);
|
||||
JS
|
||||
fill_in "q", :with => search_term
|
||||
find_field("q").native.send_key(:enter)
|
||||
end
|
||||
|
||||
Then /^the "([^"]*)" field(?: within "([^"]*)")? should be filled with "([^"]*)"$/ do |field, selector, value|
|
||||
|
|
|
|||
Loading…
Reference in a new issue