1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Introduce notifications command

This commit is contained in:
Chocobozzz 2021-07-09 16:23:01 +02:00
parent 9293139fde
commit dd0ebb7151
No known key found for this signature in database
GPG key ID: 583A612D890159BE
17 changed files with 272 additions and 274 deletions

View file

@ -10,7 +10,6 @@ import {
checkNewVideoFromSubscription,
checkVideoIsPublished,
cleanupTests,
getLastNotification,
ImportsCommand,
MockSmtpServer,
prepareNotificationsTest,
@ -64,7 +63,7 @@ describe('Test user notifications', function () {
await uploadRandomVideoOnServers(servers, 1)
const notification = await getLastNotification(servers[0].url, userAccessToken)
const notification = await servers[0].notificationsCommand.getLastest({ token: userAccessToken })
expect(notification).to.be.undefined
expect(emails).to.have.lengthOf(0)
@ -245,7 +244,7 @@ describe('Test user notifications', function () {
await uploadRandomVideoOnServers(servers, 2, { waitTranscoding: false })
await waitJobs(servers)
const notification = await getLastNotification(servers[0].url, userAccessToken)
const notification = await servers[0].notificationsCommand.getLastest({ token: userAccessToken })
if (notification) {
expect(notification.type).to.not.equal(UserNotificationType.MY_VIDEO_PUBLISHED)
}