diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-14 17:17:01 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-14 17:17:01 +0100 |
commit | 3cf68b869decf07ff7435fe1436d4f3134df1bf4 (patch) | |
tree | 836efe5ddc626fef3ba4c96269efbca305f46256 /client/e2e/src/suites-local/custom-server-defaults.e2e-spec.ts | |
parent | a6f919e455f2c6ae8f2194da4aa66824a6bfd09e (diff) | |
download | PeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.tar.gz PeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.tar.zst PeerTube-3cf68b869decf07ff7435fe1436d4f3134df1bf4.zip |
Ability for admins to set default upload values
Diffstat (limited to 'client/e2e/src/suites-local/custom-server-defaults.e2e-spec.ts')
-rw-r--r-- | client/e2e/src/suites-local/custom-server-defaults.e2e-spec.ts | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/client/e2e/src/suites-local/custom-server-defaults.e2e-spec.ts b/client/e2e/src/suites-local/custom-server-defaults.e2e-spec.ts new file mode 100644 index 000000000..c2c8edcc9 --- /dev/null +++ b/client/e2e/src/suites-local/custom-server-defaults.e2e-spec.ts | |||
@@ -0,0 +1,37 @@ | |||
1 | import { LoginPage } from '../po/login.po' | ||
2 | import { VideoUploadPage } from '../po/video-upload.po' | ||
3 | import { VideoWatchPage } from '../po/video-watch.po' | ||
4 | import { isMobileDevice, isSafari, waitServerUp } from '../utils' | ||
5 | |||
6 | describe('Custom server defaults', () => { | ||
7 | let videoUploadPage: VideoUploadPage | ||
8 | let loginPage: LoginPage | ||
9 | let videoWatchPage: VideoWatchPage | ||
10 | |||
11 | before(async () => { | ||
12 | await waitServerUp() | ||
13 | }) | ||
14 | |||
15 | beforeEach(async () => { | ||
16 | loginPage = new LoginPage() | ||
17 | videoUploadPage = new VideoUploadPage() | ||
18 | videoWatchPage = new VideoWatchPage(isMobileDevice(), isSafari()) | ||
19 | |||
20 | await browser.maximizeWindow() | ||
21 | }) | ||
22 | |||
23 | it('Should upload a video with custom default values', async function () { | ||
24 | await loginPage.loginAsRootUser() | ||
25 | await videoUploadPage.navigateTo() | ||
26 | await videoUploadPage.uploadVideo() | ||
27 | await videoUploadPage.validSecondUploadStep('video') | ||
28 | |||
29 | await videoWatchPage.waitWatchVideoName('video') | ||
30 | |||
31 | expect(await videoWatchPage.getPrivacy()).toBe('Internal') | ||
32 | expect(await videoWatchPage.getLicence()).toBe('Attribution - Non Commercial') | ||
33 | expect(await videoWatchPage.isDownloadEnabled()).toBeFalsy() | ||
34 | expect(await videoWatchPage.areCommentsEnabled()).toBeFalsy() | ||
35 | }) | ||
36 | |||
37 | }) | ||