Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Fully automated UI testing (#788)
Browse files Browse the repository at this point in the history
* got app launching via test

* work towards testing - private net integration

* change how we name options to pass directly to geth, so that test suite works

* refactor preloader scripts

* cleanly quitting the app at the end of tests

* trying to get electron working properly, upgrade to 1.2.2

* upgrade spectron

* work towards getting tests to work

* dont use NODE_ENV var as Meteor production uses it

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* got basic test working

* update travis build

* trigger build

* update readme, travis

* fix gulp-download-stream use

* fix build command

* testing account creation

* added account creation test

* only do a shallow clone

* final deposit test

* should be able to find geth executable now
  • Loading branch information
hiddentao authored and Alex Van de Sande committed Jul 6, 2016
1 parent c807077 commit 4922876
Show file tree
Hide file tree
Showing 23 changed files with 595 additions and 138 deletions.
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ node_js:
- "4"

before_script:
- "npm install"
- "npm install -g electron-prebuilt@1.0.1"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "sleep 3" # give xvfb some time to start
- "curl https://install.meteor.com/ | sh"
- "npm install -g electron-prebuilt@1.2.2"
- "npm install -g meteor-build-client"

script:
- "npm test"
- "npm run ci"

notifications:
email:
- mist@ethereum.org



18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ In the original window you can then start Mist using wallet mode:
$ electron . --mode wallet


### Passing options to Geth
### Passing options to Geth/Eth

You can pass command-line options directly to Geth by placing them after `--` in
the command-line invocation:
You can pass command-line options directly to Geth/Eth by prefixing them
with `--node-`:

```bash
$ electron . --mode mist -- --rpcport 19343 --networkid 2
$ electron . --mode mist --node-rpcport 19343 --node-networkid 2
```


Expand All @@ -102,9 +102,12 @@ To run a private network you will need to set the `networkdid`, `ipcpath` and
`datadir` flags:

```bash
$ electron . -- --networkid 1234 --ipcpath ~/Library/Ethereum/geth.ipc --datadir ~/Library/Ethereum/privatenet
$ electron . --ipcpath ~/Library/Ethereum/geth.ipc --node-networkid 1234 --node-datadir ~/Library/Ethereum/privatenet
```

_NOTE: since `ipcpath` is also a Mist option you do not need to also include a
`--node-ipcpath` option._

You can also run `geth` separately yourself with the same options prior to start
Mist normally.

Expand All @@ -117,13 +120,8 @@ To create a binaries you need to install the following tools:
// tools for the windows binaries
$ brew install Caskroom/cask/xquartz
$ brew install wine

// install meteor-build-client
$ npm install -g meteor-build-client

// install gulp
$ npm install -g gulp

To generate the binaries simply run:

$ cd mist
Expand Down
22 changes: 19 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var rename = require("gulp-rename");
var download = require('gulp-download-stream');
var decompress = require('gulp-decompress');
var tap = require("gulp-tap");
const mocha = require('gulp-spawn-mocha');
// const zip = require('gulp-zip');
// var zip = require('gulp-zip');
// var zip = require('gulp-jszip');
Expand Down Expand Up @@ -81,7 +82,6 @@ if(_.contains(options.platform, 'all')) {
'win32-x64'
];
}
console.log('Bundling platforms: ', osVersions);


