diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 304bf6e..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,105 +0,0 @@ -version: 2 - -jobs: - test: - docker: - - image: electronuserland/builder:wine-chrome - steps: - - checkout - - run: apt-get -y update - - run: apt install -y software-properties-common - - run: add-apt-repository ppa:jonathonf/ffmpeg-4 - - run: apt-get -y update - - run: apt-get -y install libusb-1.0-0-dev graphicsmagick libudev-dev - - run: apt-get -y install tmux xvfb libxtst6 libxss1 libgtk2.0-0 libnss3 libasound2 libgconf-2-4 ffmpeg frei0r-plugins - - run: yarn install - - run: - name: Run Unit Tests - command: yarn test:unit - - run: - name: Run Webpack - command: yarn dev - background: true - - run: - name: Run Mock RPC API - command: yarn e2e:serve - background: true - - run: yarn wait-on http://localhost:8080 && yarn wait-on http://localhost:18232 - - run: - command: Xvfb :44 -auth /tmp/xvfb.auth -ac -screen 0 1024x768x24 -listen tcp - background: true - - run: - command: ffmpeg -y -f x11grab -video_size 1024x768 -i :44 -codec:v libx264 -r 12 /tmp/e2e-record.mp4 - background: true - - run: DISPLAY=:44 yarn e2e:run - - run: | - kill -s SIGINT $(pgrep ffmpeg) - sleep 10 - kill -s SIGTERM $(pgrep Xvfb) - - save_cache: - key: zec-dependencies-cache-{{ checksum "yarn.lock" }} - paths: - - /usr/local/share/.cache/yarn/v2 - - ./node_modules - - store_artifacts: - path: /tmp/e2e-record.mp4 - destination: e2e-record.mp4 - - build_linux: - docker: - - image: electronuserland/builder:wine-chrome - steps: - - checkout - - restore_cache: - key: zec-dependencies-cache-{{ checksum "yarn.lock" }} - - run: yarn electron:dist -l - - store_artifacts: - path: ./dist/zec-react-wallet_0.3.0_amd64.deb - destination: zec-react-wallet_0.3.0_amd64.deb - - run: - name: Upload to Slack - command: | - export GIT_COMMIT_DESC=$(git log --format=oneline -n 1 | sed -E 's/^[^ ]+ (.*)$/\1/g') - curl -F file=@dist/zec-react-wallet_0.3.0_amd64.deb -F channels=$SLACK_CHANNEL -F token=$SLACK_API_TOKEN -F title="${CIRCLE_PROJECT_REPONAME} | branch -> ${CIRCLE_BRANCH} | commit -> ${GIT_COMMIT_DESC}" https://slack.com/api/files.upload - - build_windows: - docker: - - image: electronuserland/builder:wine-chrome - steps: - - checkout - - restore_cache: - key: zec-dependencies-cache-{{ checksum "yarn.lock" }} - - run: - name: Download PFX certificate - command: echo ${WIN_CERTIFICATE_PFX} | base64 --decode > win-certificate.pfx - - run: - name: Build Windows Installer - command: yarn electron:dist -w - - store_artifacts: - path: ./dist/ZEC Wallet Setup 0.3.0.exe - destination: ZEC Wallet Setup 0.3.0.exe - - run: - name: Upload to Slack - command: | - export GIT_COMMIT_DESC=$(git log --format=oneline -n 1 | sed -E 's/^[^ ]+ (.*)$/\1/g') - curl -F file="@dist/ZEC Wallet Setup 0.3.0.exe" -F channels=$SLACK_CHANNEL -F token=$SLACK_API_TOKEN -F title="${CIRCLE_PROJECT_REPONAME} | branch -> ${CIRCLE_BRANCH} | commit -> ${GIT_COMMIT_DESC}" https://slack.com/api/files.upload - -workflows: - version: 2 - build_test: - jobs: - - test - - build_linux: - requires: - - test - filters: - branches: - only: - - master - - build_windows: - requires: - - test - filters: - branches: - only: - - master diff --git a/README.md b/README.md index 8ac1e82..e088251 100644 --- a/README.md +++ b/README.md @@ -2,24 +2,35 @@ Zepio is a modern cross-platform full-node desktop wallet for the Zcash Network. -[![CircleCI](https://circleci.com/gh/andrerfneves/zec-react-wallet.svg?style=svg&circle-token=abde48de664026a5d03d4b806c904c8ce5e45aa0)](https://circleci.com/gh/andrerfneves/zec-react-wallet) ![Flow Coverage](./public/flow-coverage-badge.svg) +[![Build Status](https://app.bitrise.io/app/e3e2de9d817688f9/status.svg?token=JsSLjbxa6yt6-oy5MgU9uQ)](https://app.bitrise.io/app/e3e2de9d817688f9) +![Flow Coverage](./public/flow-coverage-badge.svg) ## Stack Information - [Electron](https://github.com/electron/electron): desktop application builder + - [React](https://facebook.github.io/react/): UI view layer + - [Redux](http://redux.js.org/): predictable state container + - [Webpack](http://webpack.github.io/): module bundler + - [Webpack Development Server](https://webpack.github.io/docs/webpack-dev-server.html): development server + - [Babel](http://babeljs.io/): ES7/JSX transpilling + - [ESLint](http://eslint.org/): code rules and linting + - [React Router](https://github.com/reactjs/react-router): routing solution for react + - [Styled Components](https://www.styled-components.com/): visual primitives for theming applications ## Installation ```bash + yarn install + ``` ## Development @@ -27,7 +38,9 @@ yarn install To run the application you simply need to run ```bash + yarn start + ``` This will kickstart the webpack development server and serve the app on port 8080, as well as launch the Electron wrapper for the application, which houses the `zcashd` daemon process. diff --git a/__tests__/e2e/receive.test.js b/__tests__/e2e/receive.test.js index 259f075..6379c93 100644 --- a/__tests__/e2e/receive.test.js +++ b/__tests__/e2e/receive.test.js @@ -28,7 +28,7 @@ describe('Receive', () => { expect( await app.client.getText('#receive-wrapper #wallet-address #wallet-address-balance'), - ).toEqual('ZEC 5'); + ).toEqual('TAZ 5'); expect( await app.client.element('#receive-wrapper #wallet-address #wallet-address-copy').isVisible(), diff --git a/__tests__/setup/mockAPI.js b/__tests__/setup/mockAPI.js index 990cb56..ac1f294 100644 --- a/__tests__/setup/mockAPI.js +++ b/__tests__/setup/mockAPI.js @@ -9,9 +9,7 @@ const transactions = []; const sleep = (time: number) => new Promise(resolve => setTimeout(resolve, time)); -createTestServer({ - httpPort: '8232', -}).then(async (server) => { +const handler = (server) => { console.log('[MOCK RPC API]', server.url); // eslint-disable-line server.get('/', (req, res) => { @@ -111,4 +109,12 @@ createTestServer({ return null; } }); -}); +}; + +createTestServer({ + httpPort: '8232', +}).then(handler); + +createTestServer({ + httpPort: '18232', +}).then(handler); diff --git a/app/components/sidebar.js b/app/components/sidebar.js index 243d01d..e7435e0 100644 --- a/app/components/sidebar.js +++ b/app/components/sidebar.js @@ -2,6 +2,7 @@ /* eslint-disable max-len */ import React from 'react'; +import electron from 'electron'; // eslint-disable-line import/no-extraneous-dependencies import styled, { withTheme } from 'styled-components'; import type { Location, RouterHistory } from 'react-router-dom'; @@ -139,7 +140,9 @@ export const Component = ({ ? location.pathname === item.route : location.pathname.startsWith(item.route); - if (!embeddedDaemon && item.route === '/console') return null; + if (electron.remote.process.env.NODE_ENV !== 'test') { + if (!embeddedDaemon && item.route === '/console') return null; + } return (