diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 09:04:35 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 89d241a79c262b9775c233b73cff080043ebb5e6 (patch) | |
tree | cb3b6cb431d25d891ef4e02f66c61d252d17048f /server/tests/api/videos/video-schedule-update.ts | |
parent | d23dd9fbfc4d26026352c10f81d2795ceaf2908a (diff) | |
download | PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.gz PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.zst PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.zip |
Shorter server command names
Diffstat (limited to 'server/tests/api/videos/video-schedule-update.ts')
-rw-r--r-- | server/tests/api/videos/video-schedule-update.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts index 635ae6ff1..3938b47c8 100644 --- a/server/tests/api/videos/video-schedule-update.ts +++ b/server/tests/api/videos/video-schedule-update.ts | |||
@@ -49,25 +49,25 @@ describe('Test video update scheduler', function () { | |||
49 | } | 49 | } |
50 | } | 50 | } |
51 | 51 | ||
52 | await servers[0].videosCommand.upload({ attributes }) | 52 | await servers[0].videos.upload({ attributes }) |
53 | 53 | ||
54 | await waitJobs(servers) | 54 | await waitJobs(servers) |
55 | }) | 55 | }) |
56 | 56 | ||
57 | it('Should not list the video (in privacy mode)', async function () { | 57 | it('Should not list the video (in privacy mode)', async function () { |
58 | for (const server of servers) { | 58 | for (const server of servers) { |
59 | const { total } = await server.videosCommand.list() | 59 | const { total } = await server.videos.list() |
60 | 60 | ||
61 | expect(total).to.equal(0) | 61 | expect(total).to.equal(0) |
62 | } | 62 | } |
63 | }) | 63 | }) |
64 | 64 | ||
65 | it('Should have my scheduled video in my account videos', async function () { | 65 | it('Should have my scheduled video in my account videos', async function () { |
66 | const { total, data } = await servers[0].videosCommand.listMyVideos() | 66 | const { total, data } = await servers[0].videos.listMyVideos() |
67 | expect(total).to.equal(1) | 67 | expect(total).to.equal(1) |
68 | 68 | ||
69 | const videoFromList = data[0] | 69 | const videoFromList = data[0] |
70 | const videoFromGet = await servers[0].videosCommand.getWithToken({ id: videoFromList.uuid }) | 70 | const videoFromGet = await servers[0].videos.getWithToken({ id: videoFromList.uuid }) |
71 | 71 | ||
72 | for (const video of [ videoFromList, videoFromGet ]) { | 72 | for (const video of [ videoFromList, videoFromGet ]) { |
73 | expect(video.name).to.equal('video 1') | 73 | expect(video.name).to.equal('video 1') |
@@ -84,7 +84,7 @@ describe('Test video update scheduler', function () { | |||
84 | await waitJobs(servers) | 84 | await waitJobs(servers) |
85 | 85 | ||
86 | for (const server of servers) { | 86 | for (const server of servers) { |
87 | const { total, data } = await server.videosCommand.list() | 87 | const { total, data } = await server.videos.list() |
88 | 88 | ||
89 | expect(total).to.equal(1) | 89 | expect(total).to.equal(1) |
90 | expect(data[0].name).to.equal('video 1') | 90 | expect(data[0].name).to.equal('video 1') |
@@ -99,7 +99,7 @@ describe('Test video update scheduler', function () { | |||
99 | privacy: VideoPrivacy.PRIVATE | 99 | privacy: VideoPrivacy.PRIVATE |
100 | } | 100 | } |
101 | 101 | ||
102 | const { uuid } = await servers[0].videosCommand.upload({ attributes }) | 102 | const { uuid } = await servers[0].videos.upload({ attributes }) |
103 | video2UUID = uuid | 103 | video2UUID = uuid |
104 | 104 | ||
105 | await waitJobs(servers) | 105 | await waitJobs(servers) |
@@ -116,20 +116,20 @@ describe('Test video update scheduler', function () { | |||
116 | } | 116 | } |
117 | } | 117 | } |
118 | 118 | ||
119 | await servers[0].videosCommand.update({ id: video2UUID, attributes }) | 119 | await servers[0].videos.update({ id: video2UUID, attributes }) |
120 | await waitJobs(servers) | 120 | await waitJobs(servers) |
121 | }) | 121 | }) |
122 | 122 | ||
123 | it('Should not display the updated video', async function () { | 123 | it('Should not display the updated video', async function () { |
124 | for (const server of servers) { | 124 | for (const server of servers) { |
125 | const { total } = await server.videosCommand.list() | 125 | const { total } = await server.videos.list() |
126 | 126 | ||
127 | expect(total).to.equal(1) | 127 | expect(total).to.equal(1) |
128 | } | 128 | } |
129 | }) | 129 | }) |
130 | 130 | ||
131 | it('Should have my scheduled updated video in my account videos', async function () { | 131 | it('Should have my scheduled updated video in my account videos', async function () { |
132 | const { total, data } = await servers[0].videosCommand.listMyVideos() | 132 | const { total, data } = await servers[0].videos.listMyVideos() |
133 | expect(total).to.equal(2) | 133 | expect(total).to.equal(2) |
134 | 134 | ||
135 | const video = data.find(v => v.uuid === video2UUID) | 135 | const video = data.find(v => v.uuid === video2UUID) |
@@ -149,7 +149,7 @@ describe('Test video update scheduler', function () { | |||
149 | await waitJobs(servers) | 149 | await waitJobs(servers) |
150 | 150 | ||
151 | for (const server of servers) { | 151 | for (const server of servers) { |
152 | const { total, data } = await server.videosCommand.list() | 152 | const { total, data } = await server.videos.list() |
153 | expect(total).to.equal(2) | 153 | expect(total).to.equal(2) |
154 | 154 | ||
155 | const video = data.find(v => v.uuid === video2UUID) | 155 | const video = data.find(v => v.uuid === video2UUID) |