protractor.conf.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. 'browserstack.console': 'verbose',
  13. 'browserstack.networkLogs': true,
  14. 'browserstack.debug': true,
  15. project: 'PeerTube',
  16. build: 'Main',
  17. name: 'Bstack-[Protractor] Parallel Test'
  18. },
  19. multiCapabilities: [
  20. {
  21. browserName: 'Safari',
  22. version: '11.1',
  23. name: 'Safari Desktop',
  24. resolution: '1280x1024'
  25. },
  26. {
  27. browserName: 'Chrome',
  28. name: 'Latest Chrome Desktop',
  29. resolution: '1280x1024'
  30. },
  31. {
  32. browserName: 'Firefox',
  33. version: '60', // ESR,
  34. name: 'Firefox ESR Desktop',
  35. resolution: '1280x1024'
  36. },
  37. {
  38. browserName: 'Firefox',
  39. name: 'Latest Firefox Desktop',
  40. resolution: '1280x1024'
  41. },
  42. {
  43. browserName: 'Edge',
  44. name: 'Latest Edge Desktop',
  45. resolution: '1280x1024'
  46. },
  47. {
  48. browserName: 'Chrome',
  49. device: 'Google Nexus 6',
  50. real_mobile: 'true',
  51. os_version: '5.0',
  52. name: 'Latest Chrome Android'
  53. },
  54. {
  55. browserName: 'Safari',
  56. device: 'iPhone 8 Plus',
  57. real_mobile: 'true',
  58. os_version: '11',
  59. name: 'Safari iPhone'
  60. },
  61. {
  62. browserName: 'Safari',
  63. device: 'iPad 7th',
  64. real_mobile: 'true',
  65. os_version: '13',
  66. name: 'Safari iPad'
  67. }
  68. ],
  69. // maxSessions: 1,
  70. // BrowserStack compatible ports: https://www.browserstack.com/question/664
  71. baseUrl: 'http://localhost:3333/',
  72. framework: 'jasmine',
  73. jasmineNodeOpts: {
  74. showColors: true,
  75. defaultTimeoutInterval: 45000,
  76. print: function() {}
  77. },
  78. onPrepare() {
  79. require('ts-node').register({
  80. project: require('path').join(__dirname, './tsconfig.e2e.json')
  81. })
  82. jasmine.getEnv().addReporter(new SpecReporter({
  83. spec: { displayStacktrace: 'raw' }
  84. }))
  85. }
  86. }
  87. exports.config.multiCapabilities.forEach(function (caps) {
  88. for (var i in exports.config.commonCapabilities) caps[i] = caps[i] || exports.config.commonCapabilities[i]
  89. })