For Devs

Deployment Manual

SMS-It Deployment Manual

License: AGPL v3

Table of Contents

Requirements

Generating Web Documentation

jsdoc is used to generate documentation with configs for the jsdoc found in ./ubf-to-twilio/config, ./vf-to-ubf/config and ./ui/reactui/config

Navigate to either ./ubf-to-twilio, ./vf-to-ubf or ./ui/reactui and run:

yarn run doc

Installation

  1. Clone this repository with its submodules and cd into it:

    git clone --recurse-submodules git@github.com:UCLComputerScience/COMP0016_2020_21_Team28.git
    cd COMP0016_2020_21_Team28
  2. Install the necessary dependencies in the following folders:

Navigate to ./ui/reactui folder and run:

yarn install

Navigate to ./ui/electron folder and run:

yarn install

Local Development

If you are trying to run the Electron application locally for development:

  1. Make sure you have the development server up and running by going to ./ui/reactui and run:

For MacOS/Linux:

yarn start 

For Windows:

yarn start-win
  1. Start the Electron application by going to ./ui/electron and running:
yarn start

ESLint is used as our linter.

Building-and-Shipping

Navigate to the ./ui directory and run:

cd reactui && yarn build && cd ../electron && yarn make

Executables will be in the electron/out folder.

Note: This will likely only compile executables for your platform. There isn’t a universal way to create executables for all platforms from one.

Testing

For testing, jest is used for both unit and integration tests and Spectron is used with WebdriverIO for end-to-end tests.

Before running tests, make sure you have followed the installation steps, and make sure you have your Twilio account credentials stored as environment variables.

Unit tests

To run the UI unit tests, navigate to the reactui folder and run:

yarn test --watchAll

End-to-end tests

For end-to-end tests, make sure you: have set up the environment variables; start the reactui scripts before running the tests.

Then, navigate to the electron folder and run:

yarn test

Packages

To test individual packages, navigate to either ./ubf-to-twilio (ensure you have environment variables set up) or ./vf-to-ubf and run:

yarn install

yarn test