Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 7548a64

Browse files
committed
Merge branch 'v2'
2 parents 4fc4f1f + 6ce1402 commit 7548a64

22 files changed

+1536
-707
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
bower_components/
12
node_modules/
3+
bower_components/
4+
selenium/

Gruntfile.js

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = function(grunt) {
66
grunt.initConfig({
77
exec: {
88
casperjs : {
9-
command : 'casperjs test tests/'
9+
command : 'casperjs test tests/e2e/'
1010
}
1111
},
1212

@@ -61,14 +61,50 @@ module.exports = function(grunt) {
6161
message: 'Build Finished'
6262
}
6363
}
64+
},
65+
karma: {
66+
unit: {
67+
configFile: 'tests/karma.conf.js'
68+
},
69+
continuous: {
70+
configFile: 'tests/karma.conf.js',
71+
singleRun: true,
72+
browsers: ['PhantomJS']
73+
}
6474
}
65-
6675
});
6776

6877
require('load-grunt-tasks')(grunt);
6978

7079
grunt.registerTask('build', ['jshint', 'uglify']);
71-
grunt.registerTask('test', ['exec:casperjs']);
80+
grunt.registerTask('test', ['exec:casperjs', 'karma:continuous']);
81+
82+
grunt.registerTask('protractor', 'e2e tests for omnibinder', function () {
83+
var done = this.async();
84+
85+
if (!grunt.file.isDir('selenium')) {
86+
grunt.log.writeln('Installing selenium and chromedriver dependency');
87+
grunt.util.spawn({
88+
cmd: './node_modules/protractor/bin/install_selenium_standalone'
89+
}, function (err) {
90+
if (err) grunt.log.error(err);
91+
92+
runProtractor();
93+
});
94+
} else {
95+
runProtractor();
96+
}
97+
98+
function runProtractor() {
99+
grunt.util.spawn({
100+
cmd: './node_modules/protractor/bin/protractor',
101+
args: ['tests/protractorConf.js']
102+
}, function (err, result, code) {
103+
grunt.log.write(result);
104+
done(err);
105+
});
106+
}
107+
});
72108

73109
grunt.registerTask('default', ['build', 'test']);
74110
};

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ If you'd like to hack on AngularFire itself, you'll need
2222
```bash
2323
brew install casperjs
2424
npm install
25+
bower install
2526
```
2627

2728
Use grunt to build and test the code:

0 commit comments

Comments
 (0)