]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/e2e/src/videos.e2e-spec.ts
Fix browserstack badge
[github/Chocobozzz/PeerTube.git] / client / e2e / src / videos.e2e-spec.ts
index 27706a5061d3cf913e1e0b0d8695467a5e2b0ba5..b2c5ab4c63567d4f0363ca7284f968029028a7a2 100644 (file)
@@ -4,6 +4,7 @@ import { LoginPage } from './po/login.po'
 import { browser } from 'protractor'
 import { VideoUpdatePage } from './po/video-update.po'
 import { MyAccountPage } from './po/my-account'
+import { AppPage } from './po/app.po'
 
 async function skipIfUploadNotSupported () {
   if (await isMobileDevice() || await isSafari()) {
@@ -30,6 +31,7 @@ describe('Videos workflow', () => {
   let videoUpdatePage: VideoUpdatePage
   let myAccountPage: MyAccountPage
   let loginPage: LoginPage
+  let appPage: AppPage
 
   let videoName = new Date().getTime() + ' video'
   const video2Name = new Date().getTime() + ' second video'
@@ -42,6 +44,7 @@ describe('Videos workflow', () => {
     videoUpdatePage = new VideoUpdatePage()
     myAccountPage = new MyAccountPage()
     loginPage = new LoginPage()
+    appPage = new AppPage()
 
     if (await isMobileDevice()) {
       console.log('Mobile device detected.')
@@ -50,6 +53,10 @@ describe('Videos workflow', () => {
     if (await isSafari()) {
       console.log('Safari detected.')
     }
+
+    if (!await isMobileDevice()) {
+      await browser.driver.manage().window().maximize()
+    }
   })
 
   it('Should log in', async () => {
@@ -61,6 +68,12 @@ describe('Videos workflow', () => {
     return loginPage.loginAsRootUser()
   })
 
+  it('Should close the welcome modal', async () => {
+    if (await skipIfUploadNotSupported()) return
+
+    await appPage.closeWelcomeModal()
+  })
+
   it('Should upload a video', async () => {
     if (await skipIfUploadNotSupported()) return