<%= submit_tag t("admin.poll_officers.search.search"), class: "button" %>
diff --git a/app/views/moderation/users/index.html.erb b/app/views/moderation/users/index.html.erb
index c7fcf502b..06403279e 100644
--- a/app/views/moderation/users/index.html.erb
+++ b/app/views/moderation/users/index.html.erb
@@ -3,7 +3,7 @@
<%= form_for(User.new, url: moderation_users_path, as: :user, method: :get) do |f| %>
- <%= text_field_tag :name_or_email, "", placeholder: t("moderation.users.index.search_placeholder") %>
+ <%= text_field_tag :search, "", placeholder: t("moderation.users.index.search_placeholder") %>
<%= f.submit t("moderation.users.index.search"), class: "button success" %>
diff --git a/spec/controllers/moderation/users_controller_spec.rb b/spec/controllers/moderation/users_controller_spec.rb
index 424e41c8b..1699c9c4e 100644
--- a/spec/controllers/moderation/users_controller_spec.rb
+++ b/spec/controllers/moderation/users_controller_spec.rb
@@ -7,9 +7,9 @@ describe Moderation::UsersController do
it "keeps query parameters while using protected redirects" do
user = create(:user, email: "user@consul.dev")
- get :hide_in_moderation_screen, params: { id: user, name_or_email: "user@consul.dev", host: "evil.dev" }
+ get :hide_in_moderation_screen, params: { id: user, search: "user@consul.dev", host: "evil.dev" }
- expect(response).to redirect_to "/moderation/users?name_or_email=user%40consul.dev"
+ expect(response).to redirect_to "/moderation/users?search=user%40consul.dev"
end
end
end
diff --git a/spec/system/admin/activity_spec.rb b/spec/system/admin/activity_spec.rb
index d83c29d9f..0accba34a 100644
--- a/spec/system/admin/activity_spec.rb
+++ b/spec/system/admin/activity_spec.rb
@@ -223,7 +223,7 @@ describe "Admin activity" do
scenario "Shows moderation activity from moderation screen" do
user = create(:user)
- visit moderation_users_path(name_or_email: user.username)
+ visit moderation_users_path(search: user.username)
within("#moderation_users") do
click_link "Block"
diff --git a/spec/system/admin/administrators_spec.rb b/spec/system/admin/administrators_spec.rb
index 078e42635..c8da6fc80 100644
--- a/spec/system/admin/administrators_spec.rb
+++ b/spec/system/admin/administrators_spec.rb
@@ -19,7 +19,7 @@ describe "Admin administrators" do
end
scenario "Create Administrator", :js do
- fill_in "name_or_email", with: user.email
+ fill_in "search", with: user.email
click_button "Search"
expect(page).to have_content user.name
@@ -66,7 +66,7 @@ describe "Admin administrators" do
expect(page).to have_content(administrator1.name)
expect(page).to have_content(administrator2.name)
- fill_in "name_or_email", with: " "
+ fill_in "search", with: " "
click_button "Search"
expect(page).to have_content("Administrators: User search")
@@ -79,11 +79,11 @@ describe "Admin administrators" do
expect(page).to have_content(administrator1.name)
expect(page).to have_content(administrator2.name)
- fill_in "name_or_email", with: "Sumn"
+ fill_in "search", with: "Sumn"
click_button "Search"
expect(page).to have_content("Administrators: User search")
- expect(page).to have_field "name_or_email", with: "Sumn"
+ expect(page).to have_field "search", with: "Sumn"
expect(page).to have_content(administrator1.name)
expect(page).not_to have_content(administrator2.name)
end
@@ -92,11 +92,11 @@ describe "Admin administrators" do
expect(page).to have_content(administrator1.email)
expect(page).to have_content(administrator2.email)
- fill_in "name_or_email", with: administrator2.email
+ fill_in "search", with: administrator2.email
click_button "Search"
expect(page).to have_content("Administrators: User search")
- expect(page).to have_field "name_or_email", with: administrator2.email
+ expect(page).to have_field "search", with: administrator2.email
expect(page).to have_content(administrator2.email)
expect(page).not_to have_content(administrator1.email)
end
diff --git a/spec/system/admin/managers_spec.rb b/spec/system/admin/managers_spec.rb
index fd14946b5..6b46fa15e 100644
--- a/spec/system/admin/managers_spec.rb
+++ b/spec/system/admin/managers_spec.rb
@@ -15,7 +15,7 @@ describe "Admin managers", :admin do
end
scenario "Create Manager", :js do
- fill_in "name_or_email", with: user.email
+ fill_in "search", with: user.email
click_button "Search"
expect(page).to have_content user.name
@@ -47,7 +47,7 @@ describe "Admin managers", :admin do
expect(page).to have_content(manager1.name)
expect(page).to have_content(manager2.name)
- fill_in "name_or_email", with: " "
+ fill_in "search", with: " "
click_button "Search"
expect(page).to have_content("Managers: User search")
@@ -60,11 +60,11 @@ describe "Admin managers", :admin do
expect(page).to have_content(manager1.name)
expect(page).to have_content(manager2.name)
- fill_in "name_or_email", with: "Taylor"
+ fill_in "search", with: "Taylor"
click_button "Search"
expect(page).to have_content("Managers: User search")
- expect(page).to have_field "name_or_email", with: "Taylor"
+ expect(page).to have_field "search", with: "Taylor"
expect(page).to have_content(manager1.name)
expect(page).not_to have_content(manager2.name)
end
@@ -73,11 +73,11 @@ describe "Admin managers", :admin do
expect(page).to have_content(manager1.email)
expect(page).to have_content(manager2.email)
- fill_in "name_or_email", with: manager2.email
+ fill_in "search", with: manager2.email
click_button "Search"
expect(page).to have_content("Managers: User search")
- expect(page).to have_field "name_or_email", with: manager2.email
+ expect(page).to have_field "search", with: manager2.email
expect(page).to have_content(manager2.email)
expect(page).not_to have_content(manager1.email)
end
diff --git a/spec/system/admin/moderators_spec.rb b/spec/system/admin/moderators_spec.rb
index dd97a65fa..df1af19b4 100644
--- a/spec/system/admin/moderators_spec.rb
+++ b/spec/system/admin/moderators_spec.rb
@@ -15,7 +15,7 @@ describe "Admin moderators", :admin do
end
scenario "Create Moderator", :js do
- fill_in "name_or_email", with: user.email
+ fill_in "search", with: user.email
click_button "Search"
expect(page).to have_content user.name
@@ -47,7 +47,7 @@ describe "Admin moderators", :admin do
expect(page).to have_content(moderator1.name)
expect(page).to have_content(moderator2.name)
- fill_in "name_or_email", with: " "
+ fill_in "search", with: " "
click_button "Search"
expect(page).to have_content("Moderators: User search")
@@ -60,11 +60,11 @@ describe "Admin moderators", :admin do
expect(page).to have_content(moderator1.name)
expect(page).to have_content(moderator2.name)
- fill_in "name_or_email", with: "Eliz"
+ fill_in "search", with: "Eliz"
click_button "Search"
expect(page).to have_content("Moderators: User search")
- expect(page).to have_field "name_or_email", with: "Eliz"
+ expect(page).to have_field "search", with: "Eliz"
expect(page).to have_content(moderator1.name)
expect(page).not_to have_content(moderator2.name)
end
@@ -73,11 +73,11 @@ describe "Admin moderators", :admin do
expect(page).to have_content(moderator1.email)
expect(page).to have_content(moderator2.email)
- fill_in "name_or_email", with: moderator2.email
+ fill_in "search", with: moderator2.email
click_button "Search"
expect(page).to have_content("Moderators: User search")
- expect(page).to have_field "name_or_email", with: moderator2.email
+ expect(page).to have_field "search", with: moderator2.email
expect(page).to have_content(moderator2.email)
expect(page).not_to have_content(moderator1.email)
end
diff --git a/spec/system/admin/officials_spec.rb b/spec/system/admin/officials_spec.rb
index 2b1e18331..2cd86c085 100644
--- a/spec/system/admin/officials_spec.rb
+++ b/spec/system/admin/officials_spec.rb
@@ -38,7 +38,7 @@ describe "Admin officials", :admin do
scenario "Create an official" do
visit admin_officials_path
- fill_in "name_or_email", with: citizen.email
+ fill_in "search", with: citizen.email
click_button "Search"
expect(page).to have_current_path(search_admin_officials_path, ignore_query: true)
diff --git a/spec/system/admin/organizations_spec.rb b/spec/system/admin/organizations_spec.rb
index 86548e846..7f2d400df 100644
--- a/spec/system/admin/organizations_spec.rb
+++ b/spec/system/admin/organizations_spec.rb
@@ -36,7 +36,7 @@ describe "Admin::Organizations" do
visit admin_organizations_path
expect(page).to have_content("Get up, Stand up")
- fill_in "term", with: " "
+ fill_in "search", with: " "
click_button "Search"
expect(page).to have_current_path(search_admin_organizations_path, ignore_query: true)
@@ -49,7 +49,7 @@ describe "Admin::Organizations" do
visit search_admin_organizations_path
expect(page).not_to have_content("Get up, Stand up")
- fill_in "term", with: "Up, sta"
+ fill_in "search", with: "Up, sta"
click_button "Search"
within("#search-results") do
@@ -61,7 +61,7 @@ describe "Admin::Organizations" do
visit search_admin_organizations_path
expect(page).not_to have_content("Get up, Stand up")
- fill_in "term", with: user.email
+ fill_in "search", with: user.email
click_button "Search"
within("#search-results") do
@@ -73,7 +73,7 @@ describe "Admin::Organizations" do
visit search_admin_organizations_path
expect(page).not_to have_content("Get up, Stand up")
- fill_in "term", with: user.phone_number
+ fill_in "search", with: user.phone_number
click_button "Search"
within("#search-results") do
diff --git a/spec/system/admin/poll/officers_spec.rb b/spec/system/admin/poll/officers_spec.rb
index 51d2fd506..cf08b95a0 100644
--- a/spec/system/admin/poll/officers_spec.rb
+++ b/spec/system/admin/poll/officers_spec.rb
@@ -15,7 +15,7 @@ describe "Admin poll officers", :admin do
end
scenario "Create", :js do
- fill_in "email", with: user.email
+ fill_in "search", with: user.email
click_button "Search"
expect(page).to have_content user.name
diff --git a/spec/system/admin/valuators_spec.rb b/spec/system/admin/valuators_spec.rb
index 23233b344..f5108dd63 100644
--- a/spec/system/admin/valuators_spec.rb
+++ b/spec/system/admin/valuators_spec.rb
@@ -22,7 +22,7 @@ describe "Admin valuators", :admin do
end
scenario "Create", :js do
- fill_in "name_or_email", with: user.email
+ fill_in "search", with: user.email
click_button "Search"
expect(page).to have_content(user.name)
@@ -72,7 +72,7 @@ describe "Admin valuators", :admin do
expect(page).to have_content(valuator1.name)
expect(page).to have_content(valuator2.name)
- fill_in "name_or_email", with: " "
+ fill_in "search", with: " "
click_button "Search"
expect(page).to have_content("Valuators: User search")
@@ -85,11 +85,11 @@ describe "Admin valuators", :admin do
expect(page).to have_content(valuator1.name)
expect(page).to have_content(valuator2.name)
- fill_in "name_or_email", with: "Foster"
+ fill_in "search", with: "Foster"
click_button "Search"
expect(page).to have_content("Valuators: User search")
- expect(page).to have_field "name_or_email", with: "Foster"
+ expect(page).to have_field "search", with: "Foster"
expect(page).to have_content(valuator1.name)
expect(page).not_to have_content(valuator2.name)
end
@@ -98,11 +98,11 @@ describe "Admin valuators", :admin do
expect(page).to have_content(valuator1.email)
expect(page).to have_content(valuator2.email)
- fill_in "name_or_email", with: valuator2.email
+ fill_in "search", with: valuator2.email
click_button "Search"
expect(page).to have_content("Valuators: User search")
- expect(page).to have_field "name_or_email", with: valuator2.email
+ expect(page).to have_field "search", with: valuator2.email
expect(page).to have_content(valuator2.email)
expect(page).not_to have_content(valuator1.email)
end
diff --git a/spec/system/admin/verifications_spec.rb b/spec/system/admin/verifications_spec.rb
index 69bb37fb2..98961a571 100644
--- a/spec/system/admin/verifications_spec.rb
+++ b/spec/system/admin/verifications_spec.rb
@@ -22,7 +22,7 @@ describe "Incomplete verifications", :admin do
visit admin_verifications_path
- fill_in "name_or_email", with: "juan"
+ fill_in "search", with: "juan"
click_button "Search"
expect(page).to have_content("Juan_anonymous")
diff --git a/spec/system/moderation/users_spec.rb b/spec/system/moderation/users_spec.rb
index d05951eae..62a72d59a 100644
--- a/spec/system/moderation/users_spec.rb
+++ b/spec/system/moderation/users_spec.rb
@@ -58,7 +58,7 @@ describe "Moderate users" do
visit moderation_users_path
expect(page).not_to have_content citizen.name
- fill_in "name_or_email", with: "Wanda"
+ fill_in "search", with: "Wanda"
click_button "Search"
within("#moderation_users") do