Dial is a webapp built using React whose purpose is making and receive calls among other features.
- Requirements
- Read the docs
- Install dependencies
- Creating the .env configuration files
- Setting up the mock server
- Adding your own API Client
- Run the application
- Testing the application
- node >= v11.10
- yarn >= 1.17.3
- Docker (to build the Linux version)
yarn install
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
⚠️ 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
- 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/
yarn electron-start
: Runs the application on development mode.
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.
Application can be tested in two different ways:
- Using Jest to run the tests.
- Using React Testing Library for the unit testing.
Tests are located in each component folder.
In order to run them:
yarn test
To test the modified files:
yarn test --coverage
To test all the files:
yarn test --coverage --watchAll
- 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.
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