Developer Installation Instructions
Note
This page is for developers who want to customize or extend OpenWISP WiFi Login Pages, whether for bug fixes, new features, or contributions.
For user guides and general information, please see:
Dependencies
Prerequisites
OpenWISP RADIUS
OpenWISP WiFi Login Pages is a frontend for OpenWISP RADIUS. In order to use it, this app needs a running instance of OpenWISP RADIUS and an organization correctly configured, you can obtain this by following these steps:
Follow the instructions to install OpenWISP RADIUS for development.
After successfully starting the OpenWISP RADIUS server, open a browser and visit:
http://localhost:8000/admin/
, then sign in with the credentials of thesuperuser
we created during the installation ofopenwisp-radius
.Visit the change page of the organization you want to add to this module and note down the following parameters:
name
,slug
,uuid
andtoken
(from the Organization RADIUS Settings).
Installing for Development
Fork and clone the forked repository:
git clone https://github.com/<your_fork>/openwisp-wifi-login-pages.git
Navigate into the cloned repository:
cd openwisp-wifi-login-pages
Install the dependencies:
yarn
Launch development server:
yarn start
You can access the application at http://localhost:8080/default/login/
Run tests with:
yarn test # headless tests
Running Automated Browser Tests
Prerequisites for running browser tests:
Gecko driver needs to be installed.
Having running instances of openwisp-radius and openwisp-wifi-login-pages is required.
OPENWIPS_RADIUS_PATH
environment variable is needed to setup/tear down the database needed to run the browser tests. This can be set using the following command:export OPENWISP_RADIUS_PATH=<PATH_TO_OPENWISP_RADIUS_DIRECTORY>
If a virtual environment is used to run openwisp-radius then this needs to be activated before running browser tests.
Configuration file of
mobile
organization is needed before runningyarn start
.mobile
organization can be created by running:node browser-test/create-mobile-configuration.js
In the test environment of openwisp-radius, the
default
organization must be present.
After doing all the prerequisites, you need to make sure OpenWISP RADIUS is running:
cd $OPENWISP_RADIUS_PATH
# enable python virtual environment if needed
./manage.py runserver
Then, in another terminal, from the root directory of this repository, you need to build this app and serve it:
yarn build-dev
yarn start
Then, in another terminal, from the root directory of this repository, you can finally run the browser based tests:
export OPENWISP_RADIUS_PATH=<PATH_TO_OPENWISP_RADIUS_DIRECTORY>
# enable python virtual environment if needed
yarn browser-test