import 'mocha'
import * as chai from 'chai'
-import { buildUUID } from '@server/helpers/uuid'
import {
CheckerBaseParams,
checkMyVideoImportIsFinished,
checkNewActorFollow,
checkNewVideoFromSubscription,
checkVideoIsPublished,
- cleanupTests,
FIXTURE_URLS,
MockSmtpServer,
- PeerTubeServer,
prepareNotificationsTest,
- uploadRandomVideoOnServers,
- wait,
- waitJobs
-} from '@shared/extra-utils'
+ uploadRandomVideoOnServers
+} from '@server/tests/shared'
+import { buildUUID, wait } from '@shared/core-utils'
import { UserNotification, UserNotificationType, VideoPrivacy } from '@shared/models'
+import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
const expect = chai.expect
await uploadRandomVideoOnServers(servers, 1)
- const notification = await servers[0].notifications.getLastest({ token: userAccessToken })
+ const notification = await servers[0].notifications.getLatest({ token: userAccessToken })
expect(notification).to.be.undefined
expect(emails).to.have.lengthOf(0)
})
it('Should not send a notification before the video is published', async function () {
- this.timeout(50000)
+ this.timeout(150000)
const updateAt = new Date(new Date().getTime() + 1000000)
})
it('Should not send a notification if the wait transcoding is false', async function () {
- this.timeout(50000)
+ this.timeout(100_000)
await uploadRandomVideoOnServers(servers, 2, { waitTranscoding: false })
await waitJobs(servers)
- const notification = await servers[0].notifications.getLastest({ token: userAccessToken })
+ const notification = await servers[0].notifications.getLatest({ token: userAccessToken })
if (notification) {
expect(notification.type).to.not.equal(UserNotificationType.MY_VIDEO_PUBLISHED)
}
})
it('Should send a notification when an imported video is transcoded', async function () {
- this.timeout(50000)
+ this.timeout(120000)
const name = 'video import ' + buildUUID()