Skip to content

Commit a598fba

Browse files
committed
chore(snapshot): update snapshot
1 parent 5637b68 commit a598fba

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

config/gulp-tasks/test.js

+10-9
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,23 @@ module.exports = function(gulp, argv) {
108108
}
109109

110110
function protractor(done, args) {
111-
var child = cp.spawn('node', [
112-
path.resolve(projectRoot, 'node_modules/.bin/protractor')
113-
].concat(args), {
111+
var errored = false;
112+
var child = cp.spawn('protractor', args, {
114113
stdio: [process.stdin, process.stdout, 'pipe']
115114
});
116115

117-
var finish = _.once(function(err) {
118-
err && done(err) || done();
116+
child.stderr.on('data', function(data) {
119117
protractorHttpServer.close();
120-
});
118+
console.error(data.toString());
119+
if (!errored) {
120+
errored = true;
121+
done('Protractor tests failed.');
122+
}
121123

122-
child.stderr.on('data', function(data) {
123-
finish('Protractor tests failed. Error:', data.toString());
124124
});
125125
child.on('exit', function() {
126-
finish();
126+
protractorHttpServer.close();
127+
done();
127128
});
128129
}
129130
};

config/lib/ionic-snapshot.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var IonicSnapshot = function(options) {
2424
self.height = browser.params.height || -1;
2525
self.highestMismatch = 0;
2626
self.screenshotRequestPromises = [];
27-
self.ptor = protractor.getInstance();
27+
// browser = protractor.getInstance();
2828

2929
self.flow = protractor.promise.controlFlow();
3030

@@ -74,7 +74,7 @@ var IonicSnapshot = function(options) {
7474

7575
browser.waitForAngular().then(function(){
7676

77-
self.ptor.getCurrentUrl().then(function(currentUrl) {
77+
browser.getCurrentUrl().then(function(currentUrl) {
7878

7979
browser.sleep(self.sleepBetweenSpecs).then(function(){
8080

config/protractor.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports.config = {
88
// include glob patterns.
99
specs: [
1010
path.resolve(projectRoot, 'test/css/**/*.scenario.js'),
11-
path.resolve(projectRoot, 'dist/ionic-demo/**/*.scenario.js'),
11+
path.resolve(projectRoot, 'demos/**/*.scenario.js'),
1212
],
1313

1414
// Options to be passed to Jasmine-node.

0 commit comments

Comments
 (0)