Skip to content
Extraits de code Groupes Projets
Valider 152c0896 rédigé par movilla's avatar movilla
Parcourir les fichiers

fix mobile search tags

parent a5d73401
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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)
......
......@@ -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)
......
......@@ -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'
......
......@@ -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
@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"
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter