From 2e8e97f313683bdf8a7448f3d1ba1f1c27f6ad50 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 17 May 2018 16:33:20 +0200 Subject: Add compatibility with browser stack --- client/e2e/protractor.conf.js | 19 ++++++++++--------- client/e2e/src/po/video-upload.po.ts | 3 +++ 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'client/e2e') 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) -- cgit v1.2.3