diff options
Diffstat (limited to 'server/tests/api/users/users-multiple-servers.ts')
-rw-r--r-- | server/tests/api/users/users-multiple-servers.ts | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts index 0e1e6c97d..81489021b 100644 --- a/server/tests/api/users/users-multiple-servers.ts +++ b/server/tests/api/users/users-multiple-servers.ts | |||
@@ -20,6 +20,7 @@ import { checkActorFilesWereRemoved, getAccount, getAccountsList } from '../../u | |||
20 | import { setAccessTokensToServers } from '../../utils/users/login' | 20 | import { setAccessTokensToServers } from '../../utils/users/login' |
21 | import { User } from '../../../../shared/models/users' | 21 | import { User } from '../../../../shared/models/users' |
22 | import { VideoChannel } from '../../../../shared/models/videos' | 22 | import { VideoChannel } from '../../../../shared/models/videos' |
23 | import { waitJobs } from '../../utils/server/jobs' | ||
23 | 24 | ||
24 | const expect = chai.expect | 25 | const expect = chai.expect |
25 | 26 | ||
@@ -76,7 +77,7 @@ describe('Test users with multiple servers', function () { | |||
76 | videoUUID = resVideo.body.video.uuid | 77 | videoUUID = resVideo.body.video.uuid |
77 | } | 78 | } |
78 | 79 | ||
79 | await wait(5000) | 80 | await waitJobs(servers) |
80 | }) | 81 | }) |
81 | 82 | ||
82 | it('Should be able to update my display name', async function () { | 83 | it('Should be able to update my display name', async function () { |
@@ -92,7 +93,7 @@ describe('Test users with multiple servers', function () { | |||
92 | user = res.body | 93 | user = res.body |
93 | expect(user.account.displayName).to.equal('my super display name') | 94 | expect(user.account.displayName).to.equal('my super display name') |
94 | 95 | ||
95 | await wait(5000) | 96 | await waitJobs(servers) |
96 | }) | 97 | }) |
97 | 98 | ||
98 | it('Should be able to update my description', async function () { | 99 | it('Should be able to update my description', async function () { |
@@ -109,7 +110,7 @@ describe('Test users with multiple servers', function () { | |||
109 | expect(user.account.displayName).to.equal('my super display name') | 110 | expect(user.account.displayName).to.equal('my super display name') |
110 | expect(user.account.description).to.equal('my super description updated') | 111 | expect(user.account.description).to.equal('my super description updated') |
111 | 112 | ||
112 | await wait(5000) | 113 | await waitJobs(servers) |
113 | }) | 114 | }) |
114 | 115 | ||
115 | it('Should be able to update my avatar', async function () { | 116 | it('Should be able to update my avatar', async function () { |
@@ -128,7 +129,7 @@ describe('Test users with multiple servers', function () { | |||
128 | 129 | ||
129 | await testImage(servers[0].url, 'avatar2-resized', user.account.avatar.path, '.png') | 130 | await testImage(servers[0].url, 'avatar2-resized', user.account.avatar.path, '.png') |
130 | 131 | ||
131 | await wait(5000) | 132 | await waitJobs(servers) |
132 | }) | 133 | }) |
133 | 134 | ||
134 | it('Should have updated my profile on other servers too', async function () { | 135 | it('Should have updated my profile on other servers too', async function () { |
@@ -178,7 +179,7 @@ describe('Test users with multiple servers', function () { | |||
178 | 179 | ||
179 | await removeUser(servers[0].url, userId, servers[0].accessToken) | 180 | await removeUser(servers[0].url, userId, servers[0].accessToken) |
180 | 181 | ||
181 | await wait(5000) | 182 | await waitJobs(servers) |
182 | 183 | ||
183 | for (const server of servers) { | 184 | for (const server of servers) { |
184 | const resAccounts = await getAccountsList(server.url, '-createdAt') | 185 | const resAccounts = await getAccountsList(server.url, '-createdAt') |
@@ -209,10 +210,5 @@ describe('Test users with multiple servers', function () { | |||
209 | 210 | ||
210 | after(async function () { | 211 | after(async function () { |
211 | killallServers(servers) | 212 | killallServers(servers) |
212 | |||
213 | // Keep the logs if the test failed | ||
214 | if (this[ 'ok' ]) { | ||
215 | await flushTests() | ||
216 | } | ||
217 | }) | 213 | }) |
218 | }) | 214 | }) |