Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/pseuds_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def show

@works = visible_works.order("revised_at DESC").limit(ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD)
@series = visible_series.order("updated_at DESC").limit(ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD)
@bookmarks = visible_bookmarks.order("updated_at DESC").limit(ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD)
@bookmarks = visible_bookmarks.order("created_at DESC").limit(ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD)

return unless current_user.respond_to?(:subscriptions)

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def show

@works = visible[:works].order('revised_at DESC').limit(ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD)
@series = visible[:series].order('updated_at DESC').limit(ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD)
@bookmarks = visible[:bookmarks].order('updated_at DESC').limit(ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD)
@bookmarks = visible[:bookmarks].order("created_at DESC").limit(ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD)
if current_user.respond_to?(:subscriptions)
@subscription = current_user.subscriptions.where(subscribable_id: @user.id,
subscribable_type: 'User').first ||
Expand Down
24 changes: 24 additions & 0 deletions features/users/user_dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,27 @@ Feature: User dashboard
Then I should see "Here are some tips to help you get started" within "#modal"
And I should see "First login help" within "#modal"
And I should see "Close" within "#modal"

Scenario: The user dashboard should list the user's most recently created bookmarks
Given dashboard counts expire after 10 seconds
And I am logged in as "fruitpie"
And I post the works "Work One, Work Two, Work Three, Work Four, Work Five, Work Six"
When I am logged in as "meatloaf"
And I bookmark the works "Work One, Work Two, Work Three, Work Four, Work Five, Work Six"
When I go to meatloaf's user page
Then I should see "Recent bookmarks"
And I should not see "Work One" within "#user-bookmarks"
And I should see "Work Six" within "#user-bookmarks"
When I edit the bookmark for "Work One"
And I check "bookmark_rec"
And I press "Update"
When I go to meatloaf's user page
Then I should see "Recent bookmarks"
And I should not see "Work One" within "#user-bookmarks"
And I should see "Work Six" within "#user-bookmarks"
When I am on meatloaf's pseuds page
And I follow "meatloaf" within "ul.pseud.index"
Then I should be on the dashboard page for user "meatloaf" with pseud "meatloaf"
And I should see "Recent bookmarks"
And I should not see "Work One" within "#user-bookmarks"
And I should see "Work Six" within "#user-bookmarks"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried being thorough on this test, but if this is overkill let me know and I can try trimming it.

Loading