Add compatibility with browser stack
authorChocobozzz <me@florianbigard.com>
Thu, 17 May 2018 14:33:20 +0000 (16:33 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 17 May 2018 14:33:20 +0000 (16:33 +0200)
README.md
client/e2e/protractor.conf.js
client/e2e/src/po/video-upload.po.ts

index 51c3747e8755546886d4eb2332260cebb52e7e3e..88eac088a1471f5c91a11acab7eafd3692cd5b4d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -25,7 +25,9 @@ donating to them](https://soutenir.framasoft.org/en/).**
     <img src="https://david-dm.org/Chocobozzz/PeerTube/dev-status.svg?path=client" alt="devDependency Status" />
   </a>
   
-  <img src="http://lutim.cpy.re/js3rkfIc.png" alt="Browser Stack" />
+  <a href="https://www.browserstack.com/automate/public-build/VXBPc0szNjUvRUNsREJQRFF6RkEvSjJBclZ4VUJBUm1hcS9RZGpUbitRST0tLWFWbjNEdVN6eEZpYTk4dGVpMkVlQWc9PQ==--644e755052bf7fe2346eb6e868be8e706718a17c%">
+    <img src='https://www.browserstack.com/automate/badge.svg?badge_key=VXBPc0szNjUvRUNsREJQRFF6RkEvSjJBclZ4VUJBUm1hcS9RZGpUbitRST0tLWFWbjNEdVN6eEZpYTk4dGVpMkVlQWc9PQ==--644e755052bf7fe2346eb6e868be8e706718a17c%'/>
+  </a>
 </p>
 
 <p align="center">
index 932eaed51450057119173c846bd7017b4a103696..82daa435ef42409dc9da0566127c8c5cce7d8721 100644 (file)
@@ -8,16 +8,17 @@ exports.config = {
   specs: [
     './src/**/*.e2e-spec.ts'
   ],
-  multiCapabilities: [
-    {
-      'browserName': 'firefox',
-      'moz:firefoxOptions': {
-        binary: 'firefox-developer'
-      }
-    }
-  ],
+
+  seleniumAddress: 'http://hub-cloud.browserstack.com/wd/hub',
+  capabilities: {
+    'browserstack.user': process.env.BROWSERSTACK_USER,
+    'browserstack.key': process.env.BROWSERSTACK_KEY,
+    'browserName': 'chrome',
+    'browserstack.local': true,
+    'project': 'PeerTube'
+  },
+
   maxSessions: 1,
-  directConnect: true,
   baseUrl: 'http://localhost:4200/',
   framework: 'jasmine',
   jasmineNodeOpts: {
index 4f09bb2fae73b01f77c228b2466af87a2aab3869..741914d2deaab06e634cdc82fa42587f24c88ae7 100644 (file)
@@ -1,5 +1,6 @@
 import { browser, element, by } from 'protractor'
 import { join } from 'path'
+import { FileDetector } from 'selenium-webdriver/remote'
 
 export class VideoUploadPage {
   navigateTo () {
@@ -7,6 +8,8 @@ export class VideoUploadPage {
   }
 
   async uploadVideo () {
+    browser.setFileDetector(new FileDetector())
+
     const fileToUpload = join(__dirname, '../../fixtures/video.mp4')
 
     await element(by.css('.upload-video-container input[type=file]')).sendKeys(fileToUpload)