MockSmtpServer,
prepareNotificationsTest,
ServerInfo,
- uploadRandomVideo,
waitJobs
} from '@shared/extra-utils'
import { UserNotification, UserNotificationSettingValue } from '@shared/models'
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 ])
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')
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 }
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 }
)
}
- const { name, uuid } = await uploadRandomVideo(server)
+ const { name, uuid } = await server.videosCommand.randomUpload()
await checkNewVideoFromSubscription(baseParams, name, uuid, 'presence')
})