my-tnm-2

1.0.0 • Public • Published

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.sh to 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 install inside the project directory
  • Run npm start for 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 test to run the unit tests in "watch" mode
  • Run npm run testonce for 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

Readme

Keywords

none

Package Sidebar

Install

npm i my-tnm-2

Weekly Downloads

1

Version

1.0.0

License

none

Last publish

Collaborators

  • newmotion