|
| 1 | +// @ts-check |
| 2 | +// Protractor configuration file, see link for more information |
| 3 | +// https://github.com/angular/protractor/blob/master/lib/config.ts |
| 4 | + |
| 5 | +const { SpecReporter } = require('jasmine-spec-reporter'); |
| 6 | + |
| 7 | +const tunnelIdentifier = process.env['SAUCE_TUNNEL_IDENTIFIER']; |
| 8 | + |
| 9 | +/** |
| 10 | + * @type { import("protractor").Config } |
| 11 | + */ |
| 12 | +exports.config = { |
| 13 | + sauceUser: process.env['SAUCE_USERNAME'], |
| 14 | + sauceKey: process.env['SAUCE_ACCESS_KEY'], |
| 15 | + |
| 16 | + allScriptsTimeout: 11000, |
| 17 | + specs: ['./src/**/*.e2e-spec.ts'], |
| 18 | + |
| 19 | + multiCapabilities: [ |
| 20 | + { |
| 21 | + browserName: 'chrome', |
| 22 | + version: '41', |
| 23 | + tunnelIdentifier, |
| 24 | + }, |
| 25 | + { |
| 26 | + browserName: 'chrome', |
| 27 | + version: '75', |
| 28 | + tunnelIdentifier, |
| 29 | + }, |
| 30 | + { |
| 31 | + browserName: 'safari', |
| 32 | + platform: 'OS X 10.11', |
| 33 | + version: '9.0', |
| 34 | + tunnelIdentifier, |
| 35 | + }, |
| 36 | + // TODO: Investigate. Failure: |
| 37 | + // Failed: Error while running testForAngular: undefined is not an object (evaluating 'd.prototype[b].apply') |
| 38 | + // { |
| 39 | + // browserName: 'safari', |
| 40 | + // platform: 'OS X 10.12', |
| 41 | + // version: '10.1', |
| 42 | + // tunnelIdentifier, |
| 43 | + // }, |
| 44 | + { |
| 45 | + browserName: 'safari', |
| 46 | + platform: 'macOS 10.13', |
| 47 | + version: '11.1', |
| 48 | + tunnelIdentifier, |
| 49 | + }, |
| 50 | + { |
| 51 | + browserName: 'safari', |
| 52 | + platform: 'macOS 10.13', |
| 53 | + version: '12.1', |
| 54 | + tunnelIdentifier, |
| 55 | + }, |
| 56 | + { |
| 57 | + browserName: 'firefox', |
| 58 | + version: '48', |
| 59 | + tunnelIdentifier, |
| 60 | + }, |
| 61 | + { |
| 62 | + browserName: 'firefox', |
| 63 | + version: '60', |
| 64 | + tunnelIdentifier, |
| 65 | + }, |
| 66 | + { |
| 67 | + browserName: 'firefox', |
| 68 | + version: '68', |
| 69 | + tunnelIdentifier, |
| 70 | + }, |
| 71 | + { |
| 72 | + browserName: 'internet explorer', |
| 73 | + platform: 'Windows 8', |
| 74 | + version: '10', |
| 75 | + tunnelIdentifier, |
| 76 | + }, |
| 77 | + { |
| 78 | + browserName: 'internet explorer', |
| 79 | + platform: 'Windows 8.1', |
| 80 | + version: '11', |
| 81 | + tunnelIdentifier, |
| 82 | + }, |
| 83 | + { |
| 84 | + browserName: "MicrosoftEdge", |
| 85 | + platform: 'Windows 10', |
| 86 | + version: "14.14393", |
| 87 | + tunnelIdentifier, |
| 88 | + }, |
| 89 | + { |
| 90 | + browserName: "MicrosoftEdge", |
| 91 | + platform: 'Windows 10', |
| 92 | + version: "17.17134", |
| 93 | + tunnelIdentifier, |
| 94 | + }, |
| 95 | + { |
| 96 | + browserName: "MicrosoftEdge", |
| 97 | + platform: 'Windows 10', |
| 98 | + version: "18.17763", |
| 99 | + tunnelIdentifier, |
| 100 | + }, |
| 101 | + ], |
| 102 | + |
| 103 | + baseUrl: 'http://localhost:2000/', |
| 104 | + framework: 'jasmine', |
| 105 | + jasmineNodeOpts: { |
| 106 | + showColors: true, |
| 107 | + defaultTimeoutInterval: 30000, |
| 108 | + print: function() {}, |
| 109 | + }, |
| 110 | + |
| 111 | + onPrepare() { |
| 112 | + // Fix for Safari 12 -- https://github.com/angular/protractor/issues/4964 |
| 113 | + browser.resetUrl = 'about:blank'; |
| 114 | + |
| 115 | + require('ts-node').register({ |
| 116 | + project: require('path').join(__dirname, './tsconfig.json'), |
| 117 | + }); |
| 118 | + jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); |
| 119 | + }, |
| 120 | +}; |
0 commit comments