X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-comments.ts;h=1488ce2b5a32cbedbac9a51231bc85c443ea48dc;hb=9295c68b74fe1f1e2e9f72009205d7f0379844c5;hp=61ee54540963426fd27c92d3ec5298fe9caa9b57;hpb=171efc48e67498406feb6d7873b3482b41505515;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts index 61ee54540..1488ce2b5 100644 --- a/server/tests/api/videos/video-comments.ts +++ b/server/tests/api/videos/video-comments.ts @@ -2,15 +2,16 @@ import 'mocha' import * as chai from 'chai' +import { dateIsValid, testImage } from '@server/tests/shared' import { cleanupTests, CommentsCommand, createSingleServer, - dateIsValid, PeerTubeServer, setAccessTokensToServers, - testImage -} from '@shared/extra-utils' + setDefaultAccountAvatar, + setDefaultChannelAvatar +} from '@shared/server-commands' const expect = chai.expect @@ -36,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') @@ -88,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)