// Helpers
Expand Down Expand Up @@ -278,7 +278,7 @@ gulp.task('bundling-interface', ['clean:dist', 'copy-files'], function(cb) {
} else {
console.log('Pulling https://github.com/ethereum/meteor-dapp-wallet/tree/'+ options.walletSource +' "'+ options.walletSource +'" branch...');
exec('cd interface/ && meteor-build-client ../dist_'+ type +'/app/interface/ -p "" &&'+
'cd ../dist_'+ type +'/ && git clone https://github.com/ethereum/meteor-dapp-wallet.git && cd meteor-dapp-wallet/app && meteor-build-client ../../app/interface/wallet -p "" && cd ../../ && rm -rf meteor-dapp-wallet', function (err, stdout, stderr) {
'cd ../dist_'+ type +'/ && git clone --depth 1 https://github.com/ethereum/meteor-dapp-wallet.git && cd meteor-dapp-wallet/app && meteor-build-client ../../app/interface/wallet -p "" && cd ../../ && rm -rf meteor-dapp-wallet', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);

Expand All @@ -299,6 +299,8 @@ gulp.task('copy-i18n', ['copy-files', 'bundling-interface'], function() {
});

gulp.task('create-binaries', ['copy-i18n'], function(cb) {
console.log('Bundling platforms: ', osVersions);

packager({
dir: './dist_'+ type +'/app/',
out: './dist_'+ type +'/',
Expand Down Expand Up @@ -531,6 +533,20 @@ gulp.task('wallet-checksums', [
'getChecksums'
]);

gulp.task('default', ['mist']);


gulp.task('test-wallet', function() {
return gulp.src([
'./test/wallet/*.test.js'
])
.pipe(mocha({
timeout: 60000,
ui: 'exports',
reporter: 'spec'
}));
});



gulp.task('default', ['mist']);

2 changes: 1 addition & 1 deletion interface/.meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.3.2.4
METEOR@1.3.3
122 changes: 61 additions & 61 deletions interface/.meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -2,101 +2,101 @@
agnito:simptip@0.0.1
aldeed:simple-schema@1.3.3
alexvandesande:identicon@2.0.2
allow-deny@1.0.4
allow-deny@1.0.5
amplify@1.0.0
autoupdate@1.2.9
babel-compiler@6.6.4
babel-runtime@0.1.8
base64@1.0.8
binary-heap@1.0.8
blaze@2.1.7
autoupdate@1.2.10
babel-compiler@6.8.0
babel-runtime@0.1.9
base64@1.0.9
binary-heap@1.0.9
blaze@2.1.8
blaze-html-templates@1.0.4
blaze-tools@1.0.8
boilerplate-generator@1.0.8
caching-compiler@1.0.4
blaze-tools@1.0.9
boilerplate-generator@1.0.9
caching-compiler@1.0.5
caching-html-compiler@1.0.6
callback-hook@1.0.8
callback-hook@1.0.9
cfs:http-methods@0.0.32
check@1.2.1
check@1.2.2
chuangbo:cookie@1.1.0
coffeescript@1.0.17
coffeescript@1.1.0
cosmos:browserify@0.10.0
ddp@1.2.5
ddp-client@1.2.7
ddp-common@1.2.5
ddp-server@1.2.6
ddp-client@1.2.8
ddp-common@1.2.6
ddp-server@1.2.7
deps@1.0.12
diff-sequence@1.0.5
ecmascript@0.4.3
ecmascript-runtime@0.2.10
ejson@1.0.11
diff-sequence@1.0.6
ecmascript@0.4.4
ecmascript-runtime@0.2.11
ejson@1.0.12
ethereum:accounts@0.3.10
ethereum:blocks@0.3.1
ethereum:dapp-styles@0.5.1
ethereum:elements@0.7.0
ethereum:dapp-styles@0.5.4
ethereum:elements@0.7.1
ethereum:tools@0.5.2
ethereum:web3@0.15.3
fastclick@1.0.11
fastclick@1.0.12
frozeman:animation-helper@0.2.6
frozeman:global-notifications@0.2.1
frozeman:persistent-minimongo@0.1.8
frozeman:persistent-minimongo2@0.3.4
frozeman:reactive-timer@0.1.7
frozeman:storage@0.1.9
frozeman:template-var@1.2.3
geojson-utils@1.0.8
geojson-utils@1.0.9
hot-code-push@1.0.4
html-tools@1.0.9
htmljs@1.0.9
http@1.1.5
id-map@1.0.7
html-tools@1.0.10
htmljs@1.0.10
http@1.1.6
id-map@1.0.8
jeeeyul:moment-with-langs@2.12.1
jquery@1.11.8
launch-screen@1.0.11
less@2.6.0
jquery@1.11.9
launch-screen@1.0.12
less@2.6.1
livedata@1.0.18
localstorage@1.0.9
logging@1.0.12
meteor@1.1.14
localstorage@1.0.11
logging@1.0.13
meteor@1.1.15
meteor-base@1.0.4
meteorspark:util@0.2.0
minifier-css@1.1.11
minifier-js@1.1.11
minimongo@1.0.16
minifier-css@1.1.12
minifier-js@1.1.12
minimongo@1.0.17
mobile-experience@1.0.4
mobile-status-bar@1.0.12
modules@0.6.1
modules-runtime@0.6.3
mongo@1.1.7
mongo-id@1.0.4
modules@0.6.2
modules-runtime@0.6.4
mongo@1.1.8
mongo-id@1.0.5
mrt:jquery-ui-sortable@1.10.3
npm-mongo@1.4.43
npm-mongo@1.4.44
numeral:numeral@1.5.3_1
observe-sequence@1.0.11
ordered-dict@1.0.7
promise@0.6.7
observe-sequence@1.0.12
ordered-dict@1.0.8
promise@0.7.2
raix:eventemitter@0.1.3
raix:handlebar-helpers@0.2.5
random@1.0.9
reactive-dict@1.1.7
reactive-var@1.0.9
reload@1.1.8
retry@1.0.7
routepolicy@1.0.10
reactive-dict@1.1.8
reactive-var@1.0.10
reload@1.1.9
retry@1.0.8
routepolicy@1.0.11
sacha:spin@2.3.1
session@1.1.5
spacebars@1.0.11
spacebars-compiler@1.0.11
standard-minifier-css@1.0.6
standard-minifier-js@1.0.6
session@1.1.6
spacebars@1.0.12
spacebars-compiler@1.0.12
standard-minifier-css@1.0.7
standard-minifier-js@1.0.7
standard-minifiers@1.0.6
tap:i18n@1.8.0
tap:i18n@1.8.2
tap:i18n-bundler@0.3.0
templating@1.1.9
templating@1.1.10
templating-tools@1.0.4
tracker@1.0.13
tracker@1.0.14
ui@1.0.11
underscore@1.0.8
url@1.0.9
webapp@1.2.8
underscore@1.0.9
url@1.0.10
webapp@1.2.9
webapp-hashing@1.0.9
Loading

0 comments on commit 4922876

Please sign in to comment.