aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-22 16:58:49 +0100
committerChocobozzz <me@florianbigard.com>2022-03-22 17:24:32 +0100
commit92e66e04f7f51d37b465cff442ce47f6d6d7cadd (patch)
tree4475c5c601c0f6673ca56afba5b7f70a4fae4ec3 /server/tests/api/check-params
parent1808a1f8e4b7b102823492a2007a46929aebf189 (diff)
downloadPeerTube-92e66e04f7f51d37b465cff442ce47f6d6d7cadd.tar.gz
PeerTube-92e66e04f7f51d37b465cff442ce47f6d6d7cadd.tar.zst
PeerTube-92e66e04f7f51d37b465cff442ce47f6d6d7cadd.zip
Rename studio to editor
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r--server/tests/api/check-params/config.ts2
-rw-r--r--server/tests/api/check-params/index.ts2
-rw-r--r--server/tests/api/check-params/user-notifications.ts2
-rw-r--r--server/tests/api/check-params/video-studio.ts (renamed from server/tests/api/check-params/video-editor.ts)40
4 files changed, 23 insertions, 23 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts
index 900f642c2..c8dbbf797 100644
--- a/server/tests/api/check-params/config.ts
+++ b/server/tests/api/check-params/config.ts
@@ -148,7 +148,7 @@ describe('Test config API validators', function () {
148 } 148 }
149 } 149 }
150 }, 150 },
151 videoEditor: { 151 videoStudio: {
152 enabled: true 152 enabled: true
153 }, 153 },
154 import: { 154 import: {
diff --git a/server/tests/api/check-params/index.ts b/server/tests/api/check-params/index.ts
index c088b52cd..c9adeef4a 100644
--- a/server/tests/api/check-params/index.ts
+++ b/server/tests/api/check-params/index.ts
@@ -25,7 +25,7 @@ import './video-blacklist'
25import './video-captions' 25import './video-captions'
26import './video-channels' 26import './video-channels'
27import './video-comments' 27import './video-comments'
28import './video-editor' 28import './video-studio'
29import './video-imports' 29import './video-imports'
30import './video-playlists' 30import './video-playlists'
31import './videos' 31import './videos'
diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts
index 93355e8b3..7fbe4271b 100644
--- a/server/tests/api/check-params/user-notifications.ts
+++ b/server/tests/api/check-params/user-notifications.ts
@@ -171,7 +171,7 @@ describe('Test user notifications API validators', function () {
171 abuseNewMessage: UserNotificationSettingValue.WEB, 171 abuseNewMessage: UserNotificationSettingValue.WEB,
172 abuseStateChange: UserNotificationSettingValue.WEB, 172 abuseStateChange: UserNotificationSettingValue.WEB,
173 newPeerTubeVersion: UserNotificationSettingValue.WEB, 173 newPeerTubeVersion: UserNotificationSettingValue.WEB,
174 myVideoEditionFinished: UserNotificationSettingValue.WEB, 174 myVideoStudioEditionFinished: UserNotificationSettingValue.WEB,
175 newPluginVersion: UserNotificationSettingValue.WEB 175 newPluginVersion: UserNotificationSettingValue.WEB
176 } 176 }
177 177
diff --git a/server/tests/api/check-params/video-editor.ts b/server/tests/api/check-params/video-studio.ts
index 5f5faf8fb..9ca55d095 100644
--- a/server/tests/api/check-params/video-editor.ts
+++ b/server/tests/api/check-params/video-studio.ts
@@ -1,19 +1,19 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { HttpStatusCode, VideoEditorTask } from '@shared/models' 4import { HttpStatusCode, VideoStudioTask } from '@shared/models'
5import { 5import {
6 cleanupTests, 6 cleanupTests,
7 createSingleServer, 7 createSingleServer,
8 PeerTubeServer, 8 PeerTubeServer,
9 setAccessTokensToServers, 9 setAccessTokensToServers,
10 VideoEditorCommand, 10 VideoStudioCommand,
11 waitJobs 11 waitJobs
12} from '@shared/server-commands' 12} from '@shared/server-commands'
13 13
14describe('Test video editor API validator', function () { 14describe('Test video studio API validator', function () {
15 let server: PeerTubeServer 15 let server: PeerTubeServer
16 let command: VideoEditorCommand 16 let command: VideoStudioCommand
17 let userAccessToken: string 17 let userAccessToken: string
18 let videoUUID: string 18 let videoUUID: string
19 19
@@ -32,7 +32,7 @@ describe('Test video editor API validator', function () {
32 const { uuid } = await server.videos.quickUpload({ name: 'video' }) 32 const { uuid } = await server.videos.quickUpload({ name: 'video' })
33 videoUUID = uuid 33 videoUUID = uuid
34 34
35 command = server.videoEditor 35 command = server.videoStudio
36 36
37 await waitJobs([ server ]) 37 await waitJobs([ server ])
38 }) 38 })
@@ -41,10 +41,10 @@ describe('Test video editor API validator', function () {
41 41
42 describe('Config settings', function () { 42 describe('Config settings', function () {
43 43
44 it('Should fail if editor is disabled', async function () { 44 it('Should fail if studio is disabled', async function () {
45 await server.config.updateExistingSubConfig({ 45 await server.config.updateExistingSubConfig({
46 newConfig: { 46 newConfig: {
47 videoEditor: { 47 videoStudio: {
48 enabled: false 48 enabled: false
49 } 49 }
50 } 50 }
@@ -52,15 +52,15 @@ describe('Test video editor API validator', function () {
52 52
53 await command.createEditionTasks({ 53 await command.createEditionTasks({
54 videoId: videoUUID, 54 videoId: videoUUID,
55 tasks: VideoEditorCommand.getComplexTask(), 55 tasks: VideoStudioCommand.getComplexTask(),
56 expectedStatus: HttpStatusCode.BAD_REQUEST_400 56 expectedStatus: HttpStatusCode.BAD_REQUEST_400
57 }) 57 })
58 }) 58 })
59 59
60 it('Should fail to enable editor if transcoding is disabled', async function () { 60 it('Should fail to enable studio if transcoding is disabled', async function () {
61 await server.config.updateExistingSubConfig({ 61 await server.config.updateExistingSubConfig({
62 newConfig: { 62 newConfig: {
63 videoEditor: { 63 videoStudio: {
64 enabled: true 64 enabled: true
65 }, 65 },
66 transcoding: { 66 transcoding: {
@@ -71,10 +71,10 @@ describe('Test video editor API validator', function () {
71 }) 71 })
72 }) 72 })
73 73
74 it('Should succeed to enable video editor', async function () { 74 it('Should succeed to enable video studio', async function () {
75 await server.config.updateExistingSubConfig({ 75 await server.config.updateExistingSubConfig({
76 newConfig: { 76 newConfig: {
77 videoEditor: { 77 videoStudio: {
78 enabled: true 78 enabled: true
79 }, 79 },
80 transcoding: { 80 transcoding: {
@@ -91,7 +91,7 @@ describe('Test video editor API validator', function () {
91 await command.createEditionTasks({ 91 await command.createEditionTasks({
92 token: null, 92 token: null,
93 videoId: videoUUID, 93 videoId: videoUUID,
94 tasks: VideoEditorCommand.getComplexTask(), 94 tasks: VideoStudioCommand.getComplexTask(),
95 expectedStatus: HttpStatusCode.UNAUTHORIZED_401 95 expectedStatus: HttpStatusCode.UNAUTHORIZED_401
96 }) 96 })
97 }) 97 })
@@ -100,7 +100,7 @@ describe('Test video editor API validator', function () {
100 await command.createEditionTasks({ 100 await command.createEditionTasks({
101 token: userAccessToken, 101 token: userAccessToken,
102 videoId: videoUUID, 102 videoId: videoUUID,
103 tasks: VideoEditorCommand.getComplexTask(), 103 tasks: VideoStudioCommand.getComplexTask(),
104 expectedStatus: HttpStatusCode.FORBIDDEN_403 104 expectedStatus: HttpStatusCode.FORBIDDEN_403
105 }) 105 })
106 }) 106 })
@@ -108,7 +108,7 @@ describe('Test video editor API validator', function () {
108 it('Should fail with an invalid video', async function () { 108 it('Should fail with an invalid video', async function () {
109 await command.createEditionTasks({ 109 await command.createEditionTasks({
110 videoId: 'tintin', 110 videoId: 'tintin',
111 tasks: VideoEditorCommand.getComplexTask(), 111 tasks: VideoStudioCommand.getComplexTask(),
112 expectedStatus: HttpStatusCode.BAD_REQUEST_400 112 expectedStatus: HttpStatusCode.BAD_REQUEST_400
113 }) 113 })
114 }) 114 })
@@ -116,7 +116,7 @@ describe('Test video editor API validator', function () {
116 it('Should fail with an unknown video', async function () { 116 it('Should fail with an unknown video', async function () {
117 await command.createEditionTasks({ 117 await command.createEditionTasks({
118 videoId: 42, 118 videoId: 42,
119 tasks: VideoEditorCommand.getComplexTask(), 119 tasks: VideoStudioCommand.getComplexTask(),
120 expectedStatus: HttpStatusCode.NOT_FOUND_404 120 expectedStatus: HttpStatusCode.NOT_FOUND_404
121 }) 121 })
122 }) 122 })
@@ -132,7 +132,7 @@ describe('Test video editor API validator', function () {
132 132
133 await command.createEditionTasks({ 133 await command.createEditionTasks({
134 videoId: uuid, 134 videoId: uuid,
135 tasks: VideoEditorCommand.getComplexTask(), 135 tasks: VideoStudioCommand.getComplexTask(),
136 expectedStatus: HttpStatusCode.CONFLICT_409 136 expectedStatus: HttpStatusCode.CONFLICT_409
137 }) 137 })
138 138
@@ -171,7 +171,7 @@ describe('Test video editor API validator', function () {
171 }) 171 })
172 172
173 it('Should fail with too many tasks', async function () { 173 it('Should fail with too many tasks', async function () {
174 const tasks: VideoEditorTask[] = [] 174 const tasks: VideoStudioTask[] = []
175 175
176 for (let i = 0; i < 110; i++) { 176 for (let i = 0; i < 110; i++) {
177 tasks.push({ 177 tasks.push({
@@ -194,7 +194,7 @@ describe('Test video editor API validator', function () {
194 194
195 await command.createEditionTasks({ 195 await command.createEditionTasks({
196 videoId: videoUUID, 196 videoId: videoUUID,
197 tasks: VideoEditorCommand.getComplexTask(), 197 tasks: VideoStudioCommand.getComplexTask(),
198 expectedStatus: HttpStatusCode.NO_CONTENT_204 198 expectedStatus: HttpStatusCode.NO_CONTENT_204
199 }) 199 })
200 }) 200 })
@@ -204,7 +204,7 @@ describe('Test video editor API validator', function () {
204 204
205 await command.createEditionTasks({ 205 await command.createEditionTasks({
206 videoId: videoUUID, 206 videoId: videoUUID,
207 tasks: VideoEditorCommand.getComplexTask(), 207 tasks: VideoStudioCommand.getComplexTask(),
208 expectedStatus: HttpStatusCode.CONFLICT_409 208 expectedStatus: HttpStatusCode.CONFLICT_409
209 }) 209 })
210 210