Add compatibility with browser stack

pull/581/head
Chocobozzz 2018-05-17 16:33:20 +02:00
parent 4b4f22fc30
commit 2e8e97f313
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 16 additions and 10 deletions

View File

@ -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">

View 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: {

View 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)