aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-05-12 03:46:53 +0800
committerGitHub <noreply@github.com>2018-05-12 03:46:53 +0800
commit76ab5c04fae20dc0fd2798ad8a336a0364032aff (patch)
tree59ae2bcde6349b735a0ae542a9207a06c48ab2b9
parentbfc19e403b6b1612d60a9e191e250e5a794df4cf (diff)
parent3632ea29cc0a21448d904d985ae70ee0c13484a4 (diff)
downloadtangerine-wallet-browser-76ab5c04fae20dc0fd2798ad8a336a0364032aff.tar
tangerine-wallet-browser-76ab5c04fae20dc0fd2798ad8a336a0364032aff.tar.gz
tangerine-wallet-browser-76ab5c04fae20dc0fd2798ad8a336a0364032aff.tar.bz2
tangerine-wallet-browser-76ab5c04fae20dc0fd2798ad8a336a0364032aff.tar.lz
tangerine-wallet-browser-76ab5c04fae20dc0fd2798ad8a336a0364032aff.tar.xz
tangerine-wallet-browser-76ab5c04fae20dc0fd2798ad8a336a0364032aff.tar.zst
tangerine-wallet-browser-76ab5c04fae20dc0fd2798ad8a336a0364032aff.zip
Merge pull request #4226 from MetaMask/e2e-tests
E2E tests
-rw-r--r--.circleci/config.yml42
-rw-r--r--package-lock.json1010
-rw-r--r--package.json7
-rw-r--r--test/e2e/chrome/metamask.spec.js314
-rw-r--r--test/e2e/firefox/metamask.spec.js322
-rw-r--r--test/e2e/func.js8
-rw-r--r--test/e2e/metamask.spec.js145
-rw-r--r--test/screens/new-ui.js3
8 files changed, 1058 insertions, 793 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 88a611af3..939df8be5 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -18,10 +18,15 @@ workflows:
- test-deps:
requires:
- prep-deps-npm
- - test-e2e:
+ - test-e2e-chrome:
requires:
- prep-deps-npm
- prep-build
+ - test-e2e-firefox:
+ requires:
+ - prep-deps-npm
+ - prep-deps-firefox
+ - prep-build
- test-unit:
requires:
- prep-deps-npm
@@ -48,7 +53,8 @@ workflows:
- test-lint
- test-deps
- test-unit
- - test-e2e
+ - test-e2e-chrome
+ - test-e2e-firefox
- test-integration-mascara-chrome
- test-integration-mascara-firefox
- test-integration-flat-chrome
@@ -160,7 +166,7 @@ jobs:
name: Test
command: npx nsp check
- test-e2e:
+ test-e2e-chrome:
docker:
- image: circleci/node:8-browsers
steps:
@@ -171,7 +177,34 @@ jobs:
key: build-cache-{{ .Revision }}
- run:
name: Test
- command: npm run test:e2e
+ command: npm run test:e2e:chrome
+ - store_artifacts:
+ path: test-artifacts
+ destination: test-artifacts
+
+ test-e2e-firefox:
+ environment:
+ browsers: '["Firefox"]'
+ docker:
+ - image: circleci/node:8-browsers
+ steps:
+ - checkout
+ - restore_cache:
+ key: dependency-cache-firefox-{{ .Revision }}
+ - run:
+ name: Install firefox
+ command: >
+ sudo rm -r /opt/firefox
+ && sudo mv firefox /opt/firefox58
+ && sudo mv /usr/bin/firefox /usr/bin/firefox-old
+ && sudo ln -s /opt/firefox58/firefox /usr/bin/firefox
+ - restore_cache:
+ key: dependency-cache-{{ .Revision }}
+ - restore_cache:
+ key: build-cache-{{ .Revision }}
+ - run:
+ name: test:e2e:firefox
+ command: npm run test:e2e:firefox
- store_artifacts:
path: test-artifacts
destination: test-artifacts
@@ -335,3 +368,4 @@ jobs:
- run:
name: All Tests Passed
command: echo 'weew - everything passed!'
+ \ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 29416daf6..1bd8ecfa8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -379,11 +379,11 @@
"global": "4.3.2",
"json-loader": "0.5.7",
"postcss-flexbugs-fixes": "3.3.1",
- "postcss-loader": "2.1.4",
+ "postcss-loader": "2.1.5",
"prop-types": "15.6.1",
"qs": "6.5.1",
"serve-favicon": "2.5.0",
- "shelljs": "0.8.1",
+ "shelljs": "0.8.2",
"style-loader": "0.20.3",
"url-loader": "0.6.2",
"webpack": "3.11.0",
@@ -447,7 +447,7 @@
"dev": true,
"requires": {
"browserslist": "2.11.3",
- "caniuse-lite": "1.0.30000833",
+ "caniuse-lite": "1.0.30000836",
"normalize-range": "0.1.2",
"num2fraction": "1.2.2",
"postcss": "6.0.19",
@@ -460,7 +460,7 @@
"integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==",
"dev": true,
"requires": {
- "caniuse-lite": "1.0.30000833",
+ "caniuse-lite": "1.0.30000836",
"electron-to-chromium": "1.3.30"
}
},
@@ -471,9 +471,9 @@
"dev": true
},
"caniuse-lite": {
- "version": "1.0.30000833",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000833.tgz",
- "integrity": "sha512-tKNuKu4WLImh4NxoTgntxFpDrRiA0Q6Q1NycNhuMST0Kx+Pt8YnRDW6V8xsyH6AtO2CpAoibatEk5eaEhP3O1g==",
+ "version": "1.0.30000836",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000836.tgz",
+ "integrity": "sha512-DlVR8sVTKDgd7t95U0shX3g7MeJ/DOjKOhUcaiXqnVmnO5sG4Tn2rLVOkVfPUJgnQNxnGe8/4GK0dGSI+AagQw==",
"dev": true
},
"chalk": {
@@ -735,9 +735,9 @@
}
},
"shelljs": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.1.tgz",
- "integrity": "sha512-YA/iYtZpzFe5HyWVGrb02FjPxc4EMCfpoU/Phg9fQoyMC72u9598OUBrsU8IrtwAKG0tO8IYaqbaLIw+k3IRGA==",
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.2.tgz",
+ "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==",
"dev": true,
"requires": {
"glob": "7.1.2",
@@ -1608,6 +1608,12 @@
}
}
},
+ "adm-zip": {
+ "version": "0.4.7",
+ "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz",
+ "integrity": "sha1-hgbCy/HEJs6MjsABdER/1Jtur8E=",
+ "dev": true
+ },
"aes-js": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/aes-js/-/aes-js-0.2.4.tgz",
@@ -4540,6 +4546,12 @@
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000786.tgz",
"integrity": "sha1-G0Jc2FaNgFvFY4veSQXNhjVod0Y="
},
+ "capture-stack-trace": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz",
+ "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=",
+ "dev": true
+ },
"case-sensitive-paths-webpack-plugin": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.1.2.tgz",
@@ -4676,7 +4688,7 @@
"requires": {
"anymatch": "1.3.2",
"async-each": "1.0.1",
- "fsevents": "1.1.3",
+ "fsevents": "1.2.3",
"glob-parent": "2.0.0",
"inherits": "2.0.3",
"is-binary-path": "1.0.1",
@@ -5515,6 +5527,15 @@
"elliptic": "6.4.0"
}
},
+ "create-error-class": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz",
+ "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=",
+ "dev": true,
+ "requires": {
+ "capture-stack-trace": "1.0.0"
+ }
+ },
"create-hash": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz",
@@ -9534,195 +9555,75 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fsevents": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz",
- "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz",
+ "integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==",
"optional": true,
"requires": {
- "nan": "2.8.0",
- "node-pre-gyp": "0.6.39"
+ "nan": "2.10.0",
+ "node-pre-gyp": "0.9.1"
},
"dependencies": {
"abbrev": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
- "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=",
+ "version": "1.1.1",
+ "bundled": true,
"optional": true
},
- "ajv": {
- "version": "4.11.8",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
- "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
- "optional": true,
- "requires": {
- "co": "4.6.0",
- "json-stable-stringify": "1.0.1"
- }
- },
"ansi-regex": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
+ "bundled": true
},
"aproba": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz",
- "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=",
+ "version": "1.2.0",
+ "bundled": true,
"optional": true
},
"are-we-there-yet": {
"version": "1.1.4",
- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz",
- "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=",
+ "bundled": true,
"optional": true,
"requires": {
"delegates": "1.0.0",
- "readable-stream": "2.2.9"
+ "readable-stream": "2.3.6"
}
},
- "asn1": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
- "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=",
- "optional": true
- },
- "assert-plus": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
- "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=",
- "optional": true
- },
- "asynckit": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
- "optional": true
- },
- "aws-sign2": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
- "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=",
- "optional": true
- },
- "aws4": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
- "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=",
- "optional": true
- },
"balanced-match": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
- "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg="
- },
- "bcrypt-pbkdf": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
- "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
- "optional": true,
- "requires": {
- "tweetnacl": "0.14.5"
- }
- },
- "block-stream": {
- "version": "0.0.9",
- "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
- "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
- "requires": {
- "inherits": "2.0.3"
- }
- },
- "boom": {
- "version": "2.10.1",
- "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
- "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
- "requires": {
- "hoek": "2.16.3"
- }
+ "version": "1.0.0",
+ "bundled": true
},
"brace-expansion": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz",
- "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=",
+ "version": "1.1.11",
+ "bundled": true,
"requires": {
- "balanced-match": "0.4.2",
+ "balanced-match": "1.0.0",
"concat-map": "0.0.1"
}
},
- "buffer-shims": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
- "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E="
- },
- "caseless": {
- "version": "0.12.0",
- "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
- "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
- "optional": true
- },
- "co": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
- "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
+ "chownr": {
+ "version": "1.0.1",
+ "bundled": true,
"optional": true
},
"code-point-at": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
- },
- "combined-stream": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
- "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
- "requires": {
- "delayed-stream": "1.0.0"
- }
+ "bundled": true
},
"concat-map": {
"version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ "bundled": true
},
"console-control-strings": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
+ "bundled": true
},
"core-util-is": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
- },
- "cryptiles": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
- "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
- "requires": {
- "boom": "2.10.1"
- }
- },
- "dashdash": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
- "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
- "optional": true,
- "requires": {
- "assert-plus": "1.0.0"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "optional": true
- }
- }
+ "bundled": true,
+ "optional": true
},
"debug": {
- "version": "2.6.8",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
- "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
+ "version": "2.6.9",
+ "bundled": true,
"optional": true,
"requires": {
"ms": "2.0.0"
@@ -9730,98 +9631,38 @@
},
"deep-extend": {
"version": "0.4.2",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz",
- "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=",
+ "bundled": true,
"optional": true
},
- "delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
- },
"delegates": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
+ "bundled": true,
"optional": true
},
"detect-libc": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.2.tgz",
- "integrity": "sha1-ca1dIEvxempsqPRQxhRUBm70YeE=",
- "optional": true
- },
- "ecc-jsbn": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
- "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
- "optional": true,
- "requires": {
- "jsbn": "0.1.1"
- }
- },
- "extend": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
- "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
- "optional": true
- },
- "extsprintf": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz",
- "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA="
- },
- "forever-agent": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
- "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+ "version": "1.0.3",
+ "bundled": true,
"optional": true
},
- "form-data": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
- "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
+ "fs-minipass": {
+ "version": "1.2.5",
+ "bundled": true,
"optional": true,
"requires": {
- "asynckit": "0.4.0",
- "combined-stream": "1.0.5",
- "mime-types": "2.1.15"
+ "minipass": "2.2.4"
}
},
"fs.realpath": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
- },
- "fstream": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
- "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=",
- "requires": {
- "graceful-fs": "4.1.11",
- "inherits": "2.0.3",
- "mkdirp": "0.5.1",
- "rimraf": "2.6.1"
- }
- },
- "fstream-ignore": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz",
- "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=",
- "optional": true,
- "requires": {
- "fstream": "1.0.11",
- "inherits": "2.0.3",
- "minimatch": "3.0.4"
- }
+ "bundled": true,
+ "optional": true
},
"gauge": {
"version": "2.7.4",
- "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
- "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
+ "bundled": true,
"optional": true,
"requires": {
- "aproba": "1.1.1",
+ "aproba": "1.2.0",
"console-control-strings": "1.1.0",
"has-unicode": "2.0.1",
"object-assign": "4.1.1",
@@ -9831,27 +9672,10 @@
"wide-align": "1.1.2"
}
},
- "getpass": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
- "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
- "optional": true,
- "requires": {
- "assert-plus": "1.0.0"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "optional": true
- }
- }
- },
"glob": {
"version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "bundled": true,
+ "optional": true,
"requires": {
"fs.realpath": "1.0.0",
"inflight": "1.0.6",
@@ -9861,64 +9685,31 @@
"path-is-absolute": "1.0.1"
}
},
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
- },
- "har-schema": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz",
- "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=",
- "optional": true
- },
- "har-validator": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
- "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
- "optional": true,
- "requires": {
- "ajv": "4.11.8",
- "har-schema": "1.0.5"
- }
- },
"has-unicode": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
+ "bundled": true,
"optional": true
},
- "hawk": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
- "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
+ "iconv-lite": {
+ "version": "0.4.21",
+ "bundled": true,
+ "optional": true,
"requires": {
- "boom": "2.10.1",
- "cryptiles": "2.0.5",
- "hoek": "2.16.3",
- "sntp": "1.0.9"
+ "safer-buffer": "2.1.2"
}
},
- "hoek": {
- "version": "2.16.3",
- "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
- "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0="
- },
- "http-signature": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
- "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
+ "ignore-walk": {
+ "version": "3.0.1",
+ "bundled": true,
"optional": true,
"requires": {
- "assert-plus": "0.2.0",
- "jsprim": "1.4.0",
- "sshpk": "1.13.0"
+ "minimatch": "3.0.4"
}
},
"inflight": {
"version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "bundled": true,
+ "optional": true,
"requires": {
"once": "1.4.0",
"wrappy": "1.0.2"
@@ -9926,175 +9717,123 @@
},
"inherits": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+ "bundled": true
},
"ini": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz",
- "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=",
+ "version": "1.3.5",
+ "bundled": true,
"optional": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "bundled": true,
"requires": {
"number-is-nan": "1.0.1"
}
},
- "is-typedarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
- "optional": true
- },
"isarray": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
- },
- "isstream": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+ "bundled": true,
"optional": true
},
- "jodid25519": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz",
- "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=",
- "optional": true,
+ "minimatch": {
+ "version": "3.0.4",
+ "bundled": true,
"requires": {
- "jsbn": "0.1.1"
+ "brace-expansion": "1.1.11"
}
},
- "jsbn": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
- "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
- "optional": true
- },
- "json-schema": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
- "optional": true
+ "minimist": {
+ "version": "0.0.8",
+ "bundled": true
},
- "json-stable-stringify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
- "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
- "optional": true,
+ "minipass": {
+ "version": "2.2.4",
+ "bundled": true,
"requires": {
- "jsonify": "0.0.0"
+ "safe-buffer": "5.1.1",
+ "yallist": "3.0.2"
}
},
- "json-stringify-safe": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
- "optional": true
- },
- "jsonify": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
- "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
- "optional": true
- },
- "jsprim": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz",
- "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=",
+ "minizlib": {
+ "version": "1.1.0",
+ "bundled": true,
"optional": true,
"requires": {
- "assert-plus": "1.0.0",
- "extsprintf": "1.0.2",
- "json-schema": "0.2.3",
- "verror": "1.3.6"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "optional": true
- }
- }
- },
- "mime-db": {
- "version": "1.27.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz",
- "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE="
- },
- "mime-types": {
- "version": "2.1.15",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz",
- "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=",
- "requires": {
- "mime-db": "1.27.0"
+ "minipass": "2.2.4"
}
},
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "requires": {
- "brace-expansion": "1.1.7"
- }
- },
- "minimist": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
- },
"mkdirp": {
"version": "0.5.1",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "bundled": true,
"requires": {
"minimist": "0.0.8"
}
},
"ms": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "bundled": true,
"optional": true
},
+ "nan": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
+ "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==",
+ "optional": true
+ },
+ "needle": {
+ "version": "2.2.0",
+ "bundled": true,
+ "optional": true,
+ "requires": {
+ "debug": "2.6.9",
+ "iconv-lite": "0.4.21",
+ "sax": "1.2.4"
+ }
+ },
"node-pre-gyp": {
- "version": "0.6.39",
- "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz",
- "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==",
+ "version": "0.9.1",
+ "bundled": true,
"optional": true,
"requires": {
- "detect-libc": "1.0.2",
- "hawk": "3.1.3",
+ "detect-libc": "1.0.3",
"mkdirp": "0.5.1",
+ "needle": "2.2.0",
"nopt": "4.0.1",
- "npmlog": "4.1.0",
- "rc": "1.2.1",
- "request": "2.81.0",
- "rimraf": "2.6.1",
- "semver": "5.3.0",
- "tar": "2.2.1",
- "tar-pack": "3.4.0"
+ "npm-packlist": "1.1.10",
+ "npmlog": "4.1.2",
+ "rc": "1.2.6",
+ "rimraf": "2.6.2",
+ "semver": "5.5.0",
+ "tar": "4.4.1"
}
},
"nopt": {
"version": "4.0.1",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
- "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
+ "bundled": true,
+ "optional": true,
+ "requires": {
+ "abbrev": "1.1.1",
+ "osenv": "0.1.5"
+ }
+ },
+ "npm-bundled": {
+ "version": "1.0.3",
+ "bundled": true,
+ "optional": true
+ },
+ "npm-packlist": {
+ "version": "1.1.10",
+ "bundled": true,
"optional": true,
"requires": {
- "abbrev": "1.1.0",
- "osenv": "0.1.4"
+ "ignore-walk": "3.0.1",
+ "npm-bundled": "1.0.3"
}
},
"npmlog": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.0.tgz",
- "integrity": "sha512-ocolIkZYZt8UveuiDS0yAkkIjid1o7lPG8cYm05yNYzBn8ykQtaiPMEGp8fY9tKdDgm8okpdKzkvu1y9hUYugA==",
+ "version": "4.1.2",
+ "bundled": true,
"optional": true,
"requires": {
"are-we-there-yet": "1.1.4",
@@ -10105,45 +9844,33 @@
},
"number-is-nan": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
- },
- "oauth-sign": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
- "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=",
- "optional": true
+ "bundled": true
},
"object-assign": {
"version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "bundled": true,
"optional": true
},
"once": {
"version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "bundled": true,
"requires": {
"wrappy": "1.0.2"
}
},
"os-homedir": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
+ "bundled": true,
"optional": true
},
"os-tmpdir": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
+ "bundled": true,
"optional": true
},
"osenv": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz",
- "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=",
+ "version": "0.1.5",
+ "bundled": true,
"optional": true,
"requires": {
"os-homedir": "1.0.2",
@@ -10152,164 +9879,86 @@
},
"path-is-absolute": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
- },
- "performance-now": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz",
- "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=",
+ "bundled": true,
"optional": true
},
"process-nextick-args": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
- "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
- },
- "punycode": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
- "optional": true
- },
- "qs": {
- "version": "6.4.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz",
- "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=",
+ "version": "2.0.0",
+ "bundled": true,
"optional": true
},
"rc": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz",
- "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=",
+ "version": "1.2.6",
+ "bundled": true,
"optional": true,
"requires": {
"deep-extend": "0.4.2",
- "ini": "1.3.4",
+ "ini": "1.3.5",
"minimist": "1.2.0",
"strip-json-comments": "2.0.1"
},
"dependencies": {
"minimist": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+ "bundled": true,
"optional": true
}
}
},
"readable-stream": {
- "version": "2.2.9",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz",
- "integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=",
+ "version": "2.3.6",
+ "bundled": true,
+ "optional": true,
"requires": {
- "buffer-shims": "1.0.0",
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
- "process-nextick-args": "1.0.7",
- "string_decoder": "1.0.1",
+ "process-nextick-args": "2.0.0",
+ "safe-buffer": "5.1.1",
+ "string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
- "request": {
- "version": "2.81.0",
- "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
- "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
- "optional": true,
- "requires": {
- "aws-sign2": "0.6.0",
- "aws4": "1.6.0",
- "caseless": "0.12.0",
- "combined-stream": "1.0.5",
- "extend": "3.0.1",
- "forever-agent": "0.6.1",
- "form-data": "2.1.4",
- "har-validator": "4.2.1",
- "hawk": "3.1.3",
- "http-signature": "1.1.1",
- "is-typedarray": "1.0.0",
- "isstream": "0.1.2",
- "json-stringify-safe": "5.0.1",
- "mime-types": "2.1.15",
- "oauth-sign": "0.8.2",
- "performance-now": "0.2.0",
- "qs": "6.4.0",
- "safe-buffer": "5.0.1",
- "stringstream": "0.0.5",
- "tough-cookie": "2.3.2",
- "tunnel-agent": "0.6.0",
- "uuid": "3.0.1"
- }
- },
"rimraf": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
- "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
+ "version": "2.6.2",
+ "bundled": true,
+ "optional": true,
"requires": {
"glob": "7.1.2"
}
},
"safe-buffer": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
- "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c="
+ "version": "5.1.1",
+ "bundled": true
+ },
+ "safer-buffer": {
+ "version": "2.1.2",
+ "bundled": true,
+ "optional": true
+ },
+ "sax": {
+ "version": "1.2.4",
+ "bundled": true,
+ "optional": true
},
"semver": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
- "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
+ "version": "5.5.0",
+ "bundled": true,
"optional": true
},
"set-blocking": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+ "bundled": true,
"optional": true
},
"signal-exit": {
"version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "bundled": true,
"optional": true
},
- "sntp": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
- "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
- "requires": {
- "hoek": "2.16.3"
- }
- },
- "sshpk": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.0.tgz",
- "integrity": "sha1-/yo+T9BEl1Vf7Zezmg/YL6+zozw=",
- "optional": true,
- "requires": {
- "asn1": "0.2.3",
- "assert-plus": "1.0.0",
- "bcrypt-pbkdf": "1.0.1",
- "dashdash": "1.14.1",
- "ecc-jsbn": "0.1.1",
- "getpass": "0.1.7",
- "jodid25519": "1.0.2",
- "jsbn": "0.1.1",
- "tweetnacl": "0.14.5"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "optional": true
- }
- }
- },
"string-width": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "bundled": true,
"requires": {
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
@@ -10317,113 +9966,47 @@
}
},
"string_decoder": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
- "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=",
+ "version": "1.1.1",
+ "bundled": true,
+ "optional": true,
"requires": {
- "safe-buffer": "5.0.1"
+ "safe-buffer": "5.1.1"
}
},
- "stringstream": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
- "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=",
- "optional": true
- },
"strip-ansi": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "bundled": true,
"requires": {
"ansi-regex": "2.1.1"
}
},
"strip-json-comments": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+ "bundled": true,
"optional": true
},
"tar": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
- "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
- "requires": {
- "block-stream": "0.0.9",
- "fstream": "1.0.11",
- "inherits": "2.0.3"
- }
- },
- "tar-pack": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.0.tgz",
- "integrity": "sha1-I74tf2cagzk3bL2wuP4/3r8xeYQ=",
+ "version": "4.4.1",
+ "bundled": true,
"optional": true,
"requires": {
- "debug": "2.6.8",
- "fstream": "1.0.11",
- "fstream-ignore": "1.0.5",
- "once": "1.4.0",
- "readable-stream": "2.2.9",
- "rimraf": "2.6.1",
- "tar": "2.2.1",
- "uid-number": "0.0.6"
- }
- },
- "tough-cookie": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
- "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=",
- "optional": true,
- "requires": {
- "punycode": "1.4.1"
- }
- },
- "tunnel-agent": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
- "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
- "optional": true,
- "requires": {
- "safe-buffer": "5.0.1"
+ "chownr": "1.0.1",
+ "fs-minipass": "1.2.5",
+ "minipass": "2.2.4",
+ "minizlib": "1.1.0",
+ "mkdirp": "0.5.1",
+ "safe-buffer": "5.1.1",
+ "yallist": "3.0.2"
}
},
- "tweetnacl": {
- "version": "0.14.5",
- "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
- "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
- "optional": true
- },
- "uid-number": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz",
- "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=",
- "optional": true
- },
"util-deprecate": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
- },
- "uuid": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
- "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=",
+ "bundled": true,
"optional": true
},
- "verror": {
- "version": "1.3.6",
- "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz",
- "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=",
- "optional": true,
- "requires": {
- "extsprintf": "1.0.2"
- }
- },
"wide-align": {
"version": "1.1.2",
- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz",
- "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==",
+ "bundled": true,
"optional": true,
"requires": {
"string-width": "1.0.2"
@@ -10431,8 +10014,11 @@
},
"wrappy": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ "bundled": true
+ },
+ "yallist": {
+ "version": "3.0.2",
+ "bundled": true
}
}
},
@@ -10943,6 +10529,99 @@
"globule": "1.2.0"
}
},
+ "geckodriver": {
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-1.11.0.tgz",
+ "integrity": "sha1-KFPM1PQg00fGFULa7teCyHpxhoc=",
+ "dev": true,
+ "requires": {
+ "adm-zip": "0.4.7",
+ "bluebird": "3.4.6",
+ "got": "5.6.0",
+ "tar": "4.0.2"
+ },
+ "dependencies": {
+ "bluebird": {
+ "version": "3.4.6",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.6.tgz",
+ "integrity": "sha1-AdqNgh2HgT0ViWfnQ9X+bGLPjA8=",
+ "dev": true
+ },
+ "duplexer2": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
+ "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
+ "dev": true,
+ "requires": {
+ "readable-stream": "2.3.3"
+ }
+ },
+ "got": {
+ "version": "5.6.0",
+ "resolved": "https://registry.npmjs.org/got/-/got-5.6.0.tgz",
+ "integrity": "sha1-ux1+4WO3gIK7yOuDbz85UATqb78=",
+ "dev": true,
+ "requires": {
+ "create-error-class": "3.0.2",
+ "duplexer2": "0.1.4",
+ "is-plain-obj": "1.1.0",
+ "is-redirect": "1.0.0",
+ "is-retry-allowed": "1.1.0",
+ "is-stream": "1.1.0",
+ "lowercase-keys": "1.0.1",
+ "node-status-codes": "1.0.0",
+ "object-assign": "4.1.1",
+ "parse-json": "2.2.0",
+ "pinkie-promise": "2.0.1",
+ "read-all-stream": "3.1.0",
+ "readable-stream": "2.3.3",
+ "timed-out": "2.0.0",
+ "unzip-response": "1.0.2",
+ "url-parse-lax": "1.0.0"
+ }
+ },
+ "prepend-http": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
+ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=",
+ "dev": true
+ },
+ "tar": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-4.0.2.tgz",
+ "integrity": "sha512-4lWN4uAEWzw8aHyBUx9HWXvH3vIFEhOyvN22HfBzWpE07HaTBXM8ttSeCQpswRo5On4q3nmmYmk7Tomn0uhUaw==",
+ "dev": true,
+ "requires": {
+ "chownr": "1.0.1",
+ "minipass": "2.2.4",
+ "minizlib": "1.1.0",
+ "mkdirp": "0.5.1",
+ "yallist": "3.0.2"
+ }
+ },
+ "timed-out": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-2.0.0.tgz",
+ "integrity": "sha1-84sK6B03R9YoAB9B2vxlKs5nHAo=",
+ "dev": true
+ },
+ "url-parse-lax": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz",
+ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=",
+ "dev": true,
+ "requires": {
+ "prepend-http": "1.0.4"
+ }
+ },
+ "yallist": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz",
+ "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=",
+ "dev": true
+ }
+ }
+ },
"generate-function": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
@@ -12448,7 +12127,7 @@
"anymatch": "2.0.0",
"async-each": "1.0.1",
"braces": "2.3.1",
- "fsevents": "1.1.3",
+ "fsevents": "1.2.3",
"glob-parent": "3.1.0",
"inherits": "2.0.3",
"is-binary-path": "1.0.1",
@@ -13159,7 +12838,7 @@
"he": "1.1.1",
"param-case": "2.1.1",
"relateurl": "0.2.7",
- "uglify-js": "3.3.23"
+ "uglify-js": "3.3.24"
},
"dependencies": {
"commander": {
@@ -13175,9 +12854,9 @@
"dev": true
},
"uglify-js": {
- "version": "3.3.23",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.23.tgz",
- "integrity": "sha512-Ks+KqLGDsYn4z+pU7JsKCzC0T3mPYl+rU+VcPZiQOazjE4Uqi4UCRY3qPMDbJi7ze37n1lDXj3biz1ik93vqvw==",
+ "version": "3.3.24",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.24.tgz",
+ "integrity": "sha512-hS7+TDiqIqvWScCcKRybCQzmMnEzJ4ryl9ErRmW4GFyG48p0/dKZiy/5mVLbsFzU8CCnCgQdxMiJzZythvLzCg==",
"dev": true,
"requires": {
"commander": "2.15.1",
@@ -14254,6 +13933,12 @@
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
"integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ="
},
+ "is-redirect": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz",
+ "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=",
+ "dev": true
+ },
"is-regex": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
@@ -17449,6 +17134,33 @@
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
+ "minipass": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz",
+ "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "5.1.1",
+ "yallist": "3.0.2"
+ },
+ "dependencies": {
+ "yallist": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz",
+ "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=",
+ "dev": true
+ }
+ }
+ },
+ "minizlib": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz",
+ "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==",
+ "dev": true,
+ "requires": {
+ "minipass": "2.2.4"
+ }
+ },
"mississippi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz",
@@ -18275,6 +17987,12 @@
}
}
},
+ "node-status-codes": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz",
+ "integrity": "sha1-WuVUHQJGRdMqWPzdyc7s6nrjrC8=",
+ "dev": true
+ },
"node-uuid": {
"version": "1.4.8",
"resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
@@ -22198,9 +21916,9 @@
}
},
"postcss-loader": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.4.tgz",
- "integrity": "sha512-L2p654oK945B/gDFUGgOhh7uzj19RWoY1SVMeJVoKno1H2MdbQ0RppR/28JGju4pMb22iRC7BJ9aDzbxXSLf4A==",
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.5.tgz",
+ "integrity": "sha512-pV7kB5neJ0/1tZ8L1uGOBNTVBCSCXQoIsZMsrwvO8V2rKGa2tBl/f80GGVxow2jJnRJ2w1ocx693EKhZAb9Isg==",
"dev": true,
"requires": {
"loader-utils": "1.1.0",
@@ -23523,7 +23241,7 @@
"requires": {
"anymatch": "1.3.2",
"async-each": "1.0.1",
- "fsevents": "1.1.3",
+ "fsevents": "1.2.3",
"glob-parent": "2.0.0",
"inherits": "2.0.3",
"is-binary-path": "1.0.1",
@@ -24302,6 +24020,16 @@
"mute-stream": "0.0.7"
}
},
+ "read-all-stream": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz",
+ "integrity": "sha1-NcPhd/IHjveJ7kv6+kNzB06u9Po=",
+ "dev": true,
+ "requires": {
+ "pinkie-promise": "2.0.1",
+ "readable-stream": "2.3.3"
+ }
+ },
"read-chunk": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-2.1.0.tgz",
@@ -29104,6 +28832,12 @@
"integrity": "sha1-fx8wIFWz/qDz6B3HjrNnZstl4/E=",
"dev": true
},
+ "unzip-response": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz",
+ "integrity": "sha1-uYTwh3/AqJwsdzzB73tbIytbBv4=",
+ "dev": true
+ },
"upath": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz",
diff --git a/package.json b/package.json
index 0474efb41..72278bbed 100644
--- a/package.json
+++ b/package.json
@@ -13,8 +13,10 @@
"test:single": "cross-env METAMASK_ENV=test mocha --require test/helper.js",
"test:integration": "npm run test:integration:build && npm run test:flat && npm run test:mascara",
"test:integration:build": "gulp build:scss",
- "test:e2e": "shell-parallel -s 'npm run ganache:start' -x 'sleep 3 && npm run test:e2e:run'",
- "test:e2e:run": "mocha test/e2e/metamask.spec --recursive",
+ "test:e2e:chrome": "shell-parallel -s 'npm run ganache:start' -x 'sleep 3 && npm run test:e2e:run:chrome'",
+ "test:e2e:firefox": "shell-parallel -s 'npm run ganache:start' -x 'sleep 3 && npm run test:e2e:run:firefox'",
+ "test:e2e:run:chrome": "SELENIUM_BROWSER=chrome mocha test/e2e/chrome/metamask.spec --recursive",
+ "test:e2e:run:firefox": "SELENIUM_BROWSER=firefox mocha test/e2e/firefox/metamask.spec --recursive",
"test:screens": "shell-parallel -s 'npm run ganache:start' -x 'sleep 3 && npm run test:screens:run'",
"test:screens:run": "node test/screens/new-ui.js",
"test:coverage": "nyc npm run test:unit && npm run test:coveralls-upload",
@@ -228,6 +230,7 @@
"fs-promise": "^2.0.3",
"ganache-cli": "^6.1.0",
"ganache-core": "^2.1.0",
+ "geckodriver": "^1.11.0",
"gifencoder": "^1.1.0",
"gulp": "github:gulpjs/gulp#6d71a658c61edb3090221579d8f97dbe086ba2ed",
"gulp-babel": "^7.0.0",
diff --git a/test/e2e/chrome/metamask.spec.js b/test/e2e/chrome/metamask.spec.js
new file mode 100644
index 000000000..d72ebe1a9
--- /dev/null
+++ b/test/e2e/chrome/metamask.spec.js
@@ -0,0 +1,314 @@
+const fs = require('fs')
+const mkdirp = require('mkdirp')
+const path = require('path')
+const assert = require('assert')
+const pify = require('pify')
+const webdriver = require('selenium-webdriver')
+const until = require('selenium-webdriver/lib/until')
+const By = webdriver.By
+const { delay, buildChromeWebDriver } = require('../func')
+
+describe('Metamask popup page', function () {
+ let driver, accountAddress, tokenAddress, extensionId
+
+ this.timeout(0)
+
+ before(async function () {
+ const extPath = path.resolve('dist/chrome')
+ driver = buildChromeWebDriver(extPath)
+ await driver.get('chrome://extensions')
+ await delay(500)
+ })
+
+ afterEach(async function () {
+ if (this.currentTest.state === 'failed') {
+ await verboseReportOnFailure(this.currentTest)
+ }
+ })
+
+ after(async function () {
+ await driver.quit()
+ })
+
+ describe('Setup', function () {
+
+ it('switches to Chrome extensions list', async function () {
+ const tabs = await driver.getAllWindowHandles()
+ await driver.switchTo().window(tabs[0])
+ await delay(300)
+ })
+
+ it(`selects MetaMask's extension id and opens it in the current tab`, async function () {
+ extensionId = await getExtensionId()
+ await driver.get(`chrome-extension://${extensionId}/popup.html`)
+ await delay(500)
+ })
+
+ it('sets provider type to localhost', async function () {
+ await driver.wait(until.elementLocated(By.css('#app-content')), 300)
+ await setProviderType('localhost')
+ })
+ })
+
+ describe('Account Creation', () => {
+
+ it('matches MetaMask title', async () => {
+ const title = await driver.getTitle()
+ assert.equal(title, 'MetaMask', 'title matches MetaMask')
+ })
+
+ it('shows privacy notice', async () => {
+ await driver.wait(async () => {
+ const privacyHeader = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-center.flex-grow > h3')).getText()
+ assert.equal(privacyHeader, 'PRIVACY NOTICE', 'shows privacy notice')
+ return privacyHeader === 'PRIVACY NOTICE'
+ }, 300)
+ await driver.findElement(By.css('button')).click()
+ })
+
+ it('show terms of use', async () => {
+ await driver.wait(async () => {
+ const terms = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-center.flex-grow > h3')).getText()
+ assert.equal(terms, 'TERMS OF USE', 'shows terms of use')
+ return terms === 'TERMS OF USE'
+ })
+ })
+
+ it('checks if the TOU button is disabled', async () => {
+ const button = await driver.findElement(By.css('button')).isEnabled()
+ assert.equal(button, false, 'disabled continue button')
+ const element = await driver.findElement(By.linkText('Attributions'))
+ await driver.executeScript('arguments[0].scrollIntoView(true)', element)
+ await delay(300)
+ })
+
+ it('allows the button to be clicked when scrolled to the bottom of TOU', async () => {
+ const button = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-center.flex-grow > button'))
+ const buttonEnabled = await button.isEnabled()
+ assert.equal(buttonEnabled, true, 'enabled continue button')
+ await button.click()
+ })
+
+ it('accepts password with length of eight', async () => {
+ const passwordBox = await driver.findElement(By.id('password-box'))
+ const passwordBoxConfirm = await driver.findElement(By.id('password-box-confirm'))
+ const button = await driver.findElements(By.css('button'))
+
+ await passwordBox.sendKeys('123456789')
+ await passwordBoxConfirm.sendKeys('123456789')
+ await button[0].click()
+ await delay(500)
+ })
+
+ it('shows value was created and seed phrase', async () => {
+ await delay(300)
+ const seedPhrase = await driver.findElement(By.css('.twelve-word-phrase')).getText()
+ assert.equal(seedPhrase.split(' ').length, 12)
+ const continueAfterSeedPhrase = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > button:nth-child(4)'))
+ assert.equal(await continueAfterSeedPhrase.getText(), `I'VE COPIED IT SOMEWHERE SAFE`)
+ await continueAfterSeedPhrase.click()
+ await delay(300)
+ })
+
+ it('shows account address', async function () {
+ accountAddress = await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > div > div:nth-child(1) > flex-column > div.flex-row > div')).getText()
+ })
+
+ it('logs out of the vault', async () => {
+ await driver.findElement(By.css('.sandwich-expando')).click()
+ await delay(500)
+ const logoutButton = await driver.findElement(By.css('#app-content > div > div:nth-child(3) > span > div > li:nth-child(3)'))
+ assert.equal(await logoutButton.getText(), 'Log Out')
+ await logoutButton.click()
+ })
+
+ it('accepts account password after lock', async () => {
+ await delay(500)
+ await driver.findElement(By.id('password-box')).sendKeys('123456789')
+ await driver.findElement(By.css('button')).click()
+ await delay(500)
+ })
+
+ it('shows QR code option', async () => {
+ await delay(300)
+ await driver.findElement(By.css('.fa-ellipsis-h')).click()
+ await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div > div:nth-child(1) > flex-column > div.name-label > div > span > i > div > div > li:nth-child(3)')).click()
+ await delay(300)
+ })
+
+ it('checks QR code address is the same as account details address', async () => {
+ const QRaccountAddress = await driver.findElement(By.css('.ellip-address')).getText()
+ assert.equal(accountAddress.toLowerCase(), QRaccountAddress)
+ await driver.findElement(By.css('.fa-arrow-left')).click()
+ await delay(500)
+ })
+ })
+
+ describe('Import Ganache seed phrase', function () {
+ it('logs out', async function () {
+ await driver.findElement(By.css('.sandwich-expando')).click()
+ await delay(200)
+ const logOut = await driver.findElement(By.css('#app-content > div > div:nth-child(3) > span > div > li:nth-child(3)'))
+ assert.equal(await logOut.getText(), 'Log Out')
+ await logOut.click()
+ await delay(300)
+ })
+
+ it('restores from seed phrase', async function () {
+ const restoreSeedLink = await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > div.flex-row.flex-center.flex-grow > p'))
+ assert.equal(await restoreSeedLink.getText(), 'Restore from seed phrase')
+ await restoreSeedLink.click()
+ await delay(100)
+ })
+
+ it('adds seed phrase', async function () {
+ const testSeedPhrase = 'phrase upgrade clock rough situate wedding elder clever doctor stamp excess tent'
+ const seedTextArea = await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > textarea'))
+ await seedTextArea.sendKeys(testSeedPhrase)
+
+ await driver.findElement(By.id('password-box')).sendKeys('123456789')
+ await driver.findElement(By.id('password-box-confirm')).sendKeys('123456789')
+ await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > div > button:nth-child(2)')).click()
+ await delay(500)
+ })
+
+ it('balance renders', async function () {
+ await delay(200)
+ const balance = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div > div.flex-row > div.ether-balance.ether-balance-amount > div > div > div:nth-child(1) > div:nth-child(1)'))
+ assert.equal(await balance.getText(), '100.000')
+ await delay(200)
+ })
+
+ it('sends transaction', async function () {
+ const sendButton = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div > div.flex-row > button:nth-child(4)'))
+ assert.equal(await sendButton.getText(), 'SEND')
+ await sendButton.click()
+ await delay(200)
+ })
+
+ it('adds recipient address and amount', async function () {
+ const sendTranscationScreen = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > h3:nth-child(2)')).getText()
+ assert.equal(sendTranscationScreen, 'SEND TRANSACTION')
+ const inputAddress = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > section:nth-child(3) > div > input'))
+ const inputAmmount = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > section:nth-child(4) > input'))
+ await inputAddress.sendKeys('0x2f318C334780961FB129D2a6c30D0763d9a5C970')
+ await inputAmmount.sendKeys('10')
+ await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > section:nth-child(4) > button')).click()
+ await delay(300)
+ })
+
+ it('confirms transaction', async function () {
+ await delay(300)
+ await driver.findElement(By.css('#pending-tx-form > div.flex-row.flex-space-around.conf-buttons > input')).click()
+ await delay(500)
+ })
+
+ it('finds the transaction in the transactions list', async function () {
+ const tranasactionAmount = await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > section > section > div > div > div > div.ether-balance.ether-balance-amount > div > div > div > div:nth-child(1)'))
+ assert.equal(await tranasactionAmount.getText(), '10.0')
+ })
+ })
+
+ describe('Token Factory', function () {
+
+ it('navigates to token factory', async function () {
+ await driver.get('http://tokenfactory.surge.sh/')
+ })
+
+ it('navigates to create token contract link', async function () {
+ const createToken = await driver.findElement(By.css('#bs-example-navbar-collapse-1 > ul > li:nth-child(3) > a'))
+ await createToken.click()
+ })
+
+ it('adds input for token', async function () {
+ const totalSupply = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > div > div:nth-child(5) > input'))
+ const tokenName = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > div > div:nth-child(6) > input'))
+ const tokenDecimal = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > div > div:nth-child(7) > input'))
+ const tokenSymbol = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > div > div:nth-child(8) > input'))
+ const createToken = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > div > button'))
+
+ await totalSupply.sendKeys('100')
+ await tokenName.sendKeys('Test')
+ await tokenDecimal.sendKeys('0')
+ await tokenSymbol.sendKeys('TST')
+ await createToken.click()
+ await delay(1000)
+ })
+
+ it('confirms transaction in MetaMask popup', async function () {
+ const windowHandles = await driver.getAllWindowHandles()
+ await driver.switchTo().window(windowHandles[2])
+ const metamaskSubmit = await driver.findElement(By.css('#pending-tx-form > div.flex-row.flex-space-around.conf-buttons > input'))
+ await metamaskSubmit.click()
+ await delay(1000)
+ })
+
+ it('switches back to Token Factory to grab the token contract address', async function () {
+ const windowHandles = await driver.getAllWindowHandles()
+ await driver.switchTo().window(windowHandles[0])
+ const tokenContactAddress = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > span:nth-child(3)'))
+ tokenAddress = await tokenContactAddress.getText()
+ await delay(500)
+ })
+
+ it('navigates back to MetaMask popup in the tab', async function () {
+ await driver.get(`chrome-extension://${extensionId}/popup.html`)
+ await delay(700)
+ })
+ })
+
+ describe('Add Token', function () {
+ it('switches to the add token screen', async function () {
+ const tokensTab = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > section > div > div.inactiveForm.pointer'))
+ assert.equal(await tokensTab.getText(), 'TOKENS')
+ await tokensTab.click()
+ await delay(300)
+ })
+
+ it('navigates to the add token screen', async function () {
+ const addTokenButton = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > section > div.full-flex-height > div > button'))
+ assert.equal(await addTokenButton.getText(), 'ADD TOKEN')
+ await addTokenButton.click()
+ })
+
+ it('checks add token screen rendered', async function () {
+ const addTokenScreen = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.section-title.flex-row.flex-center > h2'))
+ assert.equal(await addTokenScreen.getText(), 'ADD TOKEN')
+ })
+
+ it('adds token parameters', async function () {
+ const tokenContractAddress = await driver.findElement(By.css('#token-address'))
+ await tokenContractAddress.sendKeys(tokenAddress)
+ await delay(300)
+ await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > button')).click()
+ await delay(100)
+ })
+
+ it('checks the token balance', async function () {
+ const tokenBalance = await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > section > div.full-flex-height > ol > li:nth-child(2) > h3'))
+ assert.equal(await tokenBalance.getText(), '100 TST')
+ })
+ })
+
+ async function getExtensionId () {
+ const extension = await driver.executeScript('return document.querySelector("extensions-manager").shadowRoot.querySelector("extensions-view-manager extensions-item-list").shadowRoot.querySelector("#container > div.items-container > extensions-item:nth-child(2)").getAttribute("id")')
+ return extension
+ }
+
+ async function setProviderType (type) {
+ await driver.executeScript('window.metamask.setProviderType(arguments[0])', type)
+ }
+
+ async function verboseReportOnFailure (test) {
+ const artifactDir = `./test-artifacts/chrome/${test.title}`
+ const filepathBase = `${artifactDir}/test-failure`
+ await pify(mkdirp)(artifactDir)
+ // capture screenshot
+ const screenshot = await driver.takeScreenshot()
+ await pify(fs.writeFile)(`${filepathBase}-screenshot.png`, screenshot, { encoding: 'base64' })
+ // capture dom source
+ const htmlSource = await driver.getPageSource()
+ await pify(fs.writeFile)(`${filepathBase}-dom.html`, htmlSource)
+ }
+
+})
diff --git a/test/e2e/firefox/metamask.spec.js b/test/e2e/firefox/metamask.spec.js
new file mode 100644
index 000000000..20b8a5092
--- /dev/null
+++ b/test/e2e/firefox/metamask.spec.js
@@ -0,0 +1,322 @@
+const fs = require('fs')
+const mkdirp = require('mkdirp')
+const path = require('path')
+const assert = require('assert')
+const pify = require('pify')
+const webdriver = require('selenium-webdriver')
+const Command = require('selenium-webdriver/lib/command').Command
+const By = webdriver.By
+const { delay, buildFirefoxWebdriver } = require('../func')
+
+describe('', function () {
+ let driver, accountAddress, tokenAddress, extensionId
+
+ this.timeout(0)
+
+ before(async function () {
+ const extPath = path.resolve('dist/firefox')
+ driver = buildFirefoxWebdriver()
+ installWebExt(driver, extPath)
+ await delay(700)
+ })
+
+ afterEach(async function () {
+ if (this.currentTest.state === 'failed') {
+ await verboseReportOnFailure(this.currentTest)
+ }
+ })
+
+ after(async function () {
+ await driver.quit()
+ })
+
+ describe('Setup', function () {
+
+ it('switches to Firefox addon list', async function () {
+ await driver.get('about:debugging#addons')
+ await delay(1000)
+ })
+
+ it(`selects MetaMask's extension id and opens it in the current tab`, async function () {
+ const tabs = await driver.getAllWindowHandles()
+ await driver.switchTo().window(tabs[0])
+ extensionId = await driver.findElement(By.css('dd.addon-target-info-content:nth-child(6) > span:nth-child(1)')).getText()
+ await driver.get(`moz-extension://${extensionId}/popup.html`)
+ await delay(500)
+ })
+
+ it('sets provider type to localhost', async function () {
+ await setProviderType('localhost')
+ await delay(300)
+ })
+ })
+
+ describe('Account Creation', () => {
+
+ it('matches MetaMask title', async () => {
+ const title = await driver.getTitle()
+ assert.equal(title, 'MetaMask', 'title matches MetaMask')
+ })
+
+ it('shows privacy notice', async () => {
+ const privacy = await driver.findElement(By.css('.terms-header')).getText()
+ assert.equal(privacy, 'PRIVACY NOTICE', 'shows privacy notice')
+ await driver.findElement(By.css('button')).click()
+ await delay(300)
+ })
+
+ it('show terms of use', async () => {
+ await delay(300)
+ const terms = await driver.findElement(By.css('.terms-header')).getText()
+ assert.equal(terms, 'TERMS OF USE', 'shows terms of use')
+ await delay(300)
+ })
+
+ it('checks if the TOU button is disabled', async () => {
+ const button = await driver.findElement(By.css('button')).isEnabled()
+ assert.equal(button, false, 'disabled continue button')
+ const element = await driver.findElement(By.linkText('Attributions'))
+ await driver.executeScript('arguments[0].scrollIntoView(true)', element)
+ await delay(300)
+ })
+
+ it('allows the button to be clicked when scrolled to the bottom of TOU', async () => {
+ const button = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-center.flex-grow > button'))
+ await delay(300)
+ const buttonEnabled = await button.isEnabled()
+ assert.equal(buttonEnabled, true, 'enabled continue button')
+ await delay(200)
+ await button.click()
+ })
+
+ it('accepts password with length of eight', async () => {
+ const passwordBox = await driver.findElement(By.id('password-box'))
+ const passwordBoxConfirm = await driver.findElement(By.id('password-box-confirm'))
+ const button = await driver.findElements(By.css('button'))
+
+ await passwordBox.sendKeys('123456789')
+ await passwordBoxConfirm.sendKeys('123456789')
+ await button[0].click()
+ await delay(500)
+ })
+
+ it('shows value was created and seed phrase', async () => {
+ await delay(300)
+ const seedPhrase = await driver.findElement(By.css('.twelve-word-phrase')).getText()
+ assert.equal(seedPhrase.split(' ').length, 12)
+ const continueAfterSeedPhrase = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > button:nth-child(4)'))
+ assert.equal(await continueAfterSeedPhrase.getText(), `I'VE COPIED IT SOMEWHERE SAFE`)
+ await continueAfterSeedPhrase.click()
+ await delay(300)
+ })
+
+ it('shows account address', async function () {
+ accountAddress = await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > div > div:nth-child(1) > flex-column > div.flex-row > div')).getText()
+ })
+
+ it('logs out of the vault', async () => {
+ await driver.findElement(By.css('.sandwich-expando')).click()
+ await delay(500)
+ const logoutButton = await driver.findElement(By.css('#app-content > div > div:nth-child(3) > span > div > li:nth-child(3)'))
+ assert.equal(await logoutButton.getText(), 'Log Out')
+ await logoutButton.click()
+ })
+
+ it('accepts account password after lock', async () => {
+ await delay(500)
+ await driver.findElement(By.id('password-box')).sendKeys('123456789')
+ await driver.findElement(By.css('button')).click()
+ await delay(500)
+ })
+
+ it('shows QR code option', async () => {
+ await delay(300)
+ await driver.findElement(By.css('.fa-ellipsis-h')).click()
+ await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div > div:nth-child(1) > flex-column > div.name-label > div > span > i > div > div > li:nth-child(3)')).click()
+ await delay(300)
+ })
+
+ it('checks QR code address is the same as account details address', async () => {
+ const QRaccountAddress = await driver.findElement(By.css('.ellip-address')).getText()
+ assert.equal(accountAddress.toLowerCase(), QRaccountAddress)
+ await driver.findElement(By.css('.fa-arrow-left')).click()
+ await delay(500)
+ })
+ })
+
+ describe('Import Ganache seed phrase', function () {
+ it('logs out', async function () {
+ await driver.findElement(By.css('.sandwich-expando')).click()
+ await delay(200)
+ const logOut = await driver.findElement(By.css('#app-content > div > div:nth-child(3) > span > div > li:nth-child(3)'))
+ assert.equal(await logOut.getText(), 'Log Out')
+ await logOut.click()
+ await delay(300)
+ })
+
+ it('restores from seed phrase', async function () {
+ const restoreSeedLink = await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > div.flex-row.flex-center.flex-grow > p'))
+ assert.equal(await restoreSeedLink.getText(), 'Restore from seed phrase')
+ await restoreSeedLink.click()
+ await delay(100)
+ })
+
+ it('adds seed phrase', async function () {
+ const testSeedPhrase = 'phrase upgrade clock rough situate wedding elder clever doctor stamp excess tent'
+ const seedTextArea = await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > textarea'))
+ await seedTextArea.sendKeys(testSeedPhrase)
+
+ await driver.findElement(By.id('password-box')).sendKeys('123456789')
+ await driver.findElement(By.id('password-box-confirm')).sendKeys('123456789')
+ await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > div > button:nth-child(2)')).click()
+ await delay(500)
+ })
+
+ it('balance renders', async function () {
+ await delay(200)
+ const balance = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div > div.flex-row > div.ether-balance.ether-balance-amount > div > div > div:nth-child(1) > div:nth-child(1)'))
+ assert.equal(await balance.getText(), '100.000')
+ await delay(200)
+ })
+
+ it('sends transaction', async function () {
+ const sendButton = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div > div.flex-row > button:nth-child(4)'))
+ assert.equal(await sendButton.getText(), 'SEND')
+ await sendButton.click()
+ await delay(200)
+ })
+
+ it('adds recipient address and amount', async function () {
+ const sendTranscationScreen = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > h3:nth-child(2)')).getText()
+ assert.equal(sendTranscationScreen, 'SEND TRANSACTION')
+ const inputAddress = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > section:nth-child(3) > div > input'))
+ const inputAmmount = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > section:nth-child(4) > input'))
+ await inputAddress.sendKeys('0x2f318C334780961FB129D2a6c30D0763d9a5C970')
+ await inputAmmount.sendKeys('10')
+ await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > section:nth-child(4) > button')).click()
+ await delay(300)
+ })
+
+ it('confirms transaction', async function () {
+ await delay(300)
+ await driver.findElement(By.css('#pending-tx-form > div.flex-row.flex-space-around.conf-buttons > input')).click()
+ await delay(500)
+ })
+
+ it('finds the transaction in the transactions list', async function () {
+ const tranasactionAmount = await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > section > section > div > div > div > div.ether-balance.ether-balance-amount > div > div > div > div:nth-child(1)'))
+ assert.equal(await tranasactionAmount.getText(), '10.0')
+ })
+ })
+
+ describe('Token Factory', function () {
+
+ it('navigates to token factory', async function () {
+ await driver.get('http://tokenfactory.surge.sh/')
+ })
+
+ it('navigates to create token contract link', async function () {
+ const createToken = await driver.findElement(By.css('#bs-example-navbar-collapse-1 > ul > li:nth-child(3) > a'))
+ await createToken.click()
+ })
+
+ it('adds input for token', async function () {
+ const totalSupply = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > div > div:nth-child(5) > input'))
+ const tokenName = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > div > div:nth-child(6) > input'))
+ const tokenDecimal = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > div > div:nth-child(7) > input'))
+ const tokenSymbol = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > div > div:nth-child(8) > input'))
+ const createToken = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > div > button'))
+
+ await totalSupply.sendKeys('100')
+ await tokenName.sendKeys('Test')
+ await tokenDecimal.sendKeys('0')
+ await tokenSymbol.sendKeys('TST')
+ await createToken.click()
+ await delay(1000)
+ })
+
+ // There is an issue with blank confirmation window, but the button is still there and the driver is able to clicked (?.?)
+ it('confirms transaction in MetaMask popup', async function () {
+ const windowHandles = await driver.getAllWindowHandles()
+ await driver.switchTo().window(windowHandles[2])
+ const metamaskSubmit = await driver.findElement(By.css('#pending-tx-form > div.flex-row.flex-space-around.conf-buttons > input'))
+ await metamaskSubmit.click()
+ await delay(1000)
+ })
+
+ it('switches back to Token Factory to grab the token contract address', async function () {
+ const windowHandles = await driver.getAllWindowHandles()
+ await driver.switchTo().window(windowHandles[0])
+ const tokenContactAddress = await driver.findElement(By.css('#main > div > div > div > div:nth-child(2) > span:nth-child(3)'))
+ tokenAddress = await tokenContactAddress.getText()
+ await delay(500)
+ })
+
+ it('navigates back to MetaMask popup in the tab', async function () {
+ await driver.get(`moz-extension://${extensionId}/popup.html`)
+ await delay(700)
+ })
+ })
+
+ describe('Add Token', function () {
+ it('switches to the add token screen', async function () {
+ const tokensTab = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > section > div > div.inactiveForm.pointer'))
+ assert.equal(await tokensTab.getText(), 'TOKENS')
+ await tokensTab.click()
+ await delay(300)
+ })
+
+ it('navigates to the add token screen', async function () {
+ const addTokenButton = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > section > div.full-flex-height > div > button'))
+ assert.equal(await addTokenButton.getText(), 'ADD TOKEN')
+ await addTokenButton.click()
+ })
+
+ it('checks add token screen rendered', async function () {
+ const addTokenScreen = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.section-title.flex-row.flex-center > h2'))
+ assert.equal(await addTokenScreen.getText(), 'ADD TOKEN')
+ })
+
+ it('adds token parameters', async function () {
+ const tokenContractAddress = await driver.findElement(By.css('#token-address'))
+ await tokenContractAddress.sendKeys(tokenAddress)
+ await delay(300)
+ await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > button')).click()
+ await delay(100)
+ })
+
+ it('checks the token balance', async function () {
+ const tokenBalance = await driver.findElement(By.css('#app-content > div > div.app-primary.from-left > div > section > div.full-flex-height > ol > li:nth-child(2) > h3'))
+ assert.equal(await tokenBalance.getText(), '100 TST')
+ })
+ })
+
+ async function setProviderType(type) {
+ await driver.executeScript('window.metamask.setProviderType(arguments[0])', type)
+ }
+
+ async function verboseReportOnFailure(test) {
+ const artifactDir = `./test-artifacts/firefox/${test.title}`
+ const filepathBase = `${artifactDir}/test-failure`
+ await pify(mkdirp)(artifactDir)
+ // capture screenshot
+ const screenshot = await driver.takeScreenshot()
+ await pify(fs.writeFile)(`${filepathBase}-screenshot.png`, screenshot, { encoding: 'base64' })
+ // capture dom source
+ const htmlSource = await driver.getPageSource()
+ await pify(fs.writeFile)(`${filepathBase}-dom.html`, htmlSource)
+ }
+
+})
+
+async function installWebExt (driver, extension) {
+ const cmd = await new Command('moz-install-web-ext')
+ .setParameter('path', path.resolve(extension))
+ .setParameter('temporary', true)
+
+ await driver.getExecutor()
+ .defineCommand(cmd.getName(), 'POST', '/session/:sessionId/moz/addon/install')
+
+ return await driver.schedule(cmd, 'installWebExt(' + extension + ')')
+}
+
diff --git a/test/e2e/func.js b/test/e2e/func.js
index 733225565..4ad0ea615 100644
--- a/test/e2e/func.js
+++ b/test/e2e/func.js
@@ -1,4 +1,5 @@
require('chromedriver')
+require('geckodriver')
const webdriver = require('selenium-webdriver')
exports.delay = function delay (time) {
@@ -6,13 +7,16 @@ exports.delay = function delay (time) {
}
-exports.buildWebDriver = function buildWebDriver (extPath) {
+exports.buildChromeWebDriver = function buildChromeWebDriver (extPath) {
return new webdriver.Builder()
.withCapabilities({
chromeOptions: {
args: [`load-extension=${extPath}`],
},
})
- .forBrowser('chrome')
.build()
}
+
+exports.buildFirefoxWebdriver = function buildFirefoxWebdriver (extPath) {
+ return new webdriver.Builder().build()
+}
diff --git a/test/e2e/metamask.spec.js b/test/e2e/metamask.spec.js
deleted file mode 100644
index e0ff2a57e..000000000
--- a/test/e2e/metamask.spec.js
+++ /dev/null
@@ -1,145 +0,0 @@
-const fs = require('fs')
-const mkdirp = require('mkdirp')
-const path = require('path')
-const assert = require('assert')
-const pify = require('pify')
-const webdriver = require('selenium-webdriver')
-const By = webdriver.By
-const { delay, buildWebDriver } = require('./func')
-
-describe('Metamask popup page', function () {
- let driver
- this.seedPhase
- this.accountAddress
- this.timeout(0)
-
- before(async function () {
- const extPath = path.resolve('dist/chrome')
- driver = buildWebDriver(extPath)
- await driver.get('chrome://extensions-frame')
- const elems = await driver.findElements(By.css('.extension-list-item-wrapper'))
- const extensionId = await elems[1].getAttribute('id')
- await driver.get(`chrome-extension://${extensionId}/popup.html`)
- await delay(500)
- })
-
- afterEach(async function () {
- if (this.currentTest.state === 'failed') {
- await verboseReportOnFailure(this.currentTest)
- }
- })
-
- after(async function () {
- await driver.quit()
- })
-
- describe('#onboarding', () => {
- it('should open Metamask.io', async function () {
- const tabs = await driver.getAllWindowHandles()
- await driver.switchTo().window(tabs[0])
- await delay(300)
- await setProviderType('localhost')
- await delay(300)
- })
-
- it('should match title', async () => {
- const title = await driver.getTitle()
- assert.equal(title, 'MetaMask', 'title matches MetaMask')
- })
-
- it('should show privacy notice', async () => {
- const privacy = await driver.findElement(By.css('.terms-header')).getText()
- assert.equal(privacy, 'PRIVACY NOTICE', 'shows privacy notice')
- driver.findElement(By.css('button')).click()
- await delay(300)
- })
-
- it('should show terms of use', async () => {
- await delay(300)
- const terms = await driver.findElement(By.css('.terms-header')).getText()
- assert.equal(terms, 'TERMS OF USE', 'shows terms of use')
- await delay(300)
- })
-
- it('should be unable to continue without scolling throught the terms of use', async () => {
- const button = await driver.findElement(By.css('button')).isEnabled()
- assert.equal(button, false, 'disabled continue button')
- const element = driver.findElement(By.linkText(
- 'Attributions'
- ))
- await driver.executeScript('arguments[0].scrollIntoView(true)', element)
- await delay(300)
- })
-
- it('should be able to continue when scrolled to the bottom of terms of use', async () => {
- const button = await driver.findElement(By.css('button'))
- const buttonEnabled = await button.isEnabled()
- await delay(500)
- assert.equal(buttonEnabled, true, 'enabled continue button')
- await button.click()
- await delay(300)
- })
-
- it('should accept password with length of eight', async () => {
- const passwordBox = await driver.findElement(By.id('password-box'))
- const passwordBoxConfirm = await driver.findElement(By.id('password-box-confirm'))
- const button = driver.findElement(By.css('button'))
-
- passwordBox.sendKeys('123456789')
- passwordBoxConfirm.sendKeys('123456789')
- await delay(500)
- await button.click()
- })
-
- it('should show value was created and seed phrase', async () => {
- await delay(700)
- this.seedPhase = await driver.findElement(By.css('.twelve-word-phrase')).getText()
- const continueAfterSeedPhrase = await driver.findElement(By.css('button'))
- await continueAfterSeedPhrase.click()
- await delay(300)
- })
-
- it('should show lock account', async () => {
- await driver.findElement(By.css('.sandwich-expando')).click()
- await delay(500)
- await driver.findElement(By.css('#app-content > div > div:nth-child(3) > span > div > li:nth-child(3)')).click()
- })
-
- it('should accept account password after lock', async () => {
- await delay(500)
- await driver.findElement(By.id('password-box')).sendKeys('123456789')
- await driver.findElement(By.css('button')).click()
- await delay(500)
- })
-
- it('should show QR code option', async () => {
- await delay(300)
- await driver.findElement(By.css('.fa-ellipsis-h')).click()
- await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div > div:nth-child(1) > flex-column > div.name-label > div > span > i > div > div > li:nth-child(3)')).click()
- await delay(300)
- })
-
- it('should show the account address', async () => {
- this.accountAddress = await driver.findElement(By.css('.ellip-address')).getText()
- await driver.findElement(By.css('.fa-arrow-left')).click()
- await delay(500)
- })
- })
-
- async function setProviderType(type) {
- await driver.executeScript('window.metamask.setProviderType(arguments[0])', type)
- }
-
- async function verboseReportOnFailure(test) {
- const artifactDir = `./test-artifacts/${test.title}`
- const filepathBase = `${artifactDir}/test-failure`
- await pify(mkdirp)(artifactDir)
- // capture screenshot
- const screenshot = await driver.takeScreenshot()
- await pify(fs.writeFile)(`${filepathBase}-screenshot.png`, screenshot, { encoding: 'base64' })
- // capture dom source
- const htmlSource = await driver.getPageSource()
- await pify(fs.writeFile)(`${filepathBase}-dom.html`, htmlSource)
- }
-
-})
diff --git a/test/screens/new-ui.js b/test/screens/new-ui.js
index 91b3a9633..e176da529 100644
--- a/test/screens/new-ui.js
+++ b/test/screens/new-ui.js
@@ -39,8 +39,7 @@ async function captureAllScreens() {
const extPath = path.resolve('dist/chrome')
driver = buildWebDriver(extPath)
await driver.get('chrome://extensions-frame')
- const elems = await driver.findElements(By.css('.extension-list-item-wrapper'))
- const extensionId = await elems[1].getAttribute('id')
+ const extensionId = await driver.executeScript('return document.querySelector("extensions-manager").shadowRoot.querySelector("extensions-view-manager extensions-item-list").shadowRoot.querySelector("#container > div.items-container > extensions-item:nth-child(2)").getAttribute("id")')
await driver.get(`chrome-extension://${extensionId}/home.html`)
await delay(500)
tabs = await driver.getAllWindowHandles()