1 // Protractor configuration
2 // https://github.com/angular/protractor/blob/master/referenceConf.js
7 // The timeout for each script run on the browser. This should be longer
8 // than the maximum time your application needs to stabilize between tasks.
9 allScriptsTimeout: 110000,
11 // A base URL for your application under test. Calls to protractor.get()
12 // with relative paths will be prepended with this.
13 baseUrl: 'http://localhost:' + (process.env.PORT || '9000'),
15 // Credientials for Saucelabs
16 sauceUser: process.env.SAUCE_USERNAME,
18 sauceKey: process.env.SAUCE_ACCESS_KEY,
20 // list of files / patterns to load in the browser
25 // Patterns to exclude.
28 // ----- Capabilities to be passed to the webdriver instance ----
30 // For a full list of available capabilities, see
31 // https://code.google.com/p/selenium/wiki/DesiredCapabilities
33 // https://code.google.com/p/selenium/source/browse/javascript/webdriver/capabilities.js
35 'browserName': 'chrome',
36 'name': 'Fullstack E2E',
37 'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
38 'build': process.env.TRAVIS_BUILD_NUMBER
41 // ----- The test framework -----
43 // Jasmine and Cucumber are fully supported as a test and assertion framework.
44 // Mocha has limited beta support. You will need to include your own
45 // assertion framework if working with mocha.
46 framework: 'jasmine2',
48 // ----- Options to be passed to minijasminenode -----
50 // See the full list at https://github.com/jasmine/jasmine-npm
52 defaultTimeoutInterval: 30000,
53 print: function() {} // for jasmine-spec-reporter
56 // Prepare environment for tests
58 serverConfig: require('./server/config/environment')
61 onPrepare: function() {
62 var SpecReporter = require('jasmine-spec-reporter');
63 // add jasmine spec reporter
64 jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: true}));
66 var serverConfig = config.params.serverConfig;
68 // Setup mongo for tests
69 var mongoose = require('mongoose');
70 mongoose.connect(serverConfig.mongo.uri, serverConfig.mongo.options); // Connect to database
74 config.params.baseUrl = config.baseUrl;
75 exports.config = config;