protractor.conf.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // Protractor configuration file, see link for more information
  2. // https://github.com/angular/protractor/blob/master/lib/config.ts
  3. const {SpecReporter} = require('jasmine-spec-reporter')
  4. exports.config = {
  5. allScriptsTimeout: 25000,
  6. specs: ['./src/**/*.e2e-spec.ts'],
  7. seleniumAddress: 'http://hub-cloud.browserstack.com/wd/hub',
  8. commonCapabilities: {
  9. 'browserstack.user': process.env.BROWSERSTACK_USER,
  10. 'browserstack.key': process.env.BROWSERSTACK_KEY,
  11. 'browserstack.local': true,
  12. project: 'PeerTube'
  13. },
  14. multiCapabilities: [
  15. {
  16. browserName: 'Chrome',
  17. version: '66',
  18. name: 'Latest Chrome Desktop'
  19. },
  20. {
  21. browserName: 'Safari',
  22. version: '11.1',
  23. name: 'Safari Desktop'
  24. },
  25. {
  26. browserName: 'Firefox',
  27. version: '52', // ESR,
  28. name: 'Old Firefox ESR Desktop'
  29. },
  30. {
  31. browserName: 'Firefox',
  32. version: '60',
  33. name: 'Latest Firefox Desktop'
  34. },
  35. {
  36. browserName: 'Edge',
  37. version: '16',
  38. name: 'Latest Edge Desktop'
  39. },
  40. {
  41. browserName: 'Chrome',
  42. device: 'Google Nexus 6',
  43. realMobile: 'true',
  44. os_version: '5.0',
  45. name: 'Latest Chrome Android'
  46. },
  47. {
  48. browserName: 'Safari',
  49. device: 'iPhone SE',
  50. realMobile: 'true',
  51. os_version: '11.2',
  52. name: 'Latest Safari iPhone'
  53. }
  54. ],
  55. // maxSessions: 1,
  56. // BrowserStack compatible ports: https://www.browserstack.com/question/664
  57. baseUrl: 'http://localhost:3333/',
  58. framework: 'jasmine',
  59. jasmineNodeOpts: {
  60. showColors: true,
  61. defaultTimeoutInterval: 45000,
  62. print: function() {}
  63. },
  64. onPrepare() {
  65. require('ts-node').register({
  66. project: require('path').join(__dirname, './tsconfig.e2e.json')
  67. })
  68. jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }))
  69. }
  70. }
  71. exports.config.multiCapabilities.forEach(function (caps) {
  72. for (var i in exports.config.commonCapabilities) caps[i] = caps[i] || exports.config.commonCapabilities[i]
  73. })