From af75698b403ddd14ea1623979dd8ada90653d311 Mon Sep 17 00:00:00 2001 From: yasharAyari Date: Mon, 16 Apr 2018 14:29:45 +0200 Subject: [PATCH 1/2] Add 'serve' script to node scripts and use it in jenkinsfile --- Jenkinsfile | 7 ++++--- package.json | 8 +++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a8dff9680..51241143b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -146,14 +146,15 @@ node('lisk-nano') { # Run end-to-end tests + npm run serve -- $WORKSPACE/app/build -p 300$N -a 127.0.0.1 &>server.log & if [ -z $CHANGE_BRANCH ]; then - npm run --silent e2e-test -- --params.baseURL file://$WORKSPACE/app/build/index.html --params.liskCoreURL https://testnet.lisk.io --cucumberOpts.tags @testnet --params.useTestnetPassphrase true + npm run --silent e2e-test -- --params.baseURL http://127.0.0.1:300$N --params.liskCoreURL https://testnet.lisk.io --cucumberOpts.tags @testnet --params.useTestnetPassphrase true else echo "Skipping @testnet end-to-end tests because we're not on 'development' branch" fi - npm run --silent e2e-test -- --params.baseURL file://$WORKSPACE/app/build/index.html --params.liskCoreURL http://127.0.0.1:400$N + npm run --silent e2e-test -- --params.baseURL http://127.0.0.1:300$N --params.liskCoreURL http://127.0.0.1:400$N if [ -z $CHANGE_BRANCH ]; then - npm run --silent e2e-test -- --params.baseURL file://$WORKSPACE/app/build/index.html --cucumberOpts.tags @testnet --params.useTestnetPassphrase true --params.network testnet + npm run --silent e2e-test -- --params.baseURL http://127.0.0.1:300$N --cucumberOpts.tags @testnet --params.useTestnetPassphrase true --params.network testnet else echo "Skipping @testnet end-to-end tests because we're not on 'development' branch" fi diff --git a/package.json b/package.json index c293947be..ba0d89b4d 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "pack": "npm install && npm run build && npm run clean-dist && npm run dist", "pack:win": "cmd /c npm install && npm run clean-build && npm run copy-files && npm run build-prod && npm run build-electron && npm run clean-dist && npm run dist:win", "storybook": "start-storybook -p 6006 -s ./src/", - "build-storybook": "build-storybook" + "build-storybook": "build-storybook", + "serve": "http-server" }, "author": "Lisk Foundation , lightcurve GmbH ", "license": "GPL-3.0", @@ -125,7 +126,7 @@ "postcss-loader": "=2.0.6", "postcss-partial-import": "=4.1.0", "postcss-reporter": "5.0.0", - "protractor": "5.1.2", + "protractor": "5.3.1", "protractor-cucumber-framework": "3.1.0", "raw-loader": "1.0.0-beta.0", "react-addons-test-utils": "=15.6.0", @@ -143,7 +144,8 @@ "url-loader": "0.5.9", "webpack": "3.6.0", "webpack-bundle-analyzer": "2.9.0", - "webpack-dev-server": "2.8.2" + "webpack-dev-server": "2.8.2", + "serve": "http-server" }, "build": { "appId": "io.lisk.nano", From 10ca251492c2d17595dedc0c3d58d12a4a76ea0e Mon Sep 17 00:00:00 2001 From: yasharAyari Date: Mon, 16 Apr 2018 14:38:26 +0200 Subject: [PATCH 2/2] Fix a bug in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ba0d89b4d..da4778bba 100644 --- a/package.json +++ b/package.json @@ -145,7 +145,7 @@ "webpack": "3.6.0", "webpack-bundle-analyzer": "2.9.0", "webpack-dev-server": "2.8.2", - "serve": "http-server" + "http-server": "0.11.1" }, "build": { "appId": "io.lisk.nano",