Skip to content

Commit 2a70267

Browse files
committed
Merge branch 'feature-sauce' into canary
2 parents a817ec9 + 50ca41d commit 2a70267

File tree

4 files changed

+32
-19
lines changed

4 files changed

+32
-19
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ language: node_js
22
node_js:
33
- '0.10'
44
- '0.11'
5+
env:
6+
global:
7+
- secure: fBqMlUrbIwaRJeKe39zxVsRcvtPIP/R98JNzrD0ycHzdfbhsWge0J7FCpdKjgRCf99ggqMhyevJafSJv7cfiVgJhB6kYudhG0G60V+vBjj4NIZnOelpVeQHXyLlekRpu+Qa/DaL43jovRAI0I11cwVfIRWtXZwiQOjCd/Elsdl8=
8+
- secure: GZ95FcH0K88RG7P0SJjoIcHLfUalFRHeu5Vd7Kh0wXTh3O6Zku7iauk6Cd+aYGuFedL5wSzht5qnVBRm10VxhhJMxHiZ+I+VBxt4bysKM0axMZ+SMTfPK3zajVVXKfzIsIYO0m0qwYtHCgSXUrMnwAczESxczxq48VxA/rCXbYc=
9+
addons:
10+
sauce_connect: true
511
before_install:
612
- gem update --system
713
- gem install sass --version "=3.3.7"

Gruntfile.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var markdown = require('marked');
33
var semver = require('semver');
44
var _s = require('underscore.string');
55
var shell = require('shelljs');
6-
var process = require('child_process');
6+
var child_process = require('child_process');
77
var Q = require('q');
88
var helpers = require('yeoman-generator').test;
99
var fs = require('fs-extra');
@@ -227,12 +227,20 @@ module.exports = function (grunt) {
227227

228228
shell.cd('test/fixtures');
229229
grunt.log.ok('installing npm dependencies for generated app');
230-
process.exec('npm install --quiet', {cwd: '../fixtures'}, function (error, stdout, stderr) {
230+
child_process.exec('npm install --quiet', {cwd: '../fixtures'}, function (error, stdout, stderr) {
231231

232232
grunt.log.ok('installing bower dependencies for generated app');
233-
process.exec('bower install', {cwd: '../fixtures'}, function (error, stdout, stderr) {
234-
shell.cd('../../');
235-
done();
233+
child_process.exec('bower install', {cwd: '../fixtures'}, function (error, stdout, stderr) {
234+
235+
if(!process.env.SAUCE_USERNAME) {
236+
child_process.exec('npm run update-webdriver', function() {
237+
shell.cd('../../');
238+
done();
239+
});
240+
} else {
241+
shell.cd('../../');
242+
done();
243+
}
236244
})
237245
});
238246
});

app/templates/protractor.conf.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ exports.config = {
1212
// with relative paths will be prepended with this.
1313
baseUrl: 'http://localhost:' + (process.env.PORT || '9000'),
1414

15-
// If true, only chromedriver will be started, not a standalone selenium.
16-
// Tests for browsers other than chrome will not run.
17-
chromeOnly: true,
15+
// Credientials for Saucelabs
16+
sauceUser: process.env.SAUCE_USERNAME,
17+
18+
sauceKey: process.env.SAUCE_ACCESS_KEY,
1819

1920
// list of files / patterns to load in the browser
2021
specs: [

test/test-file-creation.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -347,17 +347,15 @@ describe('angular-fullstack generator', function () {
347347
});
348348
});
349349

350-
// it('should run e2e tests successfully', function(done) {
351-
// this.timeout(80000);
352-
// gen.run({}, function () {
353-
// exec('npm run update-webdriver', function (error, stdout, stderr) {
354-
// exec('grunt test:e2e', function (error, stdout, stderr) {
355-
// expect(stdout, 'Client tests failed \n' + stdout ).to.contain('Done, without errors.');
356-
// done();
357-
// });
358-
// });
359-
// })
360-
// });
350+
it('should run e2e tests successfully', function(done) {
351+
this.timeout(80000);
352+
gen.run({}, function () {
353+
exec('grunt test:e2e', function (error, stdout, stderr) {
354+
expect(stdout, 'Client tests failed \n' + stdout).to.contain('0 failures');
355+
done();
356+
});
357+
});
358+
});
361359
});
362360

363361
describe('with other preprocessors and oauth', function() {

0 commit comments

Comments
 (0)