2017-07-24 04:25:55 -05:00
|
|
|
# WebUI Unit Tests
|
|
|
|
|
2017-11-23 04:12:42 -06:00
|
|
|
## Prerequisites
|
2017-07-24 04:25:55 -05:00
|
|
|
|
2017-11-23 04:12:42 -06:00
|
|
|
1. Run `./autogen.sh` command in the root of the repository
|
|
|
|
2. Run `make -C install/ui/src/libs/` - this step generates loader.js which is necessary for load
|
2017-07-24 04:25:55 -05:00
|
|
|
current API version into WebUI. This version is necessary for checking
|
|
|
|
response of each API call.
|
2017-11-23 04:12:42 -06:00
|
|
|
|
|
|
|
## Running tests:
|
|
|
|
|
|
|
|
### In browser
|
|
|
|
|
|
|
|
1. Go to install/ui/test
|
|
|
|
2. Run `firefox index.html`
|
2017-07-24 04:25:55 -05:00
|
|
|
|
|
|
|
Only Firefox browser is supported, because Google Chrome does not allow
|
|
|
|
to fetch files using AJAX and file:// protocol.
|
|
|
|
|
2017-11-23 04:12:42 -06:00
|
|
|
### From command line:
|
|
|
|
|
|
|
|
1. Go to `install/ui`
|
|
|
|
2. Run `npm install`, it installs required packages specified
|
|
|
|
in package.json file
|
|
|
|
3. Run `grunt --verbose qunit`
|
|
|
|
|
2017-07-24 04:25:55 -05:00
|
|
|
For more information about WebUI unit tests please read following:
|
|
|
|
https://www.freeipa.org/page/FreeIPAv2:UI_Unit_Tests
|