Skip to content

Commit 6320ba9

Browse files
committed
Merge branch 'skrustev-master'
2 parents c198831 + 2d47398 commit 6320ba9

File tree

5 files changed

+42
-10
lines changed

5 files changed

+42
-10
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
bower_components
33
dist
4-
test_out
4+
test_out
5+
coverage

.travis.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
language: node_js
22
node_js:
33
- "5"
4-
script: npm run test-single
54
before_install:
65
- export CHROME_BIN=chromium-browser
76
- export DISPLAY=:99.0
8-
- sh -e /etc/init.d/xvfb start
7+
- sh -e /etc/init.d/xvfb start
8+
- sleep 3
9+
- sudo apt-get update
10+
- sudo apt-get install -y libappindicator1 fonts-liberation
11+
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
12+
- sudo dpkg -i google-chrome*.deb
13+
script:
14+
- npm run start
15+
- sleep 3
16+
- npm run test-single
17+
- npm run protractor

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "igniteui-angular",
33
"dependencies": {},
44
"devDependencies": {
5+
"coveralls": "",
56
"grunt": "",
67
"grunt-contrib-jshint": "",
78
"grunt-contrib-uglify": "",
@@ -13,26 +14,28 @@
1314
"shelljs": "",
1415
"karma": "",
1516
"karma-jasmine": "",
17+
"karma-coverage": "",
1618
"karma-chrome-launcher": "",
1719
"karma-firefox-launcher": "",
1820
"karma-junit-reporter": ""
21+
1922
},
2023
"scripts": {
2124
"postinstall": "bower install",
2225

2326
"prestart": "npm install",
24-
"start": "http-server -a localhost -p 8000",
27+
"start": "http-server -a localhost -p 8000 &",
2528

2629
"pretest": "npm install",
2730
"test": "karma start test/karma.conf.js",
28-
"test-single": "karma start test/karma.conf.js --single-run --reporters junit,dots",
31+
"test-single": "karma start test/karma.conf.js --single-run --reporters junit,dots,coverage",
2932
"test-single-firefox": "karma start test/karma.conf.js --browsers Firefox --single-run --reporters junit,dots",
3033

3134
"preupdate-webdriver": "npm install",
3235
"update-webdriver": "webdriver-manager update",
3336

3437
"preprotractor": "npm run update-webdriver",
35-
"protractor": "npm start | protractor test/protractor-conf.js",
38+
"protractor": "protractor test/protractor-conf.js",
3639

3740
"update-index-async": "node -e \"require('shelljs/global'); sed('-i', /\\/\\/@@NG_LOADER_START@@[\\s\\S]*\\/\\/@@NG_LOADER_END@@/, '//@@NG_LOADER_START@@\\n' + cat('app/bower_components/angular-loader/angular-loader.min.js') + '\\n//@@NG_LOADER_END@@', 'app/index-async.html');\""
3841
}

test/karma.conf.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,27 @@ module.exports = function(config){
2121

2222
frameworks: ['jasmine'],
2323

24-
plugins : [ 'karma-chrome-launcher', 'karma-firefox-launcher', 'karma-jasmine', 'karma-junit-reporter' ],
24+
plugins : [ 'karma-chrome-launcher', 'karma-firefox-launcher', 'karma-jasmine', 'karma-junit-reporter', 'karma-coverage' ],
2525

26-
reporters: ['junit'],
26+
reporters: ['junit', 'coverage'],
2727

2828
junitReporter : {
2929
outputDir: './test_out',
3030
outputFile: 'unit.xml',
3131
suite: 'unit'
3232
},
3333

34+
preprocessors: {
35+
'src/*.js': ['coverage']
36+
},
37+
38+
coverageReporter: {
39+
reporters:[
40+
{ type: 'lcov', dir:'coverage/' },
41+
{ type: 'json', dir:'coverage/', file: 'coverage.json' },
42+
],
43+
},
44+
3445
browsers : ['Chrome'],
3546

3647
customLaunchers: {

test/protractor-conf.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
exports.config = {
1+
var cfg = {
22

33
allScriptsTimeout: 11000,
44

55
specs: [
66
"e2e/*.js"
77
],
8-
chromeOnly: true, //https://github.com/angular/protractor/issues/187
8+
//chromeOnly: true, //https://github.com/angular/protractor/issues/187
99
capabilities: {
1010
"browserName": "chrome"
1111
},
@@ -18,3 +18,11 @@ exports.config = {
1818
defaultTimeoutInterval: 30000
1919
}
2020
};
21+
22+
if (process.env.TRAVIS) {
23+
cfg.capabilities.chromeOptions = {
24+
'args': ['--no-sandbox']
25+
};
26+
}
27+
28+
exports.config = cfg;

0 commit comments

Comments
 (0)