aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2019-03-28 20:23:38 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-03-29 02:50:11 +0800
commita44f2bb6ebe6979efc3c4711147b2420aa290e15 (patch)
treeeee9e78ea003db07d547000a965a5535b55210f0 /gulpfile.js
parent649a1d483a574dcff902708f95b37329a02709a8 (diff)
downloadtangerine-wallet-browser-a44f2bb6ebe6979efc3c4711147b2420aa290e15.tar
tangerine-wallet-browser-a44f2bb6ebe6979efc3c4711147b2420aa290e15.tar.gz
tangerine-wallet-browser-a44f2bb6ebe6979efc3c4711147b2420aa290e15.tar.bz2
tangerine-wallet-browser-a44f2bb6ebe6979efc3c4711147b2420aa290e15.tar.lz
tangerine-wallet-browser-a44f2bb6ebe6979efc3c4711147b2420aa290e15.tar.xz
tangerine-wallet-browser-a44f2bb6ebe6979efc3c4711147b2420aa290e15.tar.zst
tangerine-wallet-browser-a44f2bb6ebe6979efc3c4711147b2420aa290e15.zip
Use webRequest to cancel all requests to infura in e2e tests.
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/gulpfile.js b/gulpfile.js
index c1012d5aa..f4c9fc9dd 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -195,6 +195,21 @@ gulp.task('manifest:production', function () {
.pipe(gulp.dest('./dist/', { overwrite: true }))
})
+gulp.task('manifest:testing', function () {
+ return gulp.src([
+ './dist/firefox/manifest.json',
+ './dist/chrome/manifest.json',
+ ], {base: './dist/'})
+
+ // Exclude chromereload script in production:
+ .pipe(jsoneditor(function (json) {
+ json.permissions = [...json.permissions, 'webRequestBlocking']
+ return json
+ }))
+
+ .pipe(gulp.dest('./dist/', { overwrite: true }))
+})
+
gulp.task('copy',
gulp.series(
gulp.parallel(...copyTaskNames),
@@ -212,6 +227,15 @@ gulp.task('dev:copy',
)
)
+gulp.task('test:copy',
+ gulp.series(
+ gulp.parallel(...copyDevTaskNames),
+ 'manifest:chrome',
+ 'manifest:opera',
+ 'manifest:testing'
+ )
+)
+
// scss compilation and autoprefixing tasks
gulp.task('build:scss', createScssBuildTask({
@@ -383,6 +407,18 @@ gulp.task('dev',
)
)
+gulp.task('dev:test',
+ gulp.series(
+ 'clean',
+ 'dev:scss',
+ gulp.parallel(
+ 'dev:extension:js',
+ 'test:copy',
+ 'dev:reload'
+ )
+ )
+)
+
gulp.task('dev:extension',
gulp.series(
'clean',