fix mobile search tags

This commit is contained in:
movilla 2013-08-12 16:01:26 +02:00
parent a5d7340129
commit 152c08963a
5 changed files with 22 additions and 2 deletions

View file

@ -34,6 +34,7 @@
* Descending text is no longer cut off in orange welcome banner [#4377](https://github.com/diaspora/diaspora/issues/4377)
* Adjust Facebook character limit to reality [#4380](https://github.com/diaspora/diaspora/issues/4380)
* Restore truncated URLs when posting to Twitter [#4211](https://github.com/diaspora/diaspora/issues/4211)
* Fix mobile search tags [#4392](https://github.com/diaspora/diaspora/issues/4392)
## Features
* Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)

View file

@ -6,7 +6,7 @@ class SearchController < ApplicationController
if search_query.length > 1
respond_to do |format|
format.json {redirect_to tags_path(:q => search_query.delete("#."))}
format.html {redirect_to tag_path(:name => search_query.delete("#."))}
format.any {redirect_to tag_path(:name => search_query.delete("#."))}
end
else
flash[:error] = I18n.t('tags.show.none', :name => search_query)

View file

@ -6,7 +6,7 @@
= t('search')
.search-mobile
= form_tag(people_path, :method => 'get') do
= form_tag(search_path, :method => 'get') do
%div{:data => {:role => 'fieldcontain', :inline => 'true'}}
= search_field_tag :q, nil, :placeholder => t('find_people'), :class => 'search'
= submit_tag t('search'), 'data-inline' => 'true', :class => 'btn'

View file

@ -21,3 +21,7 @@ end
When /^I visit the mobile getting started page$/ do
visit('/getting_started.mobile')
end
When /^I visit the mobile search page$/ do
visit('/people.mobile')
end

View file

@ -0,0 +1,15 @@
@javascript
Feature: Interacting with tags
Background:
Given a user with username "alice"
And "alice@alice.alice" has a public post with text "Hello! i am #newhere"
When I sign in as "alice@alice.alice"
And I toggle the mobile view
Scenario: Searching for a tag
When I visit the mobile search page
And I fill in the following:
| q | #newhere |
And I press "Search"
Then I should see "#newhere" within ".ltr"