aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/suites-local
diff options
context:
space:
mode:
Diffstat (limited to 'client/e2e/src/suites-local')
-rw-r--r--client/e2e/src/suites-local/custom-server-defaults.e2e-spec.ts37
-rw-r--r--client/e2e/src/suites-local/videos-list.e2e-spec.ts24
2 files changed, 61 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 @@
1import { LoginPage } from '../po/login.po'
2import { VideoUploadPage } from '../po/video-upload.po'
3import { VideoWatchPage } from '../po/video-watch.po'
4import { isMobileDevice, isSafari, waitServerUp } from '../utils'
5
6describe('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})
diff --git a/client/e2e/src/suites-local/videos-list.e2e-spec.ts b/client/e2e/src/suites-local/videos-list.e2e-spec.ts
index 1e0a88859..bca6018b9 100644
--- a/client/e2e/src/suites-local/videos-list.e2e-spec.ts
+++ b/client/e2e/src/suites-local/videos-list.e2e-spec.ts
@@ -4,6 +4,7 @@ import { MyAccountPage } from '../po/my-account'
4import { VideoListPage } from '../po/video-list.po' 4import { VideoListPage } from '../po/video-list.po'
5import { VideoSearchPage } from '../po/video-search.po' 5import { VideoSearchPage } from '../po/video-search.po'
6import { VideoUploadPage } from '../po/video-upload.po' 6import { VideoUploadPage } from '../po/video-upload.po'
7import { VideoWatchPage } from '../po/video-watch.po'
7import { NSFWPolicy } from '../types/common' 8import { NSFWPolicy } from '../types/common'
8import { isMobileDevice, isSafari, waitServerUp } from '../utils' 9import { isMobileDevice, isSafari, waitServerUp } from '../utils'
9 10
@@ -14,6 +15,7 @@ describe('Videos list', () => {
14 let loginPage: LoginPage 15 let loginPage: LoginPage
15 let myAccountPage: MyAccountPage 16 let myAccountPage: MyAccountPage
16 let videoSearchPage: VideoSearchPage 17 let videoSearchPage: VideoSearchPage
18 let videoWatchPage: VideoWatchPage
17 19
18 const seed = Math.random() 20 const seed = Math.random()
19 const nsfwVideo = seed + ' - nsfw' 21 const nsfwVideo = seed + ' - nsfw'
@@ -108,6 +110,7 @@ describe('Videos list', () => {
108 videoUploadPage = new VideoUploadPage() 110 videoUploadPage = new VideoUploadPage()
109 myAccountPage = new MyAccountPage() 111 myAccountPage = new MyAccountPage()
110 videoSearchPage = new VideoSearchPage() 112 videoSearchPage = new VideoSearchPage()
113 videoWatchPage = new VideoWatchPage(isMobileDevice(), isSafari())
111 114
112 await browser.maximizeWindow() 115 await browser.maximizeWindow()
113 }) 116 })
@@ -191,5 +194,26 @@ describe('Videos list', () => {
191 await checkCommonVideoListPages('display') 194 await checkCommonVideoListPages('display')
192 await checkSearchPage('display') 195 await checkSearchPage('display')
193 }) 196 })
197
198 after(async () => {
199 await loginPage.logout()
200 })
201 })
202
203 describe('Default upload values', function () {
204
205 it('Should have default video values', async function () {
206 await loginPage.loginAsRootUser()
207 await videoUploadPage.navigateTo()
208 await videoUploadPage.uploadVideo()
209 await videoUploadPage.validSecondUploadStep('video')
210
211 await videoWatchPage.waitWatchVideoName('video')
212
213 expect(await videoWatchPage.getPrivacy()).toBe('Public')
214 expect(await videoWatchPage.getLicence()).toBe('Unknown')
215 expect(await videoWatchPage.isDownloadEnabled()).toBeTruthy()
216 expect(await videoWatchPage.areCommentsEnabled()).toBeTruthy()
217 })
194 }) 218 })
195}) 219})