3.0.0 • Published 4 years ago

agent-interface v3.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Dixa Agent Interface Build Status

This is the Dixa agent interface.

  • Version 1.1.0

How do I get set up?

You need a NPM profil and you need to be invited to the Dixa organization at npmjs.com

  1. Install NVM
  2. npm login
  3. Clone the project git clone git@github.com:dixahq/agent-interface.git
  4. Go to the agent-interface folder
  5. yarn install or simply yarn
  6. yarn start

Dependencies

How to run tests ?

We are using Nightwatch for our end-to-end tests. Nightwatch uses Selenium. For unit testing Jest is used.

Run the Nightwatch tests locally

Run yarn test:e2e:local

Run Jest tests

Run yarn test to run a single time, or yarn test:watch to rerun every time a file changes

Deployment instructions

TBA.

Overwrite endpoints

You can add ?stage=true query to the url if you want to use the backend stage environment.

You can overwrite the server endpoints by adding the following values in LocalStorage.:

  • _dixa-sign-up-url for the sign up URL adress. http://stage-signup-interface.dixa.io/
  • _dixa-login-url for the login URL adress. http://stage-login-interface.dixa.io/
  • _dixa-subdomain for the subdomain fx "subdomain".dixa.com. default will look at the window.location.hostname.split(".").shift();
  • _dixa-rest-api-url for the REST API URL adress. https://staging-api.dixa.io/
  • _dixa-websocket-url for the WebSocket URL adress. default is wss://sockets.dixa.io/v1/agent/

Contribution guidelines

  • When starting with a new feature/fixes. Create feature branch starting with "feature/" follow by either an task number (T100) and/or a description where_whitespace_is_replaced_by_underscore

  • Flow

    • TODO: Describe uses in different parts (reducers, containers, components, sagas, ...)
  • Writing tests

    • Integration tests are written in Nightwatch.
    • Unit tests are written in Jest.
      • Tests are typically placed besides the file you want to test and named ${FILE}.test.js
      • TODO: Add Examples of testing different parts (reducers, containers, components, sagas, ...)
  • Code review - get another person to review the feature branch before merge into master.

Continuous Integration

Environments.:

Browserstack:

Runs all of our Nightwatch test in different environments.

Run yarn test:e2e:local to run the tests locally