This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #201 from LiskHQ/178_e2e-tests-for-1-0-0
Create e2e tests for all 1.0.0 features - Closes #178
- Loading branch information
Showing
7 changed files
with
332 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,6 @@ node_modules | |
npm-debug.log | ||
src/.nyc_output | ||
src/coverage | ||
src/e2e-test-screenshots | ||
*.sw[pon] | ||
app/app.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
const SpecReporter = require('jasmine-spec-reporter').SpecReporter; | ||
|
||
exports.config = { | ||
seleniumAddress: 'http://localhost:4444/wd/hub', | ||
specs: ['spec.js'], | ||
directConnect: true, | ||
capabilities: { | ||
browserName: 'chrome', | ||
}, | ||
onPrepare() { | ||
const env = jasmine.getEnv(); | ||
|
||
env.clearReporters(); | ||
jasmine.getEnv().addReporter(new SpecReporter({ | ||
// FIXME the following like can make the output cleaner | ||
// but then shell return code is always 0 even if some tests fail. | ||
// env.clearReporters(); | ||
|
||
env.addReporter(new SpecReporter({ | ||
spec: { | ||
displayStacktrace: false, | ||
displayDuration: true, | ||
}, | ||
summary: { | ||
displayDuration: true, | ||
}, | ||
})); | ||
|
||
jasmine.getEnv().addReporter({ | ||
specStarted(result) { | ||
jasmine.getEnv().currentSpec = result; | ||
}, | ||
specDone() { | ||
jasmine.getEnv().currentSpec = null; | ||
}, | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
# Purpose of this script is to clean lisk database and create some tranactions | ||
|
||
if [ -z "$1" ] | ||
then | ||
echo "One required argument missing: path to folder with lisk core app.js" | ||
exit 1 | ||
fi | ||
|
||
pwd=`pwd` | ||
cd $1 | ||
forever stop app.js | ||
dropdb lisk_test && createdb lisk_test | ||
forever start app.js | ||
sleep 5 | ||
cd $pwd | ||
|
||
for i in {1..20} | ||
do | ||
curl -k -H "Content-Type: application/json" -X PUT -d '{"secret":"wagon stock borrow episode laundry kitten salute link globe zero feed marble","amount":'"$i"000000000',"recipientId":"537318935439898807L"}' http://localhost:4000/api/transactions | ||
echo '' | ||
done | ||
curl -k -H "Content-Type: application/json" -X PUT -d '{"secret":"wagon stock borrow episode laundry kitten salute link globe zero feed marble","amount":'10000000000',"recipientId":"544792633152563672L"}' http://localhost:4000/api/transactions | ||
curl -k -H "Content-Type: application/json" -X PUT -d '{"secret":"wagon stock borrow episode laundry kitten salute link globe zero feed marble","amount":'10000000000',"recipientId":"4264113712245538326L"}' http://localhost:4000/api/transactions | ||
sleep 5 |
Oops, something went wrong.