aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-20 15:36:00 +0200
committerChocobozzz <me@florianbigard.com>2021-04-20 15:36:00 +0200
commit51b66ea7cb39f075f4deb8ea92ba70f3be289769 (patch)
tree62c60473bcec76c44ebbb3b52e762eeaafc8beb3 /client/e2e/src
parent9929fbd6f4e209346cd31d05888417a94949da84 (diff)
downloadPeerTube-51b66ea7cb39f075f4deb8ea92ba70f3be289769.tar.gz
PeerTube-51b66ea7cb39f075f4deb8ea92ba70f3be289769.tar.zst
PeerTube-51b66ea7cb39f075f4deb8ea92ba70f3be289769.zip
Fix E2E tests
Diffstat (limited to 'client/e2e/src')
-rw-r--r--client/e2e/src/po/app.po.ts16
-rw-r--r--client/e2e/src/po/login.po.ts3
-rw-r--r--client/e2e/src/po/my-account.ts2
-rw-r--r--client/e2e/src/videos.e2e-spec.ts9
4 files changed, 4 insertions, 26 deletions
diff --git a/client/e2e/src/po/app.po.ts b/client/e2e/src/po/app.po.ts
deleted file mode 100644
index 3ed65399e..000000000
--- a/client/e2e/src/po/app.po.ts
+++ /dev/null
@@ -1,16 +0,0 @@
1import { browser, by, element } from 'protractor'
2
3export class AppPage {
4
5 async closeWelcomeModal () {
6 const firstHandle = await browser.getWindowHandle()
7
8 if (await element(by.css('.configure-instance-button')).isPresent() === false) return
9
10 await element(by.css('.configure-instance-button')).click()
11
12 await browser.sleep(5000)
13
14 await browser.switchTo().window(firstHandle)
15 }
16}
diff --git a/client/e2e/src/po/login.po.ts b/client/e2e/src/po/login.po.ts
index 90b65c7ea..20412ee0d 100644
--- a/client/e2e/src/po/login.po.ts
+++ b/client/e2e/src/po/login.po.ts
@@ -4,6 +4,9 @@ export class LoginPage {
4 async loginAsRootUser () { 4 async loginAsRootUser () {
5 await browser.get('/login') 5 await browser.get('/login')
6 6
7 await browser.executeScript(`window.localStorage.setItem('no_instance_config_warning_modal', 'true')`)
8 await browser.executeScript(`window.localStorage.setItem('no_welcome_modal', 'true')`)
9
7 element(by.css('input#username')).sendKeys('root') 10 element(by.css('input#username')).sendKeys('root')
8 element(by.css('input#password')).sendKeys('test1') 11 element(by.css('input#password')).sendKeys('test1')
9 12
diff --git a/client/e2e/src/po/my-account.ts b/client/e2e/src/po/my-account.ts
index 0255cee16..61d42214d 100644
--- a/client/e2e/src/po/my-account.ts
+++ b/client/e2e/src/po/my-account.ts
@@ -28,7 +28,7 @@ export class MyAccountPage {
28 } 28 }
29 29
30 validRemove () { 30 validRemove () {
31 return element(by.css('.action-button-submit')).click() 31 return element(by.css('input[type=submit]')).click()
32 } 32 }
33 33
34 countVideos (names: string[]) { 34 countVideos (names: string[]) {
diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.ts
index cb7926258..bcc810297 100644
--- a/client/e2e/src/videos.e2e-spec.ts
+++ b/client/e2e/src/videos.e2e-spec.ts
@@ -1,5 +1,4 @@
1import { browser } from 'protractor' 1import { browser } from 'protractor'
2import { AppPage } from './po/app.po'
3import { LoginPage } from './po/login.po' 2import { LoginPage } from './po/login.po'
4import { MyAccountPage } from './po/my-account' 3import { MyAccountPage } from './po/my-account'
5import { PlayerPage } from './po/player.po' 4import { PlayerPage } from './po/player.po'
@@ -23,7 +22,6 @@ describe('Videos workflow', () => {
23 let videoUpdatePage: VideoUpdatePage 22 let videoUpdatePage: VideoUpdatePage
24 let myAccountPage: MyAccountPage 23 let myAccountPage: MyAccountPage
25 let loginPage: LoginPage 24 let loginPage: LoginPage
26 let appPage: AppPage
27 let playerPage: PlayerPage 25 let playerPage: PlayerPage
28 26
29 let videoName = new Date().getTime() + ' video' 27 let videoName = new Date().getTime() + ' video'
@@ -37,7 +35,6 @@ describe('Videos workflow', () => {
37 videoUpdatePage = new VideoUpdatePage() 35 videoUpdatePage = new VideoUpdatePage()
38 myAccountPage = new MyAccountPage() 36 myAccountPage = new MyAccountPage()
39 loginPage = new LoginPage() 37 loginPage = new LoginPage()
40 appPage = new AppPage()
41 playerPage = new PlayerPage() 38 playerPage = new PlayerPage()
42 39
43 if (await isIOS()) { 40 if (await isIOS()) {
@@ -66,12 +63,6 @@ describe('Videos workflow', () => {
66 return loginPage.loginAsRootUser() 63 return loginPage.loginAsRootUser()
67 }) 64 })
68 65
69 it('Should close the welcome modal', async () => {
70 if (await skipIfUploadNotSupported()) return
71
72 await appPage.closeWelcomeModal()
73 })
74
75 it('Should upload a video', async () => { 66 it('Should upload a video', async () => {
76 if (await skipIfUploadNotSupported()) return 67 if (await skipIfUploadNotSupported()) return
77 68