e5826b9f72
With component registry mechanism plugins can set compatibility, incompatibility and requires between components. Current tests implement automatization to verify UI representation of components relations. They have to be run regularly on CI. To run tests you need to export variables PLUGIN_RPM (path to example-plugin rpm) and VENV (path to virtual env). Run with `npm run component-tests`. Closes-Bug: #1597710 Change-Id: I5d929da714a4c44515094df4e6edd3a7d93f4aa0 |
||
---|---|---|
gulp | ||
specs | ||
static | ||
.eslintrc | ||
.gitignore | ||
.gitreview | ||
LICENSE | ||
MAINTAINERS | ||
README.rst | ||
gulpfile.js | ||
karma.config.js | ||
npm-shrinkwrap.json | ||
package.json | ||
run_component_registry_tests.sh | ||
run_ui_func_tests.sh | ||
webpack.config.js |
README.rst
FUEL UI
This repository contains Fuel UI - the web user interface for Nailgun.
Installation
Fuel UI requires Node.js 0.10+ to be installed on your system. On Ubuntu 14.04 you can install it using the following commands:
sudo apt-get remove --yes nodejs nodejs-legacy sudo add-apt-repository --yes ppa:chris-lea/node.js sudo apt-get update sudo apt-get install --yes nodejs sudo chown -R `whoami`.`whoami` ~/.npm
Install JS dependencies and Gulp:
npm install sudo npm install -g gulp
The most convenient approach to modify Fuel UI is to use a development server. It watches for file changes and automatically rebuilds changed modules (significantly faster than full rebuild) and triggers page refresh in browsers:
gulp dev-server
By default it runs on port 8080 and assumes that Nailgun runs on port 8000. You can override this by using the following options:
gulp dev-server --dev-server-host=127.0.0.1 --dev-server-port=8080 --nailgun-host=127.0.0.1 --nailgun-port=8000
If automatic rebuild on change doesn't work, most likely you need to increase the limit of inotify watches:
echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches
The production version of Fuel UI can be built by running:
gulp build
To specify custom output directory location, use static-dir option:
gulp build --static-dir=static_compressed
To speed up build process you may also want to disable uglification and source maps generation:
gulp build --no-uglify --no-sourcemaps
If for some reason you don't want to use a development server, but would like to recompile the bundle on any change, use:
gulp build --watch
Testing
UI tests use Selenium server, so you need to install Java Runtime Environment (JRE) 1.7 or newer version.
You also need to install Firefox - it is used as the default browser for tests.
Run full Web UI test suite, run:
npm run lint npm test
UI functional tests require Nailgun server from fuel-web repo to be installed. By default it's assumed that fuel-web repo is in the same directory as fuel-ui repo, but you can specify another path using FUEL_WEB_ROOT environment variable:
FUEL_WEB_ROOT=/path/to/fuel-web npm test
By default Firefox browser is used. You can specify the browser using BROWSER environment variable:
BROWSER=chrome npm test