diff --git a/.travis.yml b/.travis.yml index e85da6444..68f0efc2a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -sudo: false +sudo: required dist: trusty language: node_js @@ -12,9 +12,6 @@ env: - DISTRIBUTION=copay - DISTRIBUTION=bitpay -install: - - npm install -g @angular/cli - script: - npm run apply:$DISTRIBUTION - npm run test-ci diff --git a/karma.conf.js b/karma.conf.js index 534acd842..0d8b4aa39 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -37,9 +37,9 @@ module.exports = function(config) { colors: true, logLevel: config.LOG_INFO, autoWatch: true, - browsers: ['ChromeHeadlessNoSandbox'], + browsers: ['ChromeHeadlessCI'], customLaunchers: { - ChromeHeadlessNoSandbox: { + ChromeHeadlessCI: { base: 'ChromeHeadless', // Sandbox causes Chrome to crash on Travis // https://github.com/travis-ci/travis-ci/issues/8836#issuecomment-359018652 diff --git a/package-lock.json b/package-lock.json index 1e8821b82..a116ed649 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2196,6 +2196,11 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" }, + "bindings": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", + "integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==" + }, "bip38": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/bip38/-/bip38-1.4.0.tgz", @@ -2210,6 +2215,15 @@ "scryptsy": "1.2.1" } }, + "bitauth": { + "version": "github:bitpay/bitauth#b2053a8f871d94d9d25ff99b8952387230f8f3ba", + "requires": { + "bs58": "2.0.1", + "elliptic": "6.4.0", + "karma-chrome-launcher": "2.2.0", + "secp256k1": "1.1.5" + } + }, "bitcore-lib": { "version": "0.15.0", "resolved": "https://registry.npmjs.org/bitcore-lib/-/bitcore-lib-0.15.0.tgz", @@ -7237,7 +7251,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", - "dev": true, "requires": { "null-check": "1.0.0" } @@ -10600,7 +10613,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", - "dev": true, "requires": { "fs-access": "1.0.1", "which": "1.3.0" @@ -12579,8 +12591,7 @@ "null-check": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", - "dev": true + "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=" }, "null-loader": { "version": "0.1.1", @@ -16656,6 +16667,15 @@ "resolved": "https://registry.npmjs.org/sdp/-/sdp-1.5.4.tgz", "integrity": "sha1-jgOPbdsUvXZa4fS1IW4SCUUR4NA=" }, + "secp256k1": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-1.1.5.tgz", + "integrity": "sha1-rmU9Fi4QGwvVos/AftU8sdTtA4s=", + "requires": { + "bindings": "1.3.0", + "nan": "2.8.0" + } + }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", diff --git a/protractor.conf.js b/protractor.conf.js index 53d808138..2d6dba4b9 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -1,5 +1,15 @@ +const flags = [ + '--headless', + // Sandbox causes Chrome to crash on Travis + // https://github.com/travis-ci/travis-ci/issues/8836#issuecomment-359018652 + '--no-sandbox', + '--disable-gpu' +]; + exports.config = { allScriptsTimeout: 11000, + jasmineNodeOpts: { defaultTimeoutInterval: 1000 * 60 * 10 }, + maxSessions: 1, specs: ['./e2e/**/*.e2e-spec.ts'], // Available deviceNames for mobileEmulation: https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/devtools/front_end/emulated_devices/module.json multiCapabilities: [ @@ -8,13 +18,10 @@ exports.config = { browserName: 'chrome', chromeOptions: { args: [ - '--headless', '--high-dpi-support=1', '--force-device-scale-factor=2', '--window-size=1024,720', - // Sandbox causes Chrome to crash on Travis - // https://github.com/travis-ci/travis-ci/issues/8836#issuecomment-359018652 - '--no-sandbox' + ...flags ] } }, @@ -23,11 +30,10 @@ exports.config = { browserName: 'chrome', chromeOptions: { args: [ - '--headless', '--high-dpi-support=1', '--force-device-scale-factor=2', '--window-size=800,600', - '--no-sandbox' + ...flags ] } }, @@ -36,11 +42,10 @@ exports.config = { browserName: 'chrome', chromeOptions: { args: [ - '--headless', '--high-dpi-support=1', '--force-device-scale-factor=2', '--window-size=1920,1080', - '--no-sandbox' + ...flags ] } }, @@ -51,7 +56,7 @@ exports.config = { mobileEmulation: { deviceName: 'iPhone X' }, - args: ['--headless', '--no-sandbox'] + args: [...flags] } }, { @@ -61,7 +66,7 @@ exports.config = { mobileEmulation: { deviceName: 'iPhone 8' }, - args: ['--headless', '--no-sandbox'] + args: [...flags] } }, { @@ -71,7 +76,7 @@ exports.config = { mobileEmulation: { deviceName: 'iPad' }, - args: ['--headless', '--no-sandbox'] + args: [...flags] } }, { @@ -81,7 +86,7 @@ exports.config = { mobileEmulation: { deviceName: 'iPad Pro' }, - args: ['--headless', '--no-sandbox'] + args: [...flags] } }, { @@ -91,7 +96,7 @@ exports.config = { mobileEmulation: { deviceName: 'Nexus 6P' }, - args: ['--headless', '--no-sandbox'] + args: [...flags] } }, { @@ -101,7 +106,7 @@ exports.config = { mobileEmulation: { deviceName: 'Nexus 5X' }, - args: ['--headless', '--no-sandbox'] + args: [...flags] } } ], @@ -131,12 +136,5 @@ exports.config = { showStack: true }) ); - jasmine.getEnv().addReporter( - new jasmineReporters.JUnitXmlReporter({ - savePath: process.env.JUNIT_REPORT_PATH, - outputFile: process.env.JUNIT_REPORT_NAME, - consolidateAll: true - }) - ); } };