Merge branch 'develop' into shapeshift-logo
This commit is contained in:
commit
c75d99b7bf
|
@ -4,456 +4,456 @@ workflows:
|
|||
version: 2
|
||||
full_test:
|
||||
jobs:
|
||||
- prep-deps-npm
|
||||
- prep-deps-firefox
|
||||
- prep-build:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-docs:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-scss:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- test-lint:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- test-deps:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- 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
|
||||
- test-integration-mascara-chrome:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-scss
|
||||
- test-integration-mascara-firefox:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-deps-firefox
|
||||
- prep-scss
|
||||
- test-integration-flat-chrome:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-scss
|
||||
- test-integration-flat-firefox:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-deps-firefox
|
||||
- prep-scss
|
||||
- all-tests-pass:
|
||||
requires:
|
||||
- test-lint
|
||||
- test-unit
|
||||
- test-e2e-chrome
|
||||
- test-e2e-firefox
|
||||
- test-integration-mascara-chrome
|
||||
- test-integration-mascara-firefox
|
||||
- test-integration-flat-chrome
|
||||
- test-integration-flat-firefox
|
||||
- job-screens:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-build
|
||||
# - all-tests-pass
|
||||
- job-publish-prerelease:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-build
|
||||
- job-screens
|
||||
# - all-tests-pass
|
||||
- job-publish-release:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-build
|
||||
- prep-docs
|
||||
- job-screens
|
||||
# - all-tests-pass
|
||||
- job-publish-postrelease:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-build
|
||||
- prep-docs
|
||||
- job-screens
|
||||
- prep-deps-npm
|
||||
- prep-deps-firefox
|
||||
- prep-build:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-docs:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-scss:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- test-lint:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- test-deps:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- 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
|
||||
- test-integration-mascara-chrome:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-scss
|
||||
- test-integration-mascara-firefox:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-deps-firefox
|
||||
- prep-scss
|
||||
- test-integration-flat-chrome:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-scss
|
||||
- test-integration-flat-firefox:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-deps-firefox
|
||||
- prep-scss
|
||||
- all-tests-pass:
|
||||
requires:
|
||||
- test-lint
|
||||
- test-unit
|
||||
- test-e2e-chrome
|
||||
- test-e2e-firefox
|
||||
- test-integration-mascara-chrome
|
||||
- test-integration-mascara-firefox
|
||||
- test-integration-flat-chrome
|
||||
- test-integration-flat-firefox
|
||||
- job-screens:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-build
|
||||
# - all-tests-pass
|
||||
- job-publish-prerelease:
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-build
|
||||
- job-screens
|
||||
# - all-tests-pass
|
||||
- job-publish-release:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-build
|
||||
- prep-docs
|
||||
- job-screens
|
||||
# - all-tests-pass
|
||||
- job-publish-postrelease:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
requires:
|
||||
- prep-deps-npm
|
||||
- prep-build
|
||||
- prep-docs
|
||||
- job-screens
|
||||
# - all-tests-pass
|
||||
|
||||
jobs:
|
||||
prep-deps-npm:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Install npm 6 + deps via npm
|
||||
command: |
|
||||
sudo npm install -g npm@6.1.0 && npm install --no-save
|
||||
- save_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
paths:
|
||||
- node_modules
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Install npm 6 + deps via npm
|
||||
command: |
|
||||
sudo npm install -g npm@6.1.0 && npm install --no-save
|
||||
- save_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
paths:
|
||||
- node_modules
|
||||
prep-deps-firefox:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
- run:
|
||||
name: Download Firefox
|
||||
command: ./.circleci/scripts/firefox-download.sh
|
||||
- save_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
paths:
|
||||
- firefox
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
- run:
|
||||
name: Download Firefox
|
||||
command: ./.circleci/scripts/firefox-download.sh
|
||||
- save_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
paths:
|
||||
- firefox
|
||||
|
||||
prep-build:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: build:dist
|
||||
command: NODE_ENV='production' npm run dist
|
||||
- run:
|
||||
name: build:debug
|
||||
command: find dist/ -type f -exec md5sum {} \; | sort -k 2
|
||||
- save_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
paths:
|
||||
- dist
|
||||
- builds
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: build:dist
|
||||
command: NODE_ENV='production' npm run dist
|
||||
- run:
|
||||
name: build:debug
|
||||
command: find dist/ -type f -exec md5sum {} \; | sort -k 2
|
||||
- save_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
paths:
|
||||
- dist
|
||||
- builds
|
||||
|
||||
prep-docs:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: build:dist
|
||||
command: npm run doc
|
||||
- save_cache:
|
||||
key: docs-cache-{{ .Revision }}
|
||||
paths:
|
||||
- docs/jsdoc
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: build:dist
|
||||
command: npm run doc
|
||||
- save_cache:
|
||||
key: docs-cache-{{ .Revision }}
|
||||
paths:
|
||||
- docs/jsdoc
|
||||
|
||||
prep-scss:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Get Scss Cache key
|
||||
# this allows us to checksum against a whole directory
|
||||
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
|
||||
- run:
|
||||
name: Build for integration tests
|
||||
command: npm run test:integration:build
|
||||
- save_cache:
|
||||
key: scss-cache-{{ checksum "scss_checksum" }}
|
||||
paths:
|
||||
- ui/app/css/output
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Get Scss Cache key
|
||||
# this allows us to checksum against a whole directory
|
||||
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
|
||||
- run:
|
||||
name: Build for integration tests
|
||||
command: npm run test:integration:build
|
||||
- save_cache:
|
||||
key: scss-cache-{{ checksum "scss_checksum" }}
|
||||
paths:
|
||||
- ui/app/css/output
|
||||
|
||||
test-lint:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Test
|
||||
command: npm run lint
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Test
|
||||
command: npm run lint
|
||||
|
||||
test-deps:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Test
|
||||
command: npx nsp check
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Test
|
||||
command: npx nsp check
|
||||
|
||||
test-e2e-chrome:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: test:e2e:chrome
|
||||
command: npm run test:e2e:chrome
|
||||
- store_artifacts:
|
||||
path: test-artifacts
|
||||
destination: test-artifacts
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: test:e2e:chrome
|
||||
command: npm run test:e2e:chrome
|
||||
- store_artifacts:
|
||||
path: test-artifacts
|
||||
destination: test-artifacts
|
||||
|
||||
test-e2e-firefox:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
- run:
|
||||
name: Install firefox
|
||||
command: ./.circleci/scripts/firefox-install.sh
|
||||
- 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
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
- run:
|
||||
name: Install firefox
|
||||
command: ./.circleci/scripts/firefox-install.sh
|
||||
- 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
|
||||
|
||||
test-e2e-beta-chrome:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: test:e2e:chrome:beta
|
||||
command: npm run test:e2e:chrome:beta
|
||||
- store_artifacts:
|
||||
path: test-artifacts
|
||||
destination: test-artifacts
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: test:e2e:chrome:beta
|
||||
command: npm run test:e2e:chrome:beta
|
||||
- store_artifacts:
|
||||
path: test-artifacts
|
||||
destination: test-artifacts
|
||||
|
||||
test-e2e-beta-firefox:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
- run:
|
||||
name: Install firefox
|
||||
command: ./.circleci/scripts/firefox-install.sh
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: test:e2e:firefox:beta
|
||||
command: npm run test:e2e:firefox:beta
|
||||
- store_artifacts:
|
||||
path: test-artifacts
|
||||
destination: test-artifacts
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
- run:
|
||||
name: Install firefox
|
||||
command: ./.circleci/scripts/firefox-install.sh
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: test:e2e:firefox:beta
|
||||
command: npm run test:e2e:firefox:beta
|
||||
- store_artifacts:
|
||||
path: test-artifacts
|
||||
destination: test-artifacts
|
||||
|
||||
job-screens:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Test
|
||||
command: npm run test:screens
|
||||
- save_cache:
|
||||
key: job-screens-{{ .Revision }}
|
||||
paths:
|
||||
- test-artifacts
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Test
|
||||
command: npm run test:screens
|
||||
- save_cache:
|
||||
key: job-screens-{{ .Revision }}
|
||||
paths:
|
||||
- test-artifacts
|
||||
|
||||
job-publish-prerelease:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: job-screens-{{ .Revision }}
|
||||
- store_artifacts:
|
||||
path: dist/mascara
|
||||
destination: builds/mascara
|
||||
- store_artifacts:
|
||||
path: dist/sourcemaps
|
||||
destination: builds/sourcemaps
|
||||
- store_artifacts:
|
||||
path: builds
|
||||
destination: builds
|
||||
- store_artifacts:
|
||||
path: test-artifacts
|
||||
destination: test-artifacts
|
||||
- run:
|
||||
name: build:announce
|
||||
command: ./development/metamaskbot-build-announce.js
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: job-screens-{{ .Revision }}
|
||||
- store_artifacts:
|
||||
path: dist/mascara
|
||||
destination: builds/mascara
|
||||
- store_artifacts:
|
||||
path: dist/sourcemaps
|
||||
destination: builds/sourcemaps
|
||||
- store_artifacts:
|
||||
path: builds
|
||||
destination: builds
|
||||
- store_artifacts:
|
||||
path: test-artifacts
|
||||
destination: test-artifacts
|
||||
- run:
|
||||
name: build:announce
|
||||
command: ./development/metamaskbot-build-announce.js
|
||||
|
||||
job-publish-release:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: build:release
|
||||
command: node ./development/publish-release.js
|
||||
- run:
|
||||
name: build:release
|
||||
command: node ./development/publish-release.js
|
||||
|
||||
job-publish-postrelease:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: docs-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: job-screens-{{ .Revision }}
|
||||
- run:
|
||||
name: sentry sourcemaps upload
|
||||
command: npm run sentry:publish
|
||||
# - run:
|
||||
# name: github gh-pages docs publish
|
||||
# command: >
|
||||
# git config user.name metamaskbot
|
||||
# git config user.email admin@metamask.io
|
||||
# gh-pages -d docs/jsdocs
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: build-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: docs-cache-{{ .Revision }}
|
||||
- restore_cache:
|
||||
key: job-screens-{{ .Revision }}
|
||||
- run:
|
||||
name: sentry sourcemaps upload
|
||||
command: npm run sentry:publish
|
||||
# - run:
|
||||
# name: github gh-pages docs publish
|
||||
# command: >
|
||||
# git config user.name metamaskbot
|
||||
# git config user.email admin@metamask.io
|
||||
# gh-pages -d docs/jsdocs
|
||||
|
||||
test-unit:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: test:coverage
|
||||
command: npm run test:coverage
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: test:coverage
|
||||
command: npm run test:coverage
|
||||
|
||||
test-integration-flat-firefox:
|
||||
environment:
|
||||
browsers: '["Firefox"]'
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
- run:
|
||||
name: Install firefox
|
||||
command: ./.circleci/scripts/firefox-install.sh
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Get Scss Cache key
|
||||
# this allows us to checksum against a whole directory
|
||||
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
|
||||
- restore_cache:
|
||||
key: scss-cache-{{ checksum "scss_checksum" }}
|
||||
- run:
|
||||
name: test:integration:flat
|
||||
command: npm run test:flat
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
- run:
|
||||
name: Install firefox
|
||||
command: ./.circleci/scripts/firefox-install.sh
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Get Scss Cache key
|
||||
# this allows us to checksum against a whole directory
|
||||
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
|
||||
- restore_cache:
|
||||
key: scss-cache-{{ checksum "scss_checksum" }}
|
||||
- run:
|
||||
name: test:integration:flat
|
||||
command: npm run test:flat
|
||||
|
||||
test-integration-flat-chrome:
|
||||
environment:
|
||||
browsers: '["Chrome"]'
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Get Scss Cache key
|
||||
# this allows us to checksum against a whole directory
|
||||
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
|
||||
- restore_cache:
|
||||
key: scss-cache-{{ checksum "scss_checksum" }}
|
||||
- run:
|
||||
name: test:integration:flat
|
||||
command: npm run test:flat
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Get Scss Cache key
|
||||
# this allows us to checksum against a whole directory
|
||||
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
|
||||
- restore_cache:
|
||||
key: scss-cache-{{ checksum "scss_checksum" }}
|
||||
- run:
|
||||
name: test:integration:flat
|
||||
command: npm run test:flat
|
||||
|
||||
test-integration-mascara-firefox:
|
||||
environment:
|
||||
browsers: '["Firefox"]'
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
- run:
|
||||
name: Install firefox
|
||||
command: ./.circleci/scripts/firefox-install.sh
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Get Scss Cache key
|
||||
# this allows us to checksum against a whole directory
|
||||
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
|
||||
- restore_cache:
|
||||
key: scss-cache-{{ checksum "scss_checksum" }}
|
||||
- run:
|
||||
name: test:integration:mascara
|
||||
command: npm run test:mascara
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-firefox-{{ .Revision }}
|
||||
- run:
|
||||
name: Install firefox
|
||||
command: ./.circleci/scripts/firefox-install.sh
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Get Scss Cache key
|
||||
# this allows us to checksum against a whole directory
|
||||
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
|
||||
- restore_cache:
|
||||
key: scss-cache-{{ checksum "scss_checksum" }}
|
||||
- run:
|
||||
name: test:integration:mascara
|
||||
command: npm run test:mascara
|
||||
|
||||
test-integration-mascara-chrome:
|
||||
environment:
|
||||
browsers: '["Chrome"]'
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Get Scss Cache key
|
||||
# this allows us to checksum against a whole directory
|
||||
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
|
||||
- restore_cache:
|
||||
key: scss-cache-{{ checksum "scss_checksum" }}
|
||||
- run:
|
||||
name: test:integration:mascara
|
||||
command: npm run test:mascara
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ .Revision }}
|
||||
- run:
|
||||
name: Get Scss Cache key
|
||||
# this allows us to checksum against a whole directory
|
||||
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
|
||||
- restore_cache:
|
||||
key: scss-cache-{{ checksum "scss_checksum" }}
|
||||
- run:
|
||||
name: test:integration:mascara
|
||||
command: npm run test:mascara
|
||||
|
||||
all-tests-pass:
|
||||
docker:
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
- image: circleci/node:8.11.4-browsers
|
||||
steps:
|
||||
- run:
|
||||
name: All Tests Passed
|
||||
command: echo 'weew - everything passed!'
|
||||
- run:
|
||||
name: All Tests Passed
|
||||
command: echo 'weew - everything passed!'
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
## Current Master
|
||||
|
||||
- [#99](https://github.com/poanetwork/metamask-extension/pull/99), [#100](https://github.com/poanetwork/metamask-extension/pull/100): (Fix) Validate custom RPC
|
||||
- [#98](https://github.com/poanetwork/metamask-extension/pull/98): (Feature) Unlimited amount of custom RPC
|
||||
|
||||
## 4.8.5 Mon Aug 27 2018
|
||||
|
|
|
@ -159,6 +159,12 @@ AccountDetailScreen.prototype.render = function () {
|
|||
|
||||
h('div', {
|
||||
style: {
|
||||
width: '8em',
|
||||
display: 'inline-flex',
|
||||
marginBottom: '15px',
|
||||
},
|
||||
}, [
|
||||
h('span', {style: {
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
paddingTop: '3px',
|
||||
|
@ -167,10 +173,9 @@ AccountDetailScreen.prototype.render = function () {
|
|||
fontSize: '14px',
|
||||
fontFamily: 'Nunito Bold',
|
||||
textRendering: 'geometricPrecision',
|
||||
marginBottom: '15px',
|
||||
color: 'rgba(255, 255, 255, 0.7)',
|
||||
},
|
||||
}, checksumAddress),
|
||||
}}, checksumAddress),
|
||||
]),
|
||||
]),
|
||||
|
||||
// account ballance
|
||||
|
|
|
@ -91,10 +91,11 @@ function mapStateToProps (state) {
|
|||
|
||||
App.prototype.render = function () {
|
||||
var props = this.props
|
||||
const { isLoading, loadingMessage, transForward, network } = props
|
||||
const { isLoading, loadingMessage, transForward, network, provider } = props
|
||||
const isLoadingNetwork = network === 'loading' && props.currentView.name !== 'config' && props.currentView.name !== 'delete-rpc'
|
||||
const networkName = provider.type === 'rpc' ? `${this.getNetworkName()} (${provider.rpcTarget})` : this.getNetworkName()
|
||||
const loadMessage = loadingMessage || isLoadingNetwork ?
|
||||
`Connecting to ${this.getNetworkName()}` : null
|
||||
`Connecting to ${networkName}` : null
|
||||
log.debug('Main ui render function')
|
||||
|
||||
return (
|
||||
|
|
|
@ -51,5 +51,9 @@ LoadingIndicator.prototype.render = function () {
|
|||
|
||||
function showMessageIfAny (loadingMessage) {
|
||||
if (!loadingMessage) return null
|
||||
return h('span', loadingMessage)
|
||||
return h('span', {
|
||||
style: {
|
||||
textAlign: 'center',
|
||||
},
|
||||
}, loadingMessage)
|
||||
}
|
||||
|
|
|
@ -42,22 +42,22 @@ Network.prototype.render = function () {
|
|||
h('i.fa.fa-caret-down'),
|
||||
])
|
||||
} else {
|
||||
if (providerName === 'mainnet') {
|
||||
if (providerName === 'mainnet' || parseInt(networkNumber) === 1) {
|
||||
displayName = 'Main Network'
|
||||
hoverText = ethNetProps.props.getNetworkDisplayName(networkNumber)
|
||||
} else if (providerName === 'ropsten' || parseInt(networkNumber) === 3) {
|
||||
displayName = 'Ropsten Test Net'
|
||||
hoverText = ethNetProps.props.getNetworkDisplayName(networkNumber)
|
||||
} else if (providerName === 'sokol') {
|
||||
} else if (providerName === 'sokol' || parseInt(networkNumber) === 77) {
|
||||
displayName = 'Sokol Network'
|
||||
hoverText = ethNetProps.props.getNetworkDisplayName(networkNumber)
|
||||
} else if (providerName === 'kovan') {
|
||||
} else if (providerName === 'kovan' || parseInt(networkNumber) === 42) {
|
||||
displayName = 'Kovan Test Net'
|
||||
hoverText = ethNetProps.props.getNetworkDisplayName(networkNumber)
|
||||
} else if (providerName === 'rinkeby') {
|
||||
} else if (providerName === 'rinkeby' || parseInt(networkNumber) === 4) {
|
||||
displayName = 'Rinkeby Test Net'
|
||||
hoverText = ethNetProps.props.getNetworkDisplayName(networkNumber)
|
||||
} else if (providerName === 'poa') {
|
||||
} else if (providerName === 'poa' || parseInt(networkNumber) === 99) {
|
||||
displayName = 'POA Network'
|
||||
hoverText = ethNetProps.props.getNetworkDisplayName(networkNumber)
|
||||
} else {
|
||||
|
|
|
@ -3,6 +3,9 @@ const Component = require('react').Component
|
|||
const h = require('react-hyperscript')
|
||||
const connect = require('react-redux').connect
|
||||
const actions = require('../../ui/app/actions')
|
||||
const url = require('url')
|
||||
const http = require('http')
|
||||
const https = require('https')
|
||||
const infuraCurrencies = require('./infura-conversion.json').objects.sort((a, b) => {
|
||||
return a.quote.name.toLocaleLowerCase().localeCompare(b.quote.name.toLocaleLowerCase())
|
||||
})
|
||||
|
@ -229,7 +232,18 @@ ConfigScreen.prototype.render = function () {
|
|||
|
||||
function rpcValidation (newRpc, state) {
|
||||
if (validUrl.isWebUri(newRpc)) {
|
||||
state.dispatch(actions.setRpcTarget(newRpc))
|
||||
const rpc = url.parse(newRpc)
|
||||
const protocolName = rpc.protocol.replace(/:/g, '')
|
||||
const protocol = protocolName === 'https' ? https : http
|
||||
const options = {method: 'GET', host: rpc.hostname, port: rpc.port, path: rpc.pathname}
|
||||
const req = protocol.request(options)
|
||||
.on('response', () => {
|
||||
state.dispatch(actions.setRpcTarget(newRpc))
|
||||
})
|
||||
.on('error', () => {
|
||||
state.dispatch(actions.displayWarning('Invalid RPC endpoint'))
|
||||
})
|
||||
req.end()
|
||||
} else {
|
||||
var appendedRpc = `http://${newRpc}`
|
||||
if (validUrl.isWebUri(appendedRpc)) {
|
||||
|
|
|
@ -15139,6 +15139,11 @@
|
|||
"readable-stream": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"http": {
|
||||
"version": "0.0.0",
|
||||
"resolved": "https://registry.npmjs.org/http/-/http-0.0.0.tgz",
|
||||
"integrity": "sha1-huYybSnF0Dnen6xYSkVon5KfT3I="
|
||||
},
|
||||
"http-cache-semantics": {
|
||||
"version": "3.8.1",
|
||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz",
|
||||
|
@ -15290,6 +15295,11 @@
|
|||
"integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=",
|
||||
"dev": true
|
||||
},
|
||||
"https": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz",
|
||||
"integrity": "sha1-PDfHrhqO65ZpBKKtHpdaGUt+06Q="
|
||||
},
|
||||
"https-browserify": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
|
||||
|
|
|
@ -136,6 +136,8 @@
|
|||
"gulp-eslint": "^4.0.0",
|
||||
"gulp-sass": "^4.0.0",
|
||||
"hat": "0.0.3",
|
||||
"http": "0.0.0",
|
||||
"https": "^1.0.0",
|
||||
"human-standard-token-abi": "^1.0.2",
|
||||
"idb-global": "^2.1.0",
|
||||
"identicon.js": "^2.3.1",
|
||||
|
|
|
@ -1,125 +1,168 @@
|
|||
const webdriver = require('selenium-webdriver')
|
||||
const { By } = webdriver
|
||||
module.exports = {
|
||||
elements: {
|
||||
loader: By.css('#app-content > div > div.full-flex-height > img'),
|
||||
},
|
||||
menus: {
|
||||
sandwich: {
|
||||
menu: '.sandwich-expando',
|
||||
settings: '#app-content > div > div:nth-child(3) > span > div > li:nth-child(2)',
|
||||
logOut: '#app-content > div > div:nth-child(3) > span > div > li:nth-child(3)',
|
||||
menu: By.css('.sandwich-expando'),
|
||||
settings: By.css('#app-content > div > div:nth-child(3) > span > div > li:nth-child(2)'),
|
||||
logOut: By.css('#app-content > div > div:nth-child(3) > span > div > li:nth-child(3)'),
|
||||
textLogOut: 'Log Out',
|
||||
textSettings: 'Settings',
|
||||
},
|
||||
info: By.css('li.dropdown-menu-item:nth-child(4)'),
|
||||
},
|
||||
account: {
|
||||
menu: '#app-content > div > div.full-width > div > div:nth-child(2) > span > div',
|
||||
delete: '#app-content > div > div.full-width > div > div:nth-child(2) > span > div > div > span > div > li:nth-child(4) > div.remove',
|
||||
createAccount: '#app-content > div > div.full-width > div > div:nth-child(2) > span > div > div > span > div > li:nth-child(3) > span',
|
||||
import: '#app-content > div > div.full-width > div > div:nth-child(2) > span > div > div > span > div > li:nth-child(5) > span',
|
||||
labelImported: '#app-content > div > div.full-width > div > div:nth-child(2) > span > div > div > span > div > li:nth-child(4) > div.keyring-label',
|
||||
menu: By.css('#app-content > div > div.full-width > div > div:nth-child(2) > span > div'),
|
||||
delete: By.css('#app-content > div > div.full-width > div > div:nth-child(2) > span > div > div > span > div > li:nth-child(4) > div.remove'),
|
||||
createAccount: By.css('#app-content > div > div.full-width > div > div:nth-child(2) > span > div > div > span > div > li:nth-child(3) > span'),
|
||||
import: By.css('#app-content > div > div.full-width > div > div:nth-child(2) > span > div > div > span > div > li:nth-child(5) > span'),
|
||||
labelImported: By.css('#app-content > div > div.full-width > div > div:nth-child(2) > span > div > div > span > div > li:nth-child(4) > div.keyring-label'),
|
||||
},
|
||||
dot: {
|
||||
menu: '.account-dropdown',
|
||||
showQRcode: '#app-content > div > div.app-primary.from-right > div > div > div:nth-child(1) > flex-column > div.name-label > div > span > div > div > div > li:nth-child(3)',
|
||||
menu: By.className('account-dropdown'),
|
||||
showQRcode: By.css('#app-content > div > div.app-primary.from-right > div > div > div:nth-child(1) > flex-column > div.name-label > div > span > div > div > div > li:nth-child(3)'),
|
||||
},
|
||||
networks: {
|
||||
addedCustomRpc: By.className('span custom-rpc'),
|
||||
customRpc: By.css('#app-content > div > div:nth-child(2) > span > div > li:nth-child(9)'),
|
||||
},
|
||||
},
|
||||
screens: {
|
||||
addToken: {
|
||||
title: By.className('page-subtitle'),
|
||||
titleText: 'Add Token',
|
||||
fields: {
|
||||
contractAddress: By.id('token-address'),
|
||||
tokenSymbol: By.id('token_symbol'),
|
||||
decimals: By.id('token_decimals'),
|
||||
},
|
||||
buttonAdd: By.css('.flex-space-around > button:nth-child(7)'),
|
||||
|
||||
},
|
||||
deleteCustomRPC: {
|
||||
buttons: {
|
||||
yes: '#app-content > div > div.app-primary.from-right > div > div.flex-row.flex-right > button:nth-child(2)',
|
||||
yes: By.css('#app-content > div > div.app-primary.from-right > div > div.flex-row.flex-right > button:nth-child(2)'),
|
||||
no: By.className('btn-violet'),
|
||||
},
|
||||
titleText: 'Delete Custom RPC',
|
||||
},
|
||||
confirmTransaction: {
|
||||
buttons: {
|
||||
submit: '#pending-tx-form > div.flex-row.flex-space-around.conf-buttons > input',
|
||||
submit: By.css('#pending-tx-form > div.flex-row.flex-space-around.conf-buttons > input'),
|
||||
},
|
||||
},
|
||||
sendTransaction: {
|
||||
title: '#app-content > div > div.app-primary.from-right > div > h3:nth-child(2)',
|
||||
title: By.css('#app-content > div > div.app-primary.from-right > div > h3:nth-child(2)'),
|
||||
titleText: 'Send Transaction',
|
||||
fields: {
|
||||
address: '#app-content > div > div.app-primary.from-right > div > section:nth-child(3) > div > input',
|
||||
amount: '#app-content > div > div.app-primary.from-right > div > section:nth-child(4) > input',
|
||||
address: By.css('#app-content > div > div.app-primary.from-right > div > section:nth-child(3) > div > input'),
|
||||
amount: By.css('#app-content > div > div.app-primary.from-right > div > section:nth-child(4) > input'),
|
||||
},
|
||||
buttonNext: '#app-content > div > div.app-primary.from-right > div > section:nth-child(4) > button',
|
||||
buttonNext: By.css('#app-content > div > div.app-primary.from-right > div > section:nth-child(4) > button'),
|
||||
},
|
||||
restoreVault: {
|
||||
textArea: '#app-content > div > div.app-primary.from-left > div > div.initialize-screen.flex-column.flex-center.flex-grow > textarea',
|
||||
fieldPassword: 'password-box',
|
||||
fieldPasswordConfirm: 'password-box-confirm',
|
||||
textArea: By.css('#app-content > div > div.app-primary.from-left > div > div.initialize-screen.flex-column.flex-center.flex-grow > textarea'),
|
||||
fieldPassword: By.id('password-box'),
|
||||
fieldPasswordConfirm: By.id('password-box-confirm'),
|
||||
buttos: {
|
||||
ok: '#app-content > div > div.app-primary.from-left > div > div.initialize-screen.flex-column.flex-center.flex-grow > div > button:nth-child(2)',
|
||||
ok: By.css('#app-content > div > div.app-primary.from-left > div > div.initialize-screen.flex-column.flex-center.flex-grow > div > button:nth-child(2)'),
|
||||
},
|
||||
},
|
||||
deleteImportedAccount: {
|
||||
title: '#app-content > div > div.app-primary.from-left > div > div.section-title.flex-row.flex-center > h2',
|
||||
title: By.css('#app-content > div > div.app-primary.from-left > div > div.section-title.flex-row.flex-center > h2'),
|
||||
titleText: 'Delete Imported Account',
|
||||
buttons: {
|
||||
no: '#app-content > div > div.app-primary.from-left > div > div.flex-row.flex-right > button.btn-violet',
|
||||
yes: '#app-content > div > div.app-primary.from-right > div > div.flex-row.flex-right > button:nth-child(2)',
|
||||
no: By.css('#app-content > div > div.app-primary.from-left > div > div.flex-row.flex-right > button.btn-violet'),
|
||||
yes: By.css('#app-content > div > div.app-primary.from-right > div > div.flex-row.flex-right > button:nth-child(2)'),
|
||||
},
|
||||
},
|
||||
importAccounts: {
|
||||
title: '#app-content > div > div.app-primary.from-right > div > div:nth-child(2) > div.flex-row.flex-center > h2',
|
||||
title: By.css('#app-content > div > div.app-primary.from-right > div > div:nth-child(2) > div.flex-row.flex-center > h2'),
|
||||
textTitle: 'Import Accounts',
|
||||
fieldPrivateKey: '#private-key-box',
|
||||
buttonImport: '#app-content > div > div.app-primary.from-right > div > div:nth-child(2) > div:nth-child(4) > button',
|
||||
fieldPrivateKey: By.id('private-key-box'),
|
||||
buttonImport: By.css('#app-content > div > div.app-primary.from-right > div > div:nth-child(2) > div:nth-child(4) > button'),
|
||||
},
|
||||
QRcode: {
|
||||
address: '.ellip-address',
|
||||
buttonArrow: '.fa-arrow-left',
|
||||
address: By.className('ellip-address'),
|
||||
buttonArrow: By.className('fa-arrow-left'),
|
||||
},
|
||||
settings: {
|
||||
currentNetwork: '#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(1) > span:nth-child(2)',
|
||||
customUrl: '#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(1) > span:nth-child(2)',
|
||||
fieldNewRPC: '#new_rpc',
|
||||
buttonSave: '#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(2) > button',
|
||||
currentNetwork: By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(1) > span:nth-child(2)'),
|
||||
customUrl: By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(1) > span:nth-child(2)'),
|
||||
fieldNewRPC: By.id('new_rpc'),
|
||||
buttonSave: By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(2) > button'),
|
||||
titleText: 'Settings',
|
||||
title: '#app-content > div > div.app-primary.from-right > div > div.section-title.flex-row.flex-center > h2',
|
||||
title: By.css('#app-content > div > div.app-primary.from-right > div > div.section-title.flex-row.flex-center > h2'),
|
||||
buttons: {
|
||||
changePassword: '#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(10) > button:nth-child(5)',
|
||||
delete: '#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(1) > button',
|
||||
changePassword: By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(10) > button:nth-child(5)'),
|
||||
delete: By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > div:nth-child(1) > button'),
|
||||
},
|
||||
error: By.className('error'),
|
||||
errors: {
|
||||
invalidHTTP: 'URIs require the appropriate HTTP/HTTPS prefix.',
|
||||
invalidRpcEndpoint: 'Invalid RPC endpoint',
|
||||
invalidRpcUrl: 'Invalid RPC URI',
|
||||
},
|
||||
|
||||
},
|
||||
main: {
|
||||
transactionList: '#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)',
|
||||
transactionList: 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)'),
|
||||
buttons: {
|
||||
send: '#app-content > div > div.app-primary.from-right > div > div > div.flex-row > button:nth-child(4)',
|
||||
buy: '#app-content > div > div.app-primary.from-right > div > div > div.flex-row > button:nth-child(3)',
|
||||
send: By.css('#app-content > div > div.app-primary.from-right > div > div > div.flex-row > button:nth-child(4)'),
|
||||
buy: By.css('#app-content > div > div.app-primary.from-right > div > div > div.flex-row > button:nth-child(3)'),
|
||||
sendText: 'Send',
|
||||
},
|
||||
network: 'network-name',
|
||||
network: By.className('network-name'),
|
||||
sent: {
|
||||
menu: 'activeForm left',
|
||||
menu: By.className('activeForm left'),
|
||||
tokens: By.className('activeForm right'),
|
||||
},
|
||||
balance: '#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)',
|
||||
address: '#app-content > div > div.app-primary.from-left > div > div > div:nth-child(1) > flex-column > div.flex-row > div',
|
||||
balance: 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)'),
|
||||
address: By.css('#app-content > div > div.app-primary.from-left > div > div > div:nth-child(1) > flex-column > div.flex-row > div'),
|
||||
tokens: {
|
||||
menu: 'activeForm right',
|
||||
token: '#app-content > div > div.app-primary.from-left > div > section > div.full-flex-height > ol > li',
|
||||
balance: '#app-content > div > div.app-primary.from-left > div > section > div.full-flex-height > ol > li:nth-child(2) > h3',
|
||||
amount: '#app-content > div > div.app-primary.from-left > div > section > div.full-flex-height > div > span',
|
||||
remove: By.className('trash'),
|
||||
menu: By.className('inactiveForm pointer'),
|
||||
token: By.css('#app-content > div > div.app-primary.from-left > div > section > div.full-flex-height > ol > li'),
|
||||
balance: By.css('#app-content > div > div.app-primary.from-left > div > section > div.full-flex-height > ol > li:nth-child(2) > h3'),
|
||||
amount: By.css('#app-content > div > div.app-primary.from-left > div > section > div.full-flex-height > div > span'),
|
||||
textNoTokens: 'No tokens found',
|
||||
textYouOwn1token: 'You own 1 token',
|
||||
buttonAdd: '#app-content > div > div.app-primary.from-left > div > section > div.full-flex-height > div > button',
|
||||
buttonAdd: By.css('div.full-flex-height:nth-child(2) > div:nth-child(1) > button:nth-child(2)'),
|
||||
buttonAddText: 'Add Token',
|
||||
},
|
||||
},
|
||||
info: {
|
||||
title: By.className('section-title flex-row flex-center'),
|
||||
titleText: 'Info',
|
||||
label: By.className('info'),
|
||||
},
|
||||
removeToken: {
|
||||
title: By.className('page-subtitle'),
|
||||
titleText: 'Remove Token',
|
||||
label: By.className('confirm-label'),
|
||||
labelText: 'Are you sure you want to remove token',
|
||||
buttons: {
|
||||
back: By.className('fa fa-arrow-left fa-lg cursor-pointer'),
|
||||
no: By.className('btn-violet'),
|
||||
yes: By.css('#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > button:nth-child(2)'),
|
||||
},
|
||||
},
|
||||
|
||||
changePassword: {
|
||||
title: By.className('page-subtitle'),
|
||||
titleText: 'Change Password',
|
||||
ById: {
|
||||
fieldOldPassword: 'old-password-box',
|
||||
fieldNewPassword: 'new-password-box',
|
||||
fieldConfirmNewPassword: 'password-box-confirm',
|
||||
},
|
||||
ByCss: {
|
||||
buttonNo: '#app-content > div > div.app-primary.from-right > div > div.flex-row.flex-right > button.btn-violet',
|
||||
buttonYes: '#app-content > div > div.app-primary.from-right > div > div.flex-row.flex-right > button:nth-child(2)',
|
||||
subtitle: '#app-content > div > div.app-primary.from-right > div > div.section-title.flex-row.flex-center > h2',
|
||||
label: '#app-content > div > div.app-primary.from-right > div > p',
|
||||
},
|
||||
ByClassName: {
|
||||
label: 'confirm-label',
|
||||
arrowLeft: 'fa fa-arrow-left fa-lg cursor-pointer',
|
||||
error: 'error',
|
||||
},
|
||||
fieldOldPassword: By.id('old-password-box'),
|
||||
fieldNewPassword: By.id('new-password-box'),
|
||||
fieldConfirmNewPassword: By.id('password-box-confirm'),
|
||||
buttonNo: By.css('#app-content > div > div.app-primary.from-right > div > div.flex-row.flex-right > button.btn-violet'),
|
||||
buttonYes: By.css('#app-content > div > div.app-primary.from-right > div > div.flex-row.flex-right > button:nth-child(2)'),
|
||||
label: By.className('confirm-label'),
|
||||
arrowLeft: By.className('fa fa-arrow-left fa-lg cursor-pointer'),
|
||||
error: By.className('error'),
|
||||
labelText: 'Are you sure you want to change the password for unlocking of your wallet?',
|
||||
error: {
|
||||
errorText: {
|
||||
differ: 'New password should differ from the current one',
|
||||
notLong: 'Password not long enough',
|
||||
dontMatch: 'Passwords don\'t match',
|
||||
|
@ -127,33 +170,30 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
lock: {
|
||||
fieldPassword: 'password-box',
|
||||
error: 'error',
|
||||
errorText: 'Incorrect password',
|
||||
buttonLogin: 'cursor-pointer',
|
||||
linkRestore: '#app-content > div > div.app-primary.from-left > div > div.flex-row.flex-center.flex-grow > p',
|
||||
fieldPassword: By.id('password-box'),
|
||||
error: By.className('error'),
|
||||
errorText: 'Incorrect password. Try again.',
|
||||
buttonLogin: By.className('cursor-pointer'),
|
||||
linkRestore: By.css('#app-content > div > div.app-primary.from-left > div > div.flex-row.flex-center.flex-grow > p'),
|
||||
linkRestoreText: 'Restore from seed phrase',
|
||||
},
|
||||
addToken: {
|
||||
fieldTokenContractAddress: '#token-address',
|
||||
fieldTokenSymbol: '#token_symbol',
|
||||
fieldDecimals: '#token_decimals',
|
||||
buttonAdd: '#app-content > div > div.app-primary.from-right > div > div.flex-column.flex-justify-center.flex-grow.select-none > div > button',
|
||||
},
|
||||
TOU: {
|
||||
titleText: 'Nifty Wallet',
|
||||
header: '.terms-header',
|
||||
button: 'button',
|
||||
|
||||
TOU: {
|
||||
agreement: By.className('notice-box'),
|
||||
titleText: 'Terms of Use',
|
||||
title: By.className('terms-header'),
|
||||
button: By.css('button'),
|
||||
linkTerms: By.linkText('Terms of Service'),
|
||||
linkTermsText: 'Terms of Service',
|
||||
},
|
||||
create: {
|
||||
fieldPassword: 'password-box',
|
||||
fieldPasswordConfirm: 'password-box-confirm',
|
||||
button: 'button',
|
||||
fieldPassword: By.id('password-box'),
|
||||
fieldPasswordConfirm: By.id('password-box-confirm'),
|
||||
button: By.css('button'),
|
||||
},
|
||||
seedPhrase: {
|
||||
fieldPhrase: '.twelve-word-phrase',
|
||||
buttonIveCopied: '#app-content > div > div.app-primary.from-right > div > button:nth-child(4)',
|
||||
fieldPhrase: By.className('twelve-word-phrase'),
|
||||
buttonIveCopied: By.css('#app-content > div > div.app-primary.from-right > div > button:nth-child(4)'),
|
||||
textButtonIveCopied: 'I\'ve copied it somewhere safe',
|
||||
},
|
||||
},
|
||||
|
@ -168,4 +208,3 @@ module.exports = {
|
|||
CUSTOM: 'http://test.com',
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ const path = require('path')
|
|||
const webdriver = require('selenium-webdriver')
|
||||
const Command = require('selenium-webdriver/lib/command').Command
|
||||
|
||||
const { By, Key } = webdriver
|
||||
const { By } = webdriver
|
||||
|
||||
module.exports = {
|
||||
delay,
|
||||
|
@ -15,8 +15,7 @@ module.exports = {
|
|||
installWebExt,
|
||||
getExtensionIdChrome,
|
||||
getExtensionIdFirefox,
|
||||
clearField,
|
||||
}
|
||||
}
|
||||
|
||||
function delay (time) {
|
||||
return new Promise(resolve => setTimeout(resolve, time))
|
||||
|
@ -63,11 +62,3 @@ async function installWebExt (driver, extension) {
|
|||
|
||||
return await driver.execute(cmd, 'installWebExt(' + extension + ')')
|
||||
}
|
||||
|
||||
async function clearField (field, number) {
|
||||
await field.click()
|
||||
if (number === undefined) number = 40
|
||||
for (let i = 0; i < number; i++) {
|
||||
await field.sendKeys(Key.BACK_SPACE)
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1778,6 +1778,7 @@ function setRpcTarget (newRpc) {
|
|||
log.error(err)
|
||||
return dispatch(self.displayWarning('Had a problem changing networks!'))
|
||||
}
|
||||
dispatch(actions.displayWarning(''))
|
||||
dispatch(actions.setSelectedToken())
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue