aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/search/search-activitypub-video-playlists.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:04:35 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit89d241a79c262b9775c233b73cff080043ebb5e6 (patch)
treecb3b6cb431d25d891ef4e02f66c61d252d17048f /server/tests/api/search/search-activitypub-video-playlists.ts
parentd23dd9fbfc4d26026352c10f81d2795ceaf2908a (diff)
downloadPeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.gz
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.zst
PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.zip
Shorter server command names
Diffstat (limited to 'server/tests/api/search/search-activitypub-video-playlists.ts')
-rw-r--r--server/tests/api/search/search-activitypub-video-playlists.ts28
1 files changed, 14 insertions, 14 deletions
diff --git a/server/tests/api/search/search-activitypub-video-playlists.ts b/server/tests/api/search/search-activitypub-video-playlists.ts
index 46105c12c..7c99b954b 100644
--- a/server/tests/api/search/search-activitypub-video-playlists.ts
+++ b/server/tests/api/search/search-activitypub-video-playlists.ts
@@ -33,40 +33,40 @@ describe('Test ActivityPub playlists search', function () {
33 await setDefaultVideoChannel(servers) 33 await setDefaultVideoChannel(servers)
34 34
35 { 35 {
36 const video1 = (await servers[0].videosCommand.quickUpload({ name: 'video 1' })).uuid 36 const video1 = (await servers[0].videos.quickUpload({ name: 'video 1' })).uuid
37 const video2 = (await servers[0].videosCommand.quickUpload({ name: 'video 2' })).uuid 37 const video2 = (await servers[0].videos.quickUpload({ name: 'video 2' })).uuid
38 38
39 const attributes = { 39 const attributes = {
40 displayName: 'playlist 1 on server 1', 40 displayName: 'playlist 1 on server 1',
41 privacy: VideoPlaylistPrivacy.PUBLIC, 41 privacy: VideoPlaylistPrivacy.PUBLIC,
42 videoChannelId: servers[0].videoChannel.id 42 videoChannelId: servers[0].store.channel.id
43 } 43 }
44 const created = await servers[0].playlistsCommand.create({ attributes }) 44 const created = await servers[0].playlists.create({ attributes })
45 playlistServer1UUID = created.uuid 45 playlistServer1UUID = created.uuid
46 46
47 for (const videoId of [ video1, video2 ]) { 47 for (const videoId of [ video1, video2 ]) {
48 await servers[0].playlistsCommand.addElement({ playlistId: playlistServer1UUID, attributes: { videoId } }) 48 await servers[0].playlists.addElement({ playlistId: playlistServer1UUID, attributes: { videoId } })
49 } 49 }
50 } 50 }
51 51
52 { 52 {
53 const videoId = (await servers[1].videosCommand.quickUpload({ name: 'video 1' })).uuid 53 const videoId = (await servers[1].videos.quickUpload({ name: 'video 1' })).uuid
54 video2Server2 = (await servers[1].videosCommand.quickUpload({ name: 'video 2' })).uuid 54 video2Server2 = (await servers[1].videos.quickUpload({ name: 'video 2' })).uuid
55 55
56 const attributes = { 56 const attributes = {
57 displayName: 'playlist 1 on server 2', 57 displayName: 'playlist 1 on server 2',
58 privacy: VideoPlaylistPrivacy.PUBLIC, 58 privacy: VideoPlaylistPrivacy.PUBLIC,
59 videoChannelId: servers[1].videoChannel.id 59 videoChannelId: servers[1].store.channel.id
60 } 60 }
61 const created = await servers[1].playlistsCommand.create({ attributes }) 61 const created = await servers[1].playlists.create({ attributes })
62 playlistServer2UUID = created.uuid 62 playlistServer2UUID = created.uuid
63 63
64 await servers[1].playlistsCommand.addElement({ playlistId: playlistServer2UUID, attributes: { videoId } }) 64 await servers[1].playlists.addElement({ playlistId: playlistServer2UUID, attributes: { videoId } })
65 } 65 }
66 66
67 await waitJobs(servers) 67 await waitJobs(servers)
68 68
69 command = servers[0].searchCommand 69 command = servers[0].search
70 }) 70 })
71 71
72 it('Should not find a remote playlist', async function () { 72 it('Should not find a remote playlist', async function () {
@@ -139,7 +139,7 @@ describe('Test ActivityPub playlists search', function () {
139 }) 139 })
140 140
141 it('Should not list this remote playlist', async function () { 141 it('Should not list this remote playlist', async function () {
142 const body = await servers[0].playlistsCommand.list({ start: 0, count: 10 }) 142 const body = await servers[0].playlists.list({ start: 0, count: 10 })
143 expect(body.total).to.equal(1) 143 expect(body.total).to.equal(1)
144 expect(body.data).to.have.lengthOf(1) 144 expect(body.data).to.have.lengthOf(1)
145 expect(body.data[0].displayName).to.equal('playlist 1 on server 1') 145 expect(body.data[0].displayName).to.equal('playlist 1 on server 1')
@@ -148,7 +148,7 @@ describe('Test ActivityPub playlists search', function () {
148 it('Should update the playlist of server 2, and refresh it on server 1', async function () { 148 it('Should update the playlist of server 2, and refresh it on server 1', async function () {
149 this.timeout(60000) 149 this.timeout(60000)
150 150
151 await servers[1].playlistsCommand.addElement({ playlistId: playlistServer2UUID, attributes: { videoId: video2Server2 } }) 151 await servers[1].playlists.addElement({ playlistId: playlistServer2UUID, attributes: { videoId: video2Server2 } })
152 152
153 await waitJobs(servers) 153 await waitJobs(servers)
154 // Expire playlist 154 // Expire playlist
@@ -172,7 +172,7 @@ describe('Test ActivityPub playlists search', function () {
172 it('Should delete playlist of server 2, and delete it on server 1', async function () { 172 it('Should delete playlist of server 2, and delete it on server 1', async function () {
173 this.timeout(60000) 173 this.timeout(60000)
174 174
175 await servers[1].playlistsCommand.delete({ playlistId: playlistServer2UUID }) 175 await servers[1].playlists.delete({ playlistId: playlistServer2UUID })
176 176
177 await waitJobs(servers) 177 await waitJobs(servers)
178 // Expiration 178 // Expiration