From d23dd9fbfc4d26026352c10f81d2795ceaf2908a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 15 Jul 2021 10:02:54 +0200 Subject: Introduce videos command --- server/tests/api/notifications/notifications-api.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'server/tests/api/notifications/notifications-api.ts') diff --git a/server/tests/api/notifications/notifications-api.ts b/server/tests/api/notifications/notifications-api.ts index f33d8e64d..41e1b8015 100644 --- a/server/tests/api/notifications/notifications-api.ts +++ b/server/tests/api/notifications/notifications-api.ts @@ -10,7 +10,6 @@ import { MockSmtpServer, prepareNotificationsTest, ServerInfo, - uploadRandomVideo, waitJobs } from '@shared/extra-utils' import { UserNotification, UserNotificationSettingValue } from '@shared/models' @@ -35,7 +34,7 @@ describe('Test notifications API', function () { await server.subscriptionsCommand.add({ token: userToken, targetUri: 'root_channel@localhost:' + server.port }) for (let i = 0; i < 10; i++) { - await uploadRandomVideo(server, false) + await server.videosCommand.randomUpload({ wait: false }) } await waitJobs([ server ]) @@ -112,7 +111,7 @@ describe('Test notifications API', function () { expect(info.notificationSettings.newVideoFromSubscription).to.equal(UserNotificationSettingValue.NONE) } - const { name, uuid } = await uploadRandomVideo(server) + const { name, uuid } = await server.videosCommand.randomUpload() const check = { web: true, mail: true } await checkNewVideoFromSubscription({ ...baseParams, check }, name, uuid, 'absence') @@ -131,7 +130,7 @@ describe('Test notifications API', function () { expect(info.notificationSettings.newVideoFromSubscription).to.equal(UserNotificationSettingValue.WEB) } - const { name, uuid } = await uploadRandomVideo(server) + const { name, uuid } = await server.videosCommand.randomUpload() { const check = { mail: true, web: false } @@ -157,7 +156,7 @@ describe('Test notifications API', function () { expect(info.notificationSettings.newVideoFromSubscription).to.equal(UserNotificationSettingValue.EMAIL) } - const { name, uuid } = await uploadRandomVideo(server) + const { name, uuid } = await server.videosCommand.randomUpload() { const check = { mail: false, web: true } @@ -188,7 +187,7 @@ describe('Test notifications API', function () { ) } - const { name, uuid } = await uploadRandomVideo(server) + const { name, uuid } = await server.videosCommand.randomUpload() await checkNewVideoFromSubscription(baseParams, name, uuid, 'presence') }) -- cgit v1.2.3