aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications/user-notifications.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/notifications/user-notifications.ts')
-rw-r--r--server/tests/api/notifications/user-notifications.ts19
1 files changed, 9 insertions, 10 deletions
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index 465349fb9..4db8c1576 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -14,7 +14,6 @@ import {
14 MockSmtpServer, 14 MockSmtpServer,
15 prepareNotificationsTest, 15 prepareNotificationsTest,
16 ServerInfo, 16 ServerInfo,
17 updateVideo,
18 uploadRandomVideoOnServers, 17 uploadRandomVideoOnServers,
19 wait, 18 wait,
20 waitJobs 19 waitJobs
@@ -99,7 +98,7 @@ describe('Test user notifications', function () {
99 privacy: VideoPrivacy.PRIVATE, 98 privacy: VideoPrivacy.PRIVATE,
100 scheduleUpdate: { 99 scheduleUpdate: {
101 updateAt: updateAt.toISOString(), 100 updateAt: updateAt.toISOString(),
102 privacy: VideoPrivacy.PUBLIC 101 privacy: VideoPrivacy.PUBLIC as VideoPrivacy.PUBLIC
103 } 102 }
104 } 103 }
105 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data) 104 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data)
@@ -118,7 +117,7 @@ describe('Test user notifications', function () {
118 privacy: VideoPrivacy.PRIVATE, 117 privacy: VideoPrivacy.PRIVATE,
119 scheduleUpdate: { 118 scheduleUpdate: {
120 updateAt: updateAt.toISOString(), 119 updateAt: updateAt.toISOString(),
121 privacy: VideoPrivacy.PUBLIC 120 privacy: VideoPrivacy.PUBLIC as VideoPrivacy.PUBLIC
122 } 121 }
123 } 122 }
124 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data) 123 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data)
@@ -137,7 +136,7 @@ describe('Test user notifications', function () {
137 privacy: VideoPrivacy.PRIVATE, 136 privacy: VideoPrivacy.PRIVATE,
138 scheduleUpdate: { 137 scheduleUpdate: {
139 updateAt: updateAt.toISOString(), 138 updateAt: updateAt.toISOString(),
140 privacy: VideoPrivacy.PUBLIC 139 privacy: VideoPrivacy.PUBLIC as VideoPrivacy.PUBLIC
141 } 140 }
142 } 141 }
143 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data) 142 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data)
@@ -154,7 +153,7 @@ describe('Test user notifications', function () {
154 153
155 await checkNewVideoFromSubscription(baseParams, name, uuid, 'absence') 154 await checkNewVideoFromSubscription(baseParams, name, uuid, 'absence')
156 155
157 await updateVideo(servers[0].url, servers[0].accessToken, uuid, { privacy: VideoPrivacy.PUBLIC }) 156 await servers[0].videosCommand.update({ id: uuid, attributes: { privacy: VideoPrivacy.PUBLIC } })
158 157
159 await waitJobs(servers) 158 await waitJobs(servers)
160 await checkNewVideoFromSubscription(baseParams, name, uuid, 'presence') 159 await checkNewVideoFromSubscription(baseParams, name, uuid, 'presence')
@@ -168,7 +167,7 @@ describe('Test user notifications', function () {
168 167
169 await checkNewVideoFromSubscription(baseParams, name, uuid, 'absence') 168 await checkNewVideoFromSubscription(baseParams, name, uuid, 'absence')
170 169
171 await updateVideo(servers[1].url, servers[1].accessToken, uuid, { privacy: VideoPrivacy.PUBLIC }) 170 await servers[1].videosCommand.update({ id: uuid, attributes: { privacy: VideoPrivacy.PUBLIC } })
172 171
173 await waitJobs(servers) 172 await waitJobs(servers)
174 await checkNewVideoFromSubscription(baseParams, name, uuid, 'presence') 173 await checkNewVideoFromSubscription(baseParams, name, uuid, 'presence')
@@ -180,7 +179,7 @@ describe('Test user notifications', function () {
180 const data = { privacy: VideoPrivacy.PRIVATE } 179 const data = { privacy: VideoPrivacy.PRIVATE }
181 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data) 180 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data)
182 181
183 await updateVideo(servers[0].url, servers[0].accessToken, uuid, { privacy: VideoPrivacy.UNLISTED }) 182 await servers[0].videosCommand.update({ id: uuid, attributes: { privacy: VideoPrivacy.UNLISTED } })
184 183
185 await checkNewVideoFromSubscription(baseParams, name, uuid, 'absence') 184 await checkNewVideoFromSubscription(baseParams, name, uuid, 'absence')
186 }) 185 })
@@ -191,7 +190,7 @@ describe('Test user notifications', function () {
191 const data = { privacy: VideoPrivacy.PRIVATE } 190 const data = { privacy: VideoPrivacy.PRIVATE }
192 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data) 191 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data)
193 192
194 await updateVideo(servers[1].url, servers[1].accessToken, uuid, { privacy: VideoPrivacy.UNLISTED }) 193 await servers[1].videosCommand.update({ id: uuid, attributes: { privacy: VideoPrivacy.UNLISTED } })
195 194
196 await waitJobs(servers) 195 await waitJobs(servers)
197 await checkNewVideoFromSubscription(baseParams, name, uuid, 'absence') 196 await checkNewVideoFromSubscription(baseParams, name, uuid, 'absence')
@@ -295,7 +294,7 @@ describe('Test user notifications', function () {
295 privacy: VideoPrivacy.PRIVATE, 294 privacy: VideoPrivacy.PRIVATE,
296 scheduleUpdate: { 295 scheduleUpdate: {
297 updateAt: updateAt.toISOString(), 296 updateAt: updateAt.toISOString(),
298 privacy: VideoPrivacy.PUBLIC 297 privacy: VideoPrivacy.PUBLIC as VideoPrivacy.PUBLIC
299 } 298 }
300 } 299 }
301 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data) 300 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data)
@@ -313,7 +312,7 @@ describe('Test user notifications', function () {
313 privacy: VideoPrivacy.PRIVATE, 312 privacy: VideoPrivacy.PRIVATE,
314 scheduleUpdate: { 313 scheduleUpdate: {
315 updateAt: updateAt.toISOString(), 314 updateAt: updateAt.toISOString(),
316 privacy: VideoPrivacy.PUBLIC 315 privacy: VideoPrivacy.PUBLIC as VideoPrivacy.PUBLIC
317 } 316 }
318 } 317 }
319 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data) 318 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data)