chore(dart e2e): add --[no-]pub flag (#2171)
This flag (on by default) determines if `pub {upgrade,build}` is run before launching e2e tests. It is useful to be able to disable when tweaking the e2e tests themselves.
This commit is contained in:
parent
10568ca5b3
commit
d7ade2366a
12
gulpfile.js
12
gulpfile.js
|
@ -344,10 +344,14 @@ function runE2eDartTests(appDir, outputFile) {
|
||||||
gutil.log('http-server failed to launch over ' + deployDir);
|
gutil.log('http-server failed to launch over ' + deployDir);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var pubUpgradeSpawnInfo = spawnExt('pub', ['upgrade'], { cwd: appDir });
|
if (argv.pub === false) {
|
||||||
var prepPromise = pubUpgradeSpawnInfo.promise.then(function (data) {
|
var prepPromise = Promise.resolve(true);
|
||||||
return spawnExt('pub', ['build'], { cwd: appDir }).promise;
|
} else {
|
||||||
});
|
var pubUpgradeSpawnInfo = spawnExt('pub', ['upgrade'], { cwd: appDir });
|
||||||
|
var prepPromise = pubUpgradeSpawnInfo.promise.then(function (data) {
|
||||||
|
return spawnExt('pub', ['build'], { cwd: appDir }).promise;
|
||||||
|
});
|
||||||
|
}
|
||||||
return runProtractor(prepPromise, appDir, appRunSpawnInfo, outputFile);
|
return runProtractor(prepPromise, appDir, appRunSpawnInfo, outputFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue