diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2022-02-28 08:34:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 08:34:43 +0100 |
commit | d0800f7661f13fabe7bb6f4aa0ea50764f106405 (patch) | |
tree | d43e6b0b6f4a5a32e03487e6464edbcaf288be2a /server/tests/api/users/users.ts | |
parent | 5cad2ca9db9b9d138f8a33058d10b94a9fd50c69 (diff) | |
download | PeerTube-d0800f7661f13fabe7bb6f4aa0ea50764f106405.tar.gz PeerTube-d0800f7661f13fabe7bb6f4aa0ea50764f106405.tar.zst PeerTube-d0800f7661f13fabe7bb6f4aa0ea50764f106405.zip |
Implement avatar miniatures (#4639)
* client: remove unused file
* refactor(client/my-actor-avatar): size from input
Read size from component input instead of scss, to make it possible to
use smaller avatar images when implemented.
* implement avatar miniatures
close #4560
* fix(test): max file size
* fix(search-index): normalize res acc to avatarMini
* refactor avatars to an array
* client/search: resize channel avatar to 120
* refactor(client/videos): remove unused function
* client(actor-avatar): set default size
* fix tests and avatars full result
When findOne is used only an array containting one avatar is returned.
* update migration version and version notations
* server/search: harmonize normalizing
* Cleanup avatar miniature PR
Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'server/tests/api/users/users.ts')
-rw-r--r-- | server/tests/api/users/users.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index 7023b3f08..a47713bf0 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -604,7 +604,9 @@ describe('Test users', function () { | |||
604 | await server.users.updateMyAvatar({ token: userToken, fixture }) | 604 | await server.users.updateMyAvatar({ token: userToken, fixture }) |
605 | 605 | ||
606 | const user = await server.users.getMyInfo({ token: userToken }) | 606 | const user = await server.users.getMyInfo({ token: userToken }) |
607 | await testImage(server.url, 'avatar-resized', user.account.avatar.path, '.gif') | 607 | for (const avatar of user.account.avatars) { |
608 | await testImage(server.url, `avatar-resized-${avatar.width}x${avatar.width}`, avatar.path, '.gif') | ||
609 | } | ||
608 | }) | 610 | }) |
609 | 611 | ||
610 | it('Should be able to update my avatar with a gif, and then a png', async function () { | 612 | it('Should be able to update my avatar with a gif, and then a png', async function () { |
@@ -614,7 +616,9 @@ describe('Test users', function () { | |||
614 | await server.users.updateMyAvatar({ token: userToken, fixture }) | 616 | await server.users.updateMyAvatar({ token: userToken, fixture }) |
615 | 617 | ||
616 | const user = await server.users.getMyInfo({ token: userToken }) | 618 | const user = await server.users.getMyInfo({ token: userToken }) |
617 | await testImage(server.url, 'avatar-resized', user.account.avatar.path, extension) | 619 | for (const avatar of user.account.avatars) { |
620 | await testImage(server.url, `avatar-resized-${avatar.width}x${avatar.width}`, avatar.path, extension) | ||
621 | } | ||
618 | } | 622 | } |
619 | }) | 623 | }) |
620 | 624 | ||