1
0
Fork 0

Fix tests

This commit is contained in:
Chocobozzz 2020-07-29 13:46:52 +02:00 committed by Chocobozzz
parent 668b7f096e
commit 41130b4ce3
4 changed files with 7 additions and 7 deletions

View File

@ -169,7 +169,7 @@ const myAccountRoutes: Routes = [
component: MyAccountAbusesListComponent, component: MyAccountAbusesListComponent,
data: { data: {
meta: { meta: {
title: 'My abuses' title: 'My abuse reports'
} }
} }
} }

View File

@ -42,9 +42,9 @@ export class MyAccountNotificationPreferencesComponent implements OnInit {
newFollow: this.i18n('You or your channel(s) has a new follower'), newFollow: this.i18n('You or your channel(s) has a new follower'),
commentMention: this.i18n('Someone mentioned you in video comments'), commentMention: this.i18n('Someone mentioned you in video comments'),
newInstanceFollower: this.i18n('Your instance has a new follower'), newInstanceFollower: this.i18n('Your instance has a new follower'),
autoInstanceFollowing: this.i18n('Your instance auto followed another instance'), autoInstanceFollowing: this.i18n('Your instance automatically followed another instance'),
abuseNewMessage: this.i18n('An abuse received a new message'), abuseNewMessage: this.i18n('An abuse report received a new message'),
abuseStateChange: this.i18n('One of your abuse has been accepted or rejected by moderators') abuseStateChange: this.i18n('One of your abuse reports has been accepted or rejected by moderators')
} }
this.notificationSettingKeys = Object.keys(this.labelNotifications) as (keyof UserNotificationSetting)[] this.notificationSettingKeys = Object.keys(this.labelNotifications) as (keyof UserNotificationSetting)[]

View File

@ -95,7 +95,7 @@ export class MyAccountComponent implements OnInit {
iconName: 'peertube-x' iconName: 'peertube-x'
}, },
{ {
label: this.i18n('My abuses'), label: this.i18n('My abuse reports'),
routerLink: '/my-account/abuses', routerLink: '/my-account/abuses',
iconName: 'flag' iconName: 'flag'
}, },

View File

@ -267,7 +267,7 @@ describe('Test moderation notifications', function () {
await addAbuseMessage(servers[0].url, servers[0].accessToken, abuseId, message) await addAbuseMessage(servers[0].url, servers[0].accessToken, abuseId, message)
await waitJobs(servers) await waitJobs(servers)
await checkNewAbuseMessage(baseParamsAdmin, abuseId, message, 'admin1@example.com', 'absence') await checkNewAbuseMessage(baseParamsAdmin, abuseId, message, 'admin' + servers[0].internalServerNumber + '@example.com', 'absence')
}) })
it('Should send a notification to moderators', async function () { it('Should send a notification to moderators', async function () {
@ -277,7 +277,7 @@ describe('Test moderation notifications', function () {
await addAbuseMessage(servers[0].url, userAccessToken, abuseId2, message) await addAbuseMessage(servers[0].url, userAccessToken, abuseId2, message)
await waitJobs(servers) await waitJobs(servers)
await checkNewAbuseMessage(baseParamsAdmin, abuseId2, message, 'admin1@example.com', 'presence') await checkNewAbuseMessage(baseParamsAdmin, abuseId2, message, 'admin' + servers[0].internalServerNumber + '@example.com', 'presence')
}) })
it('Should not send a notification to reporter if sent by the reporter', async function () { it('Should not send a notification to reporter if sent by the reporter', async function () {