1.0.0 • Published 8 years ago
my-tnm-2 v1.0.0
MyTNM 2.0
This repository contains the code for MyTNM 2.0, the new client-side implementation of MyTNM.
Running MyTNM 2.0 on your local machine
- Run
prepate_dev_env.shto copy the config file into the correct place, edit it if required - Install NodeJS with
brew install node - Install the global packages with
npm install -g karma-cli@0.1.0 - Run
npm installinside the project directory - Run
npm startfor the development server - Open a browser and go to the url
http://localhost:3000/commerce
HTTPS
If a https key is present on the config.js file in the root of the project and the key file exists, the nodejs server (node server.js) will listen both to the 3169 (http) and 3170 (https) port.
module.exports = {
...
https: {
key: '/certs/admin.thenewmotion.com.key',
crt: '/certs/admin.thenewmotion.com.crt'
}
...
}Running unit tests
- Run
npm testto run the unit tests in "watch" mode - Run
npm run testoncefor running the unit tests just once
Running end2end tests using Selenium
- Install Selenium:
brew install selenium-server-standalone - Install Firefox
- Run Selenium:
selenium-server -p 4444 - Run
npm run test:e2e:<module>for running the e2e tests just once for a specific module
Example: npm run test:e2e:admin
Commerce
Filling out the "Charge point details" steps via query string
In order to provide integration with the old MyTNM, it's possible to pass on the url the value of the fields in the "Charge point details" step.
http://localhost:8080/dest/#/commerce/cpd?cpSerialNumber=123456&cpNickname=test&installAddrZipCode=1017%20DR&installAddrHouseNumber=585&installAddrStreetName=Keizersgracht
1.0.0
8 years ago