1
0
Fork 0
forked from forgejo/forgejo

Sort users and orgs on explore by recency by default (#24279)

This gives more "freshness" to the explore page. So it's not just the
same X users on the explore page by default, now it matches the same
sort as the repos on the explore page.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
techknowlogick 2023-05-06 10:04:55 -04:00 committed by GitHub
parent 46679554d0
commit 4daf40505a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 9 deletions

View file

@ -20,7 +20,7 @@ func TestSettingShowUserEmailExplore(t *testing.T) {
setting.UI.ShowUserEmail = true
session := loginUser(t, "user2")
req := NewRequest(t, "GET", "/explore/users")
req := NewRequest(t, "GET", "/explore/users?sort=alphabetically")
resp := session.MakeRequest(t, req, http.StatusOK)
htmlDoc := NewHTMLParser(t, resp.Body)
assert.Contains(t,
@ -30,7 +30,7 @@ func TestSettingShowUserEmailExplore(t *testing.T) {
setting.UI.ShowUserEmail = false
req = NewRequest(t, "GET", "/explore/users")
req = NewRequest(t, "GET", "/explore/users?sort=alphabetically")
resp = session.MakeRequest(t, req, http.StatusOK)
htmlDoc = NewHTMLParser(t, resp.Body)
assert.NotContains(t,