Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Latest commit

 

History

History
155 lines (101 loc) · 4.15 KB

README.md

File metadata and controls

155 lines (101 loc) · 4.15 KB

Dial Webapp

Screenshot

Dial is a webapp built using React whose purpose is making and receive calls among other features.

User Docs

Status

Build Status Dependency Status Maintainability Test Coverage codecov

Packaging and Deployment

Development

Requirements

  • node >= v11.10
  • yarn >= 1.17.3
  • Docker (to build the Linux version)

0. Read the docs

1. Install dependencies

yarn install

2. Creating the config.js configuration file

This project gets the configuration from the src/config.js file. There is a config.sample.js file that can be used as example.

This file includes several enviroments that must be set:

  • prod
  • next
  • dev
  • test

Setting up the mock server

⚠️ TODO: Update the responses from the server

The mock server simulates the behaviour of a backend server by providing some sample responses.

Then run the server:

yarn run mock-server

More info about this server: https://github.com/smollweide/node-mock-server#readme

Mock Server methods

  • GET /OAuth/Authorize
  • POST /auth/v1/login/
  • DELETE /auth/v1/logout/
  • GET /api/v1/users/me/
  • GET /api/v1/numbers/
  • GET /api/v1/users/search/
  • GET /api/v1/users/

Run the application

  • yarn electron-start: Runs the application on development mode.

Run the application in debug mode using Visual Studio Code

The project configuration is defined in the .vscode folder. In this folder we have configured the Visual Studio Code debugger with a launch.json file. To run it in debug mode just go to the "bug" icon in the Visual Studio code and click on the start server.

Testing the application

Application can be tested in two different ways:

Unit tests

Tests are located in each component folder.

In order to run them:

yarn test

Coverage testing

To test the modified files:

yarn test --coverage

To test all the files:

yarn test --coverage --watchAll

Continuous Integration

  • The code is tested on every push and PR
  • Code coverage using CodeCov is also triggered and if the coverage decreases, the CI will fail.

Execute the generated AppImage

You will probably need to set the AppImage as executable.

To do so:

  • Right click on the AppImage file
  • Select "Properties"
  • Click on the "Permissions" tab
  • Check "Allow executing file as a program"
  • Close this window

You can also do this from the command line:

sudo chmod +x path_to_AppImage
./path path_to_AppImage

Other Docs