diff --git a/app/controllers/pseuds_controller.rb b/app/controllers/pseuds_controller.rb index 50eec2b5bb9..f1e03bb0d32 100644 --- a/app/controllers/pseuds_controller.rb +++ b/app/controllers/pseuds_controller.rb @@ -14,7 +14,7 @@ def load_user # GET /pseuds.xml def index if @user - @pseuds = @user.pseuds + @pseuds = @user.pseuds.alphabetical.paginate(page: params[:page]) @rec_counts = Pseud.rec_counts_for_pseuds(@pseuds) @work_counts = Pseud.work_counts_for_pseuds(@pseuds) @page_subtitle = @user.login diff --git a/app/views/pseuds/index.html.erb b/app/views/pseuds/index.html.erb index f6ff829cf04..db2071ecbe6 100644 --- a/app/views/pseuds/index.html.erb +++ b/app/views/pseuds/index.html.erb @@ -9,6 +9,7 @@
  • <%= link_to ts('New Pseud'), new_user_pseud_path(@user) %>
  • <% end %> +<%= will_paginate @pseuds %> @@ -20,4 +21,6 @@ - + +<%= will_paginate @pseuds %> + diff --git a/features/other_a/pseuds.feature b/features/other_a/pseuds.feature index ce6fe1cc767..c8e40515e0d 100644 --- a/features/other_a/pseuds.feature +++ b/features/other_a/pseuds.feature @@ -161,6 +161,15 @@ Scenario: Many pseuds Then I should see "Slartibartfast" within "li.pseud > a" And I should not see "Slartibartfast" within "ul.expandable" + When I go to my pseuds page + Then I should not see "Zaphod (Zaphod)" within "ul.pseud.index" + But I should see "Agrajag (Zaphod)" within "ul.pseud.index" + And I should see "Betelgeuse (Zaphod)" within "ul.pseud.index" + And I should see "Slartibartfast (Zaphod)" within "ul.pseud.index" + And I should see "Next" within ".pagination" + When I follow "Next" within ".pagination" + Then I should see "Zaphod (Zaphod)" within "ul.pseud.index" + When there are 10 pseuds per page And I view my profile Then I should see "Zaphod, Agrajag, Betelgeuse, and Slartibartfast" within "dl.meta"