aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-17 16:33:20 +0200
committerChocobozzz <me@florianbigard.com>2018-05-17 16:33:20 +0200
commit2e8e97f313683bdf8a7448f3d1ba1f1c27f6ad50 (patch)
treee45869b9fab36ac394d23fc3c4cb6310de146a17
parent4b4f22fc30063bb715230b1e0f76ac25050c5a55 (diff)
downloadPeerTube-2e8e97f313683bdf8a7448f3d1ba1f1c27f6ad50.tar.gz
PeerTube-2e8e97f313683bdf8a7448f3d1ba1f1c27f6ad50.tar.zst
PeerTube-2e8e97f313683bdf8a7448f3d1ba1f1c27f6ad50.zip
Add compatibility with browser stack
-rw-r--r--README.md4
-rw-r--r--client/e2e/protractor.conf.js19
-rw-r--r--client/e2e/src/po/video-upload.po.ts3
3 files changed, 16 insertions, 10 deletions
diff --git a/README.md b/README.md
index 51c3747e8..88eac088a 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,9 @@ donating to them](https://soutenir.framasoft.org/en/).**
25 <img src="https://david-dm.org/Chocobozzz/PeerTube/dev-status.svg?path=client" alt="devDependency Status" /> 25 <img src="https://david-dm.org/Chocobozzz/PeerTube/dev-status.svg?path=client" alt="devDependency Status" />
26 </a> 26 </a>
27 27
28 <img src="http://lutim.cpy.re/js3rkfIc.png" alt="Browser Stack" /> 28 <a href="https://www.browserstack.com/automate/public-build/VXBPc0szNjUvRUNsREJQRFF6RkEvSjJBclZ4VUJBUm1hcS9RZGpUbitRST0tLWFWbjNEdVN6eEZpYTk4dGVpMkVlQWc9PQ==--644e755052bf7fe2346eb6e868be8e706718a17c%">
29 <img src='https://www.browserstack.com/automate/badge.svg?badge_key=VXBPc0szNjUvRUNsREJQRFF6RkEvSjJBclZ4VUJBUm1hcS9RZGpUbitRST0tLWFWbjNEdVN6eEZpYTk4dGVpMkVlQWc9PQ==--644e755052bf7fe2346eb6e868be8e706718a17c%'/>
30 </a>
29</p> 31</p>
30 32
31<p align="center"> 33<p align="center">
diff --git a/client/e2e/protractor.conf.js b/client/e2e/protractor.conf.js
index 932eaed51..82daa435e 100644
--- a/client/e2e/protractor.conf.js
+++ b/client/e2e/protractor.conf.js
@@ -8,16 +8,17 @@ exports.config = {
8 specs: [ 8 specs: [
9 './src/**/*.e2e-spec.ts' 9 './src/**/*.e2e-spec.ts'
10 ], 10 ],
11 multiCapabilities: [ 11
12 { 12 seleniumAddress: 'http://hub-cloud.browserstack.com/wd/hub',
13 'browserName': 'firefox', 13 capabilities: {
14 'moz:firefoxOptions': { 14 'browserstack.user': process.env.BROWSERSTACK_USER,
15 binary: 'firefox-developer' 15 'browserstack.key': process.env.BROWSERSTACK_KEY,
16 } 16 'browserName': 'chrome',
17 } 17 'browserstack.local': true,
18 ], 18 'project': 'PeerTube'
19 },
20
19 maxSessions: 1, 21 maxSessions: 1,
20 directConnect: true,
21 baseUrl: 'http://localhost:4200/', 22 baseUrl: 'http://localhost:4200/',
22 framework: 'jasmine', 23 framework: 'jasmine',
23 jasmineNodeOpts: { 24 jasmineNodeOpts: {
diff --git a/client/e2e/src/po/video-upload.po.ts b/client/e2e/src/po/video-upload.po.ts
index 4f09bb2fa..741914d2d 100644
--- a/client/e2e/src/po/video-upload.po.ts
+++ b/client/e2e/src/po/video-upload.po.ts
@@ -1,5 +1,6 @@
1import { browser, element, by } from 'protractor' 1import { browser, element, by } from 'protractor'
2import { join } from 'path' 2import { join } from 'path'
3import { FileDetector } from 'selenium-webdriver/remote'
3 4
4export class VideoUploadPage { 5export class VideoUploadPage {
5 navigateTo () { 6 navigateTo () {
@@ -7,6 +8,8 @@ export class VideoUploadPage {
7 } 8 }
8 9
9 async uploadVideo () { 10 async uploadVideo () {
11 browser.setFileDetector(new FileDetector())
12
10 const fileToUpload = join(__dirname, '../../fixtures/video.mp4') 13 const fileToUpload = join(__dirname, '../../fixtures/video.mp4')
11 14
12 await element(by.css('.upload-video-container input[type=file]')).sendKeys(fileToUpload) 15 await element(by.css('.upload-video-container input[type=file]')).sendKeys(fileToUpload)