X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-comments.ts;h=1488ce2b5a32cbedbac9a51231bc85c443ea48dc;hb=9295c68b74fe1f1e2e9f72009205d7f0379844c5;hp=2ae52397023d2606a37fd4887f0e6999c44c2006;hpb=c55e3d7227fe1453869e309025996b9d75256d5d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts index 2ae523970..1488ce2b5 100644 --- a/server/tests/api/videos/video-comments.ts +++ b/server/tests/api/videos/video-comments.ts @@ -3,7 +3,15 @@ import 'mocha' import * as chai from 'chai' import { dateIsValid, testImage } from '@server/tests/shared' -import { cleanupTests, CommentsCommand, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' +import { + cleanupTests, + CommentsCommand, + createSingleServer, + PeerTubeServer, + setAccessTokensToServers, + setDefaultAccountAvatar, + setDefaultChannelAvatar +} from '@shared/server-commands' const expect = chai.expect @@ -29,7 +37,8 @@ describe('Test video comments', function () { videoUUID = uuid videoId = id - await server.users.updateMyAvatar({ fixture: 'avatar.png' }) + await setDefaultChannelAvatar(server) + await setDefaultAccountAvatar(server) userAccessTokenServer1 = await server.users.generateUserAndToken('user1') @@ -81,7 +90,9 @@ describe('Test video comments', function () { expect(comment.account.name).to.equal('root') expect(comment.account.host).to.equal('localhost:' + server.port) - await testImage(server.url, 'avatar-resized', comment.account.avatar.path, '.png') + for (const avatar of comment.account.avatars) { + await testImage(server.url, `avatar-resized-${avatar.width}x${avatar.width}`, avatar.path, '.png') + } expect(comment.totalReplies).to.equal(0) expect(comment.totalRepliesFromVideoAuthor).to.equal(0)