From: Chocobozzz
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 = { 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: { 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 @@ 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)