Commit Graph

13 Commits (276c39361b8ac13b0604716c815de9db24cdcc57)

Author SHA1 Message Date
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs ()
Nick Schonning bd1d57c230
Autofix Rubocop RSpec/EmptyLineAfterSubject ()
Eugen Rochko 839f893168
Change public accounts pages to mount the web UI ()
* Change public accounts pages to mount the web UI

* Fix handling of remote usernames in routes

- When logged in, serve web app
- When logged out, redirect to permalink
- Fix `app-body` class not being set sometimes due to name conflict

* Fix missing `multiColumn` prop

* Fix failing test

* Use `discoverable` attribute to control indexing directives

* Fix `<ColumnLoading />` not using `multiColumn`

* Add `noindex` to accounts in REST API

* Change noindex directive to not be rendered by default before a route is mounted

* Add loading indicator for detailed status in web UI

* Fix missing indicator appearing while account is loading in web UI
Eugen Rochko edf09ec747
Add `/api/v1/accounts/familiar_followers` to REST API ()
* Add `/api/v1/accounts/familiar_followers` to REST API

* Change hide network preference to be stored consistently for local and remote accounts

* Add dummy classes to migration

* Apply suggestions from code review

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Claire e38fc319dc
Refactor and improve tests ()
* Change account and user fabricators to simplify and improve tests

- `Fabricate(:account)` implicitly fabricates an associated `user` if
  no `domain` attribute is given (an account with `domain: nil` is
  considered a local account, but no user record was created), unless
  `user: nil` is passed
- `Fabricate(:account, user: Fabricate(:user))` should still be possible
  but is discouraged.

* Fix and refactor tests

- avoid passing unneeded attributes to `Fabricate(:user)` or
  `Fabricate(:account)`
- avoid embedding `Fabricate(:user)` into a `Fabricate(:account)` or the other
  way around
- prefer `Fabricate(:user, account_attributes: …)` to
  `Fabricate(:user, account: Fabricate(:account, …)`
- also, some tests were using remote accounts with local user records, which is
  not representative of production code.
Claire 63b807cffc
Fix serialization of followers/following counts when user hides their network ()
* Add tests

* Fix serialization of followers/following counts when user hides their network

Fixes 

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Eugen Rochko 3134691948
Add support for reversible suspensions through ActivityPub ()
ThibG 3b3bdc7293 Hide blocked users from more places ()
* Hide blocked, muted, and blocked-by users from toot favourite lists

* Hide blocked, muted, and blocked-by users from toot reblog lists

* Hide blocked, muted, and blocked-by users from followers/following (API)

* Fix tests

* Hide blocked, muted, and blocked-by users from followers/following on public pages
Shuhei Kitagawa 5b47774ab8 Add tests for followers_accounts_controller ()
Yamagishi Kazutoshi d10447c3a8 Use raw status code on have_http_status ()
Akihiko Odaki bf575a1f5e Introduce recent to Follow ()
Introduce recent to Follow, as Account and other models have.
This change also adds specs for the scope and the dependents.
Matt Jankowski 9566893cc9 More controller specs ()
* Add render_views in more places

* Delegate methods from account to user with allow nil true, so that admin accounts show view renders when missing a user

* Use actual account instances in authorize follow controller spec
Matt Jankowski 8bac0350d1 Restful refactor of accounts/ routes ()
* Add routing specs for accounts followers and following actions

* Use more restful route naming for public account follow pages

Moves two actions:
- accounts#followers to accounts/follower_accounts#index
- accounts#following to accounts/following_accounts#index

Adds routing spec to ensure prior URLs are preserved.