UNPKG

1.33 kBJavaScriptView Raw
1/*jshint jasmine: true, node: true */
2'use strict';
3
4const path = require('path');
5const minimist = require('minimist');
6const SpecReporter = require('jasmine-spec-reporter').SpecReporter;
7const logger = require('@blackbaud/skyux-logger');
8
9// See minimist documentation regarding `argv._` https://github.com/substack/minimist
10const argv = minimist(process.argv.slice(2));
11const skyPagesConfig = require('../sky-pages/sky-pages.config').getSkyPagesConfig(argv._[0]);
12
13const chromeArgs = [
14 '--disable-extensions',
15 '--ignore-certificate-errors',
16 '--start-maximized'
17];
18
19if (argv.headless) {
20 chromeArgs.push(
21 '--headless'
22 );
23}
24
25exports.config = {
26 skyPagesConfig: skyPagesConfig,
27 allScriptsTimeout: 11000,
28 specs: [
29 path.join(
30 process.cwd(),
31 'e2e',
32 '**',
33 '*.e2e-spec.ts'
34 )
35 ],
36 capabilities: {
37 'browserName': 'chrome',
38 'chromeOptions': {
39 'args': chromeArgs
40 }
41 },
42 directConnect: true,
43 // seleniumAddress: 'http://localhost:4444/wd/hub',
44 framework: 'jasmine',
45 jasmineNodeOpts: {
46 showColors: logger.logColor,
47 defaultTimeoutInterval: 30000
48 },
49 useAllAngular2AppRoots: true,
50 beforeLaunch: function () {
51 require('ts-node').register({ ignore: false });
52 },
53
54 onPrepare: function () {
55 jasmine.getEnv().addReporter(new SpecReporter());
56 }
57